CN116414366A - Middleware interface generation method, device, equipment and medium - Google Patents

Middleware interface generation method, device, equipment and medium Download PDF

Info

Publication number
CN116414366A
CN116414366A CN202310413593.3A CN202310413593A CN116414366A CN 116414366 A CN116414366 A CN 116414366A CN 202310413593 A CN202310413593 A CN 202310413593A CN 116414366 A CN116414366 A CN 116414366A
Authority
CN
China
Prior art keywords
interface
middleware
initial
middleware interface
library
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
CN202310413593.3A
Other languages
Chinese (zh)
Other versions
CN116414366B (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.)
Guangdong Qiqitong Technology Co ltd
Original Assignee
Guangdong Qiqitong 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 Guangdong Qiqitong Technology Co ltd filed Critical Guangdong Qiqitong Technology Co ltd
Priority to CN202310413593.3A priority Critical patent/CN116414366B/en
Publication of CN116414366A publication Critical patent/CN116414366A/en
Application granted granted Critical
Publication of CN116414366B publication Critical patent/CN116414366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of computers, and provides a middleware interface generating method, device, equipment and medium, which can pre-construct a standard database, construct an initial middleware interface library and a simulation data set on the basis of the standard database so as to improve the construction efficiency, simulate each initial middleware interface based on the simulation data set, an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface, and adjust each initial middleware interface based on a simulation result to obtain a target middleware interface library, and can be compatible with services of different industries and different application systems through the maximized target middleware interface library which is built uniformly.

Description

Middleware interface generation method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for generating a middleware interface.
Background
With the continuous development of computer technology, application systems are layered endlessly, and access transmission work among the application systems is also increased.
However, the application systems have larger difference in the advanced language development interfaces, different coding modes and data transmission rules are used by different systems, and when data access and data transmission are needed among the application systems, corresponding application codes also need to be adjusted, so that the workload is high, the efficiency is low, and the system flexibility is poor.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a middleware interface generating method, device, apparatus and medium, which aim to solve the problems of low development efficiency and poor flexibility between application systems.
A middleware interface generation method, the middleware interface generation method comprising:
obtaining a pre-constructed standard interface library;
constructing an initial middleware interface library based on the standard interface library, and constructing a simulation data set based on the standard interface library;
configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library;
simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface to obtain a simulation result;
and adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
According to a preferred embodiment of the present invention, before the obtaining the pre-built standard interface library, the method further includes:
acquiring a historical service case;
identifying all middleware interfaces used in the historical business case;
performing de-duplication processing on all middleware interfaces used in the historical service case to obtain at least one middleware interface;
and constructing the standard interface library by utilizing the at least one middleware interface.
According to a preferred embodiment of the present invention, the constructing an initial middleware interface library based on the standard interface library includes:
dividing middleware interfaces in the standard interface library into interfaces to be modified and interfaces without modification;
receiving the modification content of the interface to be modified;
adjusting the interface to be modified according to the modification content to obtain an adjustment interface;
receiving a newly created middleware interface as a newly added interface;
and combining the modification-free interface, the adjustment interface and the newly added interface to obtain the initial middleware interface library.
According to a preferred embodiment of the present invention, the simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and obtaining a simulation result includes:
Converting the format of the data in the simulation data set according to the input parameter data structure corresponding to each initial middleware interface to obtain input parameters of each initial middleware interface;
acquiring service logic of each initial middleware interface;
according to the entry of each initial middleware interface, each initial middleware interface is called to execute corresponding business logic, and an execution result of each initial middleware interface is obtained;
and performing format conversion on the execution result of each initial middleware interface according to the output parameter data structure corresponding to each initial middleware interface to obtain the simulation result corresponding to each initial middleware interface.
According to a preferred embodiment of the present invention, the adjusting each initial middleware interface based on the simulation result, to obtain a target middleware interface library includes:
acquiring an expected execution result corresponding to each initial middleware interface;
comparing the simulation result corresponding to each initial middleware interface with the expected execution result;
when detecting that the simulation result corresponding to the initial middleware interface is different from the expected execution result, generating prompt information for adjusting the detected initial middleware interface;
Sending the prompt information to a designated terminal device;
when feedback data of the prompt information is received, adjusting the detected initial middleware interface based on the feedback data;
updating the initial middleware interface library based on the adjusted initial middleware interface to obtain the target middleware interface library;
the feedback data comprises interface logic, an input parameter data structure, an output parameter data structure, a default value and corresponding simulation data.
According to a preferred embodiment of the present invention, after the obtaining the target middleware interface library, the method further includes:
responding to a target middleware interface calling instruction to acquire current business logic;
acquiring the target middleware interface from the target middleware interface library;
executing the current business logic by utilizing the target middleware interface to release the target middleware interface;
and storing the communication information of the target middleware interface.
According to a preferred embodiment of the invention, the method further comprises:
retrieving an interface log from the communication information of each target middleware interface in the target middleware interface library;
identifying information of failure in reception based on the interface log;
And re-pushing the information of the receiving failure.
A middleware interface generation device, the middleware interface generation device comprising:
the acquisition unit is used for acquiring a pre-constructed standard interface library;
the construction unit is used for constructing an initial middleware interface library based on the standard interface library and constructing a simulation data set based on the standard interface library;
the configuration unit is used for configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library;
the simulation unit is used for simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface to obtain a simulation result;
and the adjusting unit is used for adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
And the processor executes the instructions stored in the memory to realize the middleware interface generation method.
A computer-readable storage medium having stored therein at least one instruction that is executed by a processor in a computer device to implement the middleware interface generation method.
According to the technical scheme, the standard database can be built in advance, the initial middleware interface library and the simulation data set are built on the basis of the standard database, so that the construction efficiency is improved, each initial middleware interface is simulated on the basis of the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, each initial middleware interface is adjusted on the basis of the simulation result, the target middleware interface library is obtained, the services of different industries and different application systems are compatible through the uniformly built target middleware interface library, the iteration can be performed quickly, the system flexibility is high, the development efficiency is improved, and the updating cost is reduced.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the middleware interface generation method of the present invention.
FIG. 2 is a functional block diagram of a preferred embodiment of the middleware interface generation device of the present invention.
Fig. 3 is a schematic structural diagram of a computer device implementing a preferred embodiment of the middleware interface generation method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a preferred embodiment of the middleware interface generation method of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The middleware interface generating method is applied to one or more computer devices, wherein the computer device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the computer device comprises, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device and the like.
The computer device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
S10, acquiring a pre-constructed standard interface library.
The standard interface library is used for storing all middleware interfaces obtained through historical business case precipitation and abstraction.
Specifically, before the pre-built standard interface library is obtained, the method further includes:
acquiring a historical service case;
identifying all middleware interfaces used in the historical business case;
performing de-duplication processing on all middleware interfaces used in the historical service case to obtain at least one middleware interface;
and constructing the standard interface library by utilizing the at least one middleware interface.
In the embodiment, the constructed standard interface library can be used for rapid reference and reference of subsequent projects, so that the efficiency of interface generation is improved.
S11, constructing an initial middleware interface library based on the standard interface library, and constructing a simulation data set based on the standard interface library.
In this embodiment, the constructing an initial middleware interface library based on the standard interface library includes:
dividing middleware interfaces in the standard interface library into interfaces to be modified and interfaces without modification;
receiving the modification content of the interface to be modified;
adjusting the interface to be modified according to the modification content to obtain an adjustment interface;
Receiving a newly created middleware interface as a newly added interface;
and combining the modification-free interface, the adjustment interface and the newly added interface to obtain the initial middleware interface library.
In the above embodiment, the middleware interfaces in the original standard interface library can be directly referenced, the middleware interfaces can be modified on the basis of the middleware interfaces stored in the original standard interface library, new middleware interfaces can be customized, and the new middleware interfaces are formed together to form the initial middleware interface library, so that the construction efficiency of the initial middleware interface library is improved, and the coverage of the middleware interfaces in the constructed initial middleware interface library is wider.
Similarly, the standard interface library also stores data related to each middleware interface when called, and thus the simulation data set can be constructed in a similar manner to the initial middleware interface library.
S12, configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library.
In this embodiment, the in-parameter data structure and the out-parameter data structure of each middleware interface in the standard interface library may be directly referenced, or the in-parameter data structure and the out-parameter data structure corresponding to each initial middleware interface may be configured according to different use requirements, which is not limited in the present invention.
In this embodiment, the incoming data structure is used to limit the format of the incoming data of each initial middleware interface; the outgoing data structure is used to limit the format of the outgoing data for each initial middleware interface.
By configuring the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, the formats of input data and output data of each middleware interface can be standardized, and interface service is prevented from being influenced due to the fact that the data formats are not supported.
S13, simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and obtaining a simulation result.
In this embodiment, when the simulation instruction is detected, each initial middleware interface may be further simulated based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface. For example: a virtual key may be provided on the interface configuration interface, and when the virtual key is triggered, the start of the simulation instruction is confirmed.
After the initial middleware interface library is established, each initial middleware interface in the initial middleware interface library is required to be tested to determine whether each initial middleware interface can work normally.
Specifically, the simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and obtaining a simulation result includes:
converting the format of the data in the simulation data set according to the input parameter data structure corresponding to each initial middleware interface to obtain input parameters of each initial middleware interface;
acquiring service logic of each initial middleware interface;
according to the entry of each initial middleware interface, each initial middleware interface is called to execute corresponding business logic, and an execution result of each initial middleware interface is obtained;
and performing format conversion on the execution result of each initial middleware interface according to the output parameter data structure corresponding to each initial middleware interface to obtain the simulation result corresponding to each initial middleware interface.
For example: and for the data A in the simulation data set, if the initial middleware B is required to be called, determining an incoming data structure of the initial middleware B, and performing format conversion on the data A by utilizing the incoming data structure of the initial middleware B. Further, the business logic of the initial middleware B is obtained, the corresponding business logic is executed by calling the initial middleware B according to the converted data A, and an execution result is obtained. And determining the output parameter data structure of the initial middleware B, and performing format conversion on the execution result by using the output parameter data structure of the initial middleware B to obtain a simulation result corresponding to the initial middleware B.
Through the embodiment, each initial middleware interface can be pre-executed to simulate the execution operation of each interface, the execution result of each initial middleware interface can be intuitively reflected, and the obtained simulation result can be used for subsequently adjusting the working state of each initial middleware interface.
And S14, adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
In this embodiment, the adjusting each initial middleware interface based on the simulation result, to obtain the target middleware interface library includes:
acquiring an expected execution result corresponding to each initial middleware interface;
comparing the simulation result corresponding to each initial middleware interface with the expected execution result;
when detecting that the simulation result corresponding to the initial middleware interface is different from the expected execution result, generating prompt information for adjusting the detected initial middleware interface;
sending the prompt information to a designated terminal device;
when feedback data of the prompt information is received, adjusting the detected initial middleware interface based on the feedback data;
updating the initial middleware interface library based on the adjusted initial middleware interface to obtain the target middleware interface library;
The feedback data comprises interface logic, an input parameter data structure, an output parameter data structure, a default value and corresponding simulation data.
The expected execution result corresponding to each initial middleware interface can be preconfigured according to the actual service requirement.
The appointed terminal equipment can be intelligent terminals such as mobile phones of related staff, for example, the appointed terminal equipment can be intelligent terminals such as mobile phones or flat plates of middleware interface developers.
In the embodiment, when the comparison test shows that the initial middleware is abnormal to execute and needs to be adjusted, relevant staff is timely prompted to intervene, and the expected effect is finally achieved through continuous debugging, so that the corresponding initial middleware is perfected.
Of course, when it is detected that the simulation result corresponding to the initial middleware interface is the same as the expected execution result, it is indicated that the initial middleware interface can work normally without adjustment.
Through the embodiment, all the target middleware interfaces in the finally established target middleware interface library can be ensured to meet the release requirement, so that the established target middleware interface library is more perfect.
In this embodiment, after the obtaining the target middleware interface library, the method further includes:
responding to a target middleware interface calling instruction to acquire current business logic;
acquiring the target middleware interface from the target middleware interface library;
executing the current business logic by utilizing the target middleware interface to release the target middleware interface;
and storing the communication information of the target middleware interface.
Each target middleware interface can be configured with a unique interface identifier, and the interface identifier can be carried in the target middleware interface calling instruction so as to query in the target middleware interface library according to the interface identifier and match the target middleware interface to be called.
Through the embodiment, each target middleware interface in the target middleware interface library can be issued, and corresponding communication information is stored, so that the subsequent use is facilitated.
In this embodiment, the method further includes:
retrieving an interface log from the communication information of each target middleware interface in the target middleware interface library;
identifying information of failure in reception based on the interface log;
And re-pushing the information of the receiving failure.
The interface log stores information such as log ID, application name, interface identifier, interface name, interface execution condition, interface type, log type, interface time consumption, retransmission times and the like.
When the interface execution condition shows that the information interface fails, the information is pushed again, or related personnel are prompted to push the information manually until the information is pushed successfully, so that the accuracy of interface execution is ensured.
According to the technical scheme, the standard database can be built in advance, the initial middleware interface library and the simulation data set are built on the basis of the standard database, so that the construction efficiency is improved, each initial middleware interface is simulated on the basis of the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, each initial middleware interface is adjusted on the basis of the simulation result, the target middleware interface library is obtained, the services of different industries and different application systems are compatible through the uniformly built target middleware interface library, the iteration can be performed quickly, the system flexibility is high, the development efficiency is improved, and the updating cost is reduced.
Fig. 2 is a functional block diagram of a preferred embodiment of the middleware interface generating device according to the present invention. The middleware interface generating device 11 includes an acquisition unit 110, a construction unit 111, a configuration unit 112, an analog unit 113, and an adjustment unit 114. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The obtaining unit 110 is configured to obtain a standard interface library constructed in advance.
The standard interface library is used for storing all middleware interfaces obtained through historical business case precipitation and abstraction.
Specifically, before the obtaining unit 110 obtains the standard interface library constructed in advance, a historical service case is obtained;
identifying all middleware interfaces used in the historical business case;
performing de-duplication processing on all middleware interfaces used in the historical service case to obtain at least one middleware interface;
and constructing the standard interface library by utilizing the at least one middleware interface.
In the embodiment, the constructed standard interface library can be used for rapid reference and reference of subsequent projects, so that the efficiency of interface generation is improved.
The construction unit 111 is configured to construct an initial middleware interface library based on the standard interface library, and construct a simulation data set based on the standard interface library.
In this embodiment, the constructing unit 111 constructs an initial middleware interface library based on the standard interface library includes:
dividing middleware interfaces in the standard interface library into interfaces to be modified and interfaces without modification;
receiving the modification content of the interface to be modified;
adjusting the interface to be modified according to the modification content to obtain an adjustment interface;
receiving a newly created middleware interface as a newly added interface;
and combining the modification-free interface, the adjustment interface and the newly added interface to obtain the initial middleware interface library.
In the above embodiment, the middleware interfaces in the original standard interface library can be directly referenced, the middleware interfaces can be modified on the basis of the middleware interfaces stored in the original standard interface library, new middleware interfaces can be customized, and the new middleware interfaces are formed together to form the initial middleware interface library, so that the construction efficiency of the initial middleware interface library is improved, and the coverage of the middleware interfaces in the constructed initial middleware interface library is wider.
Similarly, the standard interface library also stores data related to each middleware interface when called, and thus the simulation data set can be constructed in a similar manner to the initial middleware interface library.
The configuration unit 112 is configured to configure an in-parameter data structure and an out-parameter data structure corresponding to each initial middleware interface in the initial middleware interface library.
In this embodiment, the in-parameter data structure and the out-parameter data structure of each middleware interface in the standard interface library may be directly referenced, or the in-parameter data structure and the out-parameter data structure corresponding to each initial middleware interface may be configured according to different use requirements, which is not limited in the present invention.
In this embodiment, the incoming data structure is used to limit the format of the incoming data of each initial middleware interface; the outgoing data structure is used to limit the format of the outgoing data for each initial middleware interface.
By configuring the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, the formats of input data and output data of each middleware interface can be standardized, and interface service is prevented from being influenced due to the fact that the data formats are not supported.
The simulation unit 113 is configured to simulate each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and obtain a simulation result.
In this embodiment, when the simulation instruction is detected, each initial middleware interface may be further simulated based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface. For example: a virtual key may be provided on the interface configuration interface, and when the virtual key is triggered, the start of the simulation instruction is confirmed.
After the initial middleware interface library is established, each initial middleware interface in the initial middleware interface library is required to be tested to determine whether each initial middleware interface can work normally.
Specifically, the simulation unit 113 simulates each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and the simulation result includes:
converting the format of the data in the simulation data set according to the input parameter data structure corresponding to each initial middleware interface to obtain input parameters of each initial middleware interface;
acquiring service logic of each initial middleware interface;
according to the entry of each initial middleware interface, each initial middleware interface is called to execute corresponding business logic, and an execution result of each initial middleware interface is obtained;
And performing format conversion on the execution result of each initial middleware interface according to the output parameter data structure corresponding to each initial middleware interface to obtain the simulation result corresponding to each initial middleware interface.
For example: and for the data A in the simulation data set, if the initial middleware B is required to be called, determining an incoming data structure of the initial middleware B, and performing format conversion on the data A by utilizing the incoming data structure of the initial middleware B. Further, the business logic of the initial middleware B is obtained, the corresponding business logic is executed by calling the initial middleware B according to the converted data A, and an execution result is obtained. And determining the output parameter data structure of the initial middleware B, and performing format conversion on the execution result by using the output parameter data structure of the initial middleware B to obtain a simulation result corresponding to the initial middleware B.
Through the embodiment, each initial middleware interface can be pre-executed to simulate the execution operation of each interface, the execution result of each initial middleware interface can be intuitively reflected, and the obtained simulation result can be used for subsequently adjusting the working state of each initial middleware interface.
The adjusting unit 114 is configured to adjust each initial middleware interface based on the simulation result, so as to obtain a target middleware interface library.
In this embodiment, the adjusting unit 114 adjusts each initial middleware interface based on the simulation result, and obtaining the target middleware interface library includes:
acquiring an expected execution result corresponding to each initial middleware interface;
comparing the simulation result corresponding to each initial middleware interface with the expected execution result;
when detecting that the simulation result corresponding to the initial middleware interface is different from the expected execution result, generating prompt information for adjusting the detected initial middleware interface;
sending the prompt information to a designated terminal device;
when feedback data of the prompt information is received, adjusting the detected initial middleware interface based on the feedback data;
updating the initial middleware interface library based on the adjusted initial middleware interface to obtain the target middleware interface library;
the feedback data comprises interface logic, an input parameter data structure, an output parameter data structure, a default value and corresponding simulation data.
The expected execution result corresponding to each initial middleware interface can be preconfigured according to the actual service requirement.
The appointed terminal equipment can be intelligent terminals such as mobile phones of related staff, for example, the appointed terminal equipment can be intelligent terminals such as mobile phones or flat plates of middleware interface developers.
In the embodiment, when the comparison test shows that the initial middleware is abnormal to execute and needs to be adjusted, relevant staff is timely prompted to intervene, and the expected effect is finally achieved through continuous debugging, so that the corresponding initial middleware is perfected.
Of course, when it is detected that the simulation result corresponding to the initial middleware interface is the same as the expected execution result, it is indicated that the initial middleware interface can work normally without adjustment.
Through the embodiment, all the target middleware interfaces in the finally established target middleware interface library can be ensured to meet the release requirement, so that the established target middleware interface library is more perfect.
In this embodiment, after the target middleware interface library is obtained, a current service logic is obtained in response to a target middleware interface calling instruction;
acquiring the target middleware interface from the target middleware interface library;
executing the current business logic by utilizing the target middleware interface to release the target middleware interface;
And storing the communication information of the target middleware interface.
Each target middleware interface can be configured with a unique interface identifier, and the interface identifier can be carried in the target middleware interface calling instruction so as to query in the target middleware interface library according to the interface identifier and match the target middleware interface to be called.
Through the embodiment, each target middleware interface in the target middleware interface library can be issued, and corresponding communication information is stored, so that the subsequent use is facilitated.
In this embodiment, an interface log is retrieved from the communication information of each target middleware interface in the target middleware interface library;
identifying information of failure in reception based on the interface log;
and re-pushing the information of the receiving failure.
The interface log stores information such as log ID, application name, interface identifier, interface name, interface execution condition, interface type, log type, interface time consumption, retransmission times and the like.
When the interface execution condition shows that the information interface fails, the information is pushed again, or related personnel are prompted to push the information manually until the information is pushed successfully, so that the accuracy of interface execution is ensured.
According to the technical scheme, the standard database can be built in advance, the initial middleware interface library and the simulation data set are built on the basis of the standard database, so that the construction efficiency is improved, each initial middleware interface is simulated on the basis of the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, each initial middleware interface is adjusted on the basis of the simulation result, the target middleware interface library is obtained, the services of different industries and different application systems are compatible through the uniformly built target middleware interface library, the iteration can be performed quickly, the system flexibility is high, the development efficiency is improved, and the updating cost is reduced.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the present invention for implementing the middleware interface generation method.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program, such as a middleware interface generation program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, the computer device 1 may be a bus type structure, a star type structure, the computer device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the computer device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the computer device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, such as a removable hard disk of the computer device 1. The memory 12 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only for storing application software installed in the computer device 1 and various types of data, such as code of a middleware interface generation program, but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects the respective components of the entire computer device 1 using various interfaces and lines, executes programs or modules stored in the memory 12 (for example, executes a middleware interface generation program or the like), and invokes data stored in the memory 12 to perform various functions of the computer device 1 and process data.
The processor 13 executes the operating system of the computer device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps in the above-described respective middleware interface generation method embodiments, such as the steps shown in fig. 1.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into an acquisition unit 110, a construction unit 111, a configuration unit 112, an simulation unit 113, an adjustment unit 114.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to perform portions of the middleware interface generation methods described in the various embodiments of the invention.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one straight line is shown in fig. 3, but not only one bus or one type of bus. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further comprise a power source (such as a battery) for powering the various components, preferably the power source may be logically connected to the at least one processor 13 via a power management means, whereby the functions of charge management, discharge management, and power consumption management are achieved by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
Further, the computer device 1 may also comprise a network interface, optionally comprising a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the computer device 1 and other computer devices.
The computer device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the computer device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 3 shows only a computer device 1 with components 12-13, it being understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the computer device 1 and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the computer device 1 stores a plurality of instructions to implement a middleware interface generation method, the processor 13 being executable to implement:
obtaining a pre-constructed standard interface library;
constructing an initial middleware interface library based on the standard interface library, and constructing a simulation data set based on the standard interface library;
configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library;
simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface to obtain a simulation result;
and adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
The data in this case were obtained legally.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The invention is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. The middleware interface generation method is characterized by comprising the following steps of:
obtaining a pre-constructed standard interface library;
constructing an initial middleware interface library based on the standard interface library, and constructing a simulation data set based on the standard interface library;
configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library;
simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface to obtain a simulation result;
And adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
2. The middleware interface generation method according to claim 1, wherein before the obtaining the pre-built standard interface library, the method further comprises:
acquiring a historical service case;
identifying all middleware interfaces used in the historical business case;
performing de-duplication processing on all middleware interfaces used in the historical service case to obtain at least one middleware interface;
and constructing the standard interface library by utilizing the at least one middleware interface.
3. The middleware interface generation method according to claim 1, wherein the constructing an initial middleware interface library based on the standard interface library comprises:
dividing middleware interfaces in the standard interface library into interfaces to be modified and interfaces without modification;
receiving the modification content of the interface to be modified;
adjusting the interface to be modified according to the modification content to obtain an adjustment interface;
receiving a newly created middleware interface as a newly added interface;
and combining the modification-free interface, the adjustment interface and the newly added interface to obtain the initial middleware interface library.
4. The method of generating a middleware interface according to claim 1, wherein simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface, and obtaining a simulation result includes:
converting the format of the data in the simulation data set according to the input parameter data structure corresponding to each initial middleware interface to obtain input parameters of each initial middleware interface;
acquiring service logic of each initial middleware interface;
according to the entry of each initial middleware interface, each initial middleware interface is called to execute corresponding business logic, and an execution result of each initial middleware interface is obtained;
and performing format conversion on the execution result of each initial middleware interface according to the output parameter data structure corresponding to each initial middleware interface to obtain the simulation result corresponding to each initial middleware interface.
5. The method for generating a middleware interface according to claim 1, wherein said adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library comprises:
acquiring an expected execution result corresponding to each initial middleware interface;
Comparing the simulation result corresponding to each initial middleware interface with the expected execution result;
when detecting that the simulation result corresponding to the initial middleware interface is different from the expected execution result, generating prompt information for adjusting the detected initial middleware interface;
sending the prompt information to a designated terminal device;
when feedback data of the prompt information is received, adjusting the detected initial middleware interface based on the feedback data;
updating the initial middleware interface library based on the adjusted initial middleware interface to obtain the target middleware interface library;
the feedback data comprises interface logic, an input parameter data structure, an output parameter data structure, a default value and corresponding simulation data.
6. The middleware interface generation method according to claim 1, wherein after the target middleware interface library is obtained, the method further comprises:
responding to a target middleware interface calling instruction to acquire current business logic;
acquiring the target middleware interface from the target middleware interface library;
executing the current business logic by utilizing the target middleware interface to release the target middleware interface;
And storing the communication information of the target middleware interface.
7. The middleware interface generation method of claim 6, wherein the method further comprises:
retrieving an interface log from the communication information of each target middleware interface in the target middleware interface library;
identifying information of failure in reception based on the interface log;
and re-pushing the information of the receiving failure.
8. A middleware interface generation device, characterized in that the middleware interface generation device comprises:
the acquisition unit is used for acquiring a pre-constructed standard interface library;
the construction unit is used for constructing an initial middleware interface library based on the standard interface library and constructing a simulation data set based on the standard interface library;
the configuration unit is used for configuring an input parameter data structure and an output parameter data structure corresponding to each initial middleware interface in the initial middleware interface library;
the simulation unit is used for simulating each initial middleware interface based on the simulation data set, the input parameter data structure and the output parameter data structure corresponding to each initial middleware interface to obtain a simulation result;
and the adjusting unit is used for adjusting each initial middleware interface based on the simulation result to obtain a target middleware interface library.
9. A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
A processor executing instructions stored in the memory to implement the middleware interface generation method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer-readable storage medium has stored therein at least one instruction that is executed by a processor in a computer device to implement the middleware interface generation method of any of claims 1 to 7.
CN202310413593.3A 2023-04-17 2023-04-17 Middleware interface generation method, device, equipment and medium Active CN116414366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310413593.3A CN116414366B (en) 2023-04-17 2023-04-17 Middleware interface generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310413593.3A CN116414366B (en) 2023-04-17 2023-04-17 Middleware interface generation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN116414366A true CN116414366A (en) 2023-07-11
CN116414366B CN116414366B (en) 2024-01-30

Family

ID=87049342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310413593.3A Active CN116414366B (en) 2023-04-17 2023-04-17 Middleware interface generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116414366B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061304A1 (en) * 2005-09-13 2007-03-15 Gung Kwang N Middleware and a method for implementing business logic using it
CN109240655A (en) * 2018-08-01 2019-01-18 百富计算机技术(深圳)有限公司 A kind of implementation method of the middleware based on EMV, terminal device
CN109643252A (en) * 2016-08-17 2019-04-16 谷歌有限责任公司 Middleware interface and middleware interface generator
CN113805859A (en) * 2021-08-20 2021-12-17 浪潮金融信息技术有限公司 Method, system and medium for designing middleware of smart screen
CN114527983A (en) * 2020-11-23 2022-05-24 中移互联网有限公司 Interface adaptation method and device based on middleware and electronic equipment
CN115407981A (en) * 2022-09-05 2022-11-29 中信百信银行股份有限公司 Front-end data mock method and system based on middleware adaptation
CN115904317A (en) * 2022-11-08 2023-04-04 深圳复临科技有限公司 Method, device, equipment and storage medium for uniformly calling front-end interface and back-end interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061304A1 (en) * 2005-09-13 2007-03-15 Gung Kwang N Middleware and a method for implementing business logic using it
CN109643252A (en) * 2016-08-17 2019-04-16 谷歌有限责任公司 Middleware interface and middleware interface generator
CN109240655A (en) * 2018-08-01 2019-01-18 百富计算机技术(深圳)有限公司 A kind of implementation method of the middleware based on EMV, terminal device
CN114527983A (en) * 2020-11-23 2022-05-24 中移互联网有限公司 Interface adaptation method and device based on middleware and electronic equipment
CN113805859A (en) * 2021-08-20 2021-12-17 浪潮金融信息技术有限公司 Method, system and medium for designing middleware of smart screen
CN115407981A (en) * 2022-09-05 2022-11-29 中信百信银行股份有限公司 Front-end data mock method and system based on middleware adaptation
CN115904317A (en) * 2022-11-08 2023-04-04 深圳复临科技有限公司 Method, device, equipment and storage medium for uniformly calling front-end interface and back-end interface

Also Published As

Publication number Publication date
CN116414366B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN113806434B (en) Big data processing method, device, equipment and medium
CN112015663B (en) Test data recording method, device, equipment and medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN116823437A (en) Access method, device, equipment and medium based on configured wind control strategy
CN116414366B (en) Middleware interface generation method, device, equipment and medium
CN113923218B (en) Distributed deployment method, device, equipment and medium for coding and decoding plug-in
CN114268559B (en) Directional network detection method, device, equipment and medium based on TF-IDF algorithm
CN116306591B (en) Flow form generation method, device, equipment and medium
CN115934576B (en) Test case generation method, device, equipment and medium in transaction scene
CN116860508B (en) Distributed system software defect continuous self-healing method, device, equipment and medium
CN114185502B (en) Log printing method, device, equipment and medium based on production line environment
CN116414699B (en) Operation and maintenance testing method, device, equipment and medium
CN116934263B (en) Product batch admittance method, device, equipment and medium
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN116225971B (en) Transaction interface compatibility detection method, device, equipment and medium
CN115731047B (en) Batch order processing method, equipment and medium
CN116361753B (en) Authority authentication method, device, equipment and medium
CN116701233B (en) Transaction system testing method, equipment and medium based on high concurrency report simulation
CN116629596B (en) Supply chain risk prediction method, device, equipment and medium
CN116418896B (en) Task execution method, device, equipment and medium based on timer
CN116521185A (en) Application deployment method, device, equipment and medium
CN117151955A (en) Traffic case processing state tracking method, device, equipment and medium
CN117522396A (en) Payment channel configuration method, device, equipment and medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN114185777A (en) Test method, device, equipment and medium based on scene chain

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