Dynamic interface configuration method and device, electronic equipment and storage medium
Through the dynamic interface configuration method, the interface development is designed as a reusable module, which solves the shortcomings of the traditional interface development model in terms of scalability and flexibility, realizes efficient and flexible interface configuration, and improves the efficiency and quality of development and operation and maintenance.
Patent Information
- Application Number
- CN202411671975.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
The traditional interface development model has shortcomings in terms of scalability and flexibility, and cannot respond quickly to new needs and is difficult to adapt to diversified business scenarios, resulting in increased development and maintenance complexity, and the interface logic is redundant and inconsistent, affecting the readability and maintainability of the code.
Through the dynamic interface configuration method, the interface is developed and designed as a reusable module. Different modules are combined to realize the configuration of the dynamic interface, receive interface configuration request messages, determine the target module, and obtain its processing information for encapsulation, and generate interface configuration response messages.
It improves the efficiency and quality of interface configuration development, enhances the maintenance and operation and maintenance of development, supports rapid response to changes in business needs, and reduces the risks and costs of changes.
Smart Images

Figure CN119621131A_ABST
Abstract
Description
Background Art
[0002] The traditional interface development model has obvious deficiencies in scalability and flexibility, which are mainly reflected in the following aspects:
[0003] 1) The traditional interface development model uses static design, which limits the rapid response to new requirements and cannot be expanded without modifying the code.
[0004] 2) The traditional interface development model is difficult to adapt to diverse business scenarios and needs, which forces developers to write multiple versions of interfaces for different systems, thereby increasing the complexity of development and maintenance.
[0005] 3) Since different developers may have different implementation methods, the interface logic is redundant and inconsistent, which affects the readability and maintainability of the code. When new functions need to be added to the interface, the interface definition usually needs to be modified, which increases the risk and cost of changes and further limits the flexibility of the system.
[0006] Therefore, it is urgent to provide a technical solution to solve the above problems. Summary of the invention
[0007] In order to solve the above technical problems, the present invention provides a dynamic interface configuration method, device, electronic device and storage medium.
[0008] In a first aspect, the present invention provides a dynamic interface configuration method, the technical solution of the method is as follows:
[0009] Receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message; wherein each preset module corresponds to different interface configuration information;
[0010] The processing information after the target module executes the corresponding business logic is obtained, and the processing information is encapsulated with the format information corresponding to the interface registration information, and an interface configuration response message is generated and sent to the target system.
[0011] The beneficial effects of a dynamic interface configuration method of the present invention are as follows:
[0012] The method of the present invention improves the efficiency and quality of interface configuration development by designing interface development into reusable modules and realizing dynamic interface configuration by combining different modules. In addition, the dynamic templated configuration greatly enhances the maintainability of development and the simplicity of operation and maintenance.
[0013] Based on the above solution, a dynamic interface configuration method of the present invention can also be improved as follows.
[0014] In an optional manner, before the step of determining, from all preset modules, the target module corresponding to the interface registration information according to the interface registration information corresponding to the interface identifier in the interface configuration request message, the step further includes:
[0015] Determine whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result;
[0016] When the first judgment result is yes, obtain the target key corresponding to the interface registration information, and parse the interface configuration request message according to the target key, and determine whether the interface configuration request message is parsed successfully to obtain a second judgment result;
[0017] When the second judgment result is yes, verify the parsed data of the interface configuration request message, and determine whether the parsed data is successfully verified to obtain a third judgment result;
[0018] The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises:
[0019] When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
[0020] In an optional manner, the step of obtaining processing information after the target module executes the corresponding business logic includes:
[0021] The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
[0022] In an optional manner, the method further includes:
[0023] A template structure corresponding to the interface registration information is acquired, and format information corresponding to the interface registration information is determined according to the template structure.
[0024] In an optional manner, the method further includes:
[0025] The interface configuration response message is desensitized.
[0026] In a second aspect, the present invention provides a dynamic interface configuration device, the technical solution of the system is as follows:
[0027] Includes: a processing unit and a configuration unit;
[0028] The processing unit is used to: receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message; wherein each preset module corresponds to different interface configuration information;
[0029] The configuration unit is used to obtain processing information after the target module executes the corresponding business logic, encapsulate the processing information with format information corresponding to the interface registration information, generate an interface configuration response message and send it to the target system.
[0030] The beneficial effects of a dynamic interface configuration device of the present invention are as follows:
[0031] The device of the present invention improves the efficiency and quality of interface configuration development by designing interface development into reusable modules and realizing dynamic interface configuration by combining different modules. In addition, the dynamic templated configuration greatly enhances the maintainability of development and the simplicity of operation and maintenance.
[0032] Based on the above solution, the dynamic interface configuration device of the present invention can also be improved as follows.
[0033] In an optional manner, the method further includes: a preprocessing unit; the preprocessing unit is used to:
[0034] Determine whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result;
[0035] When the first judgment result is yes, obtain the target key corresponding to the interface registration information, and parse the interface configuration request message according to the target key, and determine whether the interface configuration request message is parsed successfully to obtain a second judgment result;
[0036] When the second judgment result is yes, verify the parsed data of the interface configuration request message, and determine whether the parsed data is successfully verified to obtain a third judgment result;
[0037] The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises:
[0038] When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
[0039] In an optional manner, the configuration unit is specifically used to:
[0040] The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
[0041] In a third aspect, a technical solution of an electronic device of the present invention is as follows:
[0042] The invention comprises a memory, a processor and a program stored in the memory and running on the processor. When the processor executes the program, the steps of the dynamic interface configuration method of the present invention are realized.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having the following technical solution:
[0044] Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium reads the instructions, the computer-readable storage medium executes the steps of the dynamic interface configuration method of the present invention.
[0045] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0047] Figure 1 A schematic diagram of a flow chart of an embodiment of a dynamic interface configuration method of the present invention;
[0048] Figure 2 A schematic diagram of the structure of an embodiment of a dynamic interface configuration device of the present invention;
[0049] Figure 3 The figure is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0050] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0051] Figure 1 FIG. 1 is a flow chart showing an embodiment of a dynamic interface configuration method provided by the present invention, and the dynamic interface configuration method can be executed by a terminal system. Figure 1 As shown, the following steps are included:
[0052] S1. Receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message.
[0053] Among them, the target system is the client that needs to perform interface configuration with the terminal system in this embodiment. The interface configuration request message is used to request the terminal system to perform interface configuration. The interface registration information can be obtained from a preset database. Each preset module corresponds to different interface configuration information. The interface configuration information includes but is not limited to: configuration information of operations such as interface information / request parameters / return parameters. The preset module specifically refers to a code unit with certain independent functions. Usually these code units are encapsulations of a certain function or task in the system. Each preset module has clear functions and responsibilities. The target module is the preset module corresponding to the interface registration information. The specific number of target modules is determined according to actual conditions and is not limited here.
[0054] S2. Obtain processing information after the target module executes the corresponding business logic, encapsulate the processing information with the format information corresponding to the interface registration information, generate an interface configuration response message and send it to the target system.
[0055] Among them, each preset module has corresponding business logic. Business logic refers to the core part that the preset module needs to process, which covers the ways and methods of implementing business rules, processing user needs, and realizing expected functions. Processing information means that after the target module completes the execution of the corresponding business logic, according to the predetermined rules or standards, the return value of the target module is encapsulated into content that meets the requirements of the calling end. This process includes judging the execution status of the target module, parsing the results, and encapsulating them into a unified format as needed to obtain processing information. The interface configuration response message is used to implement the configuration of the dynamic interface between the terminal system and the target system.
[0056] It should be noted that, when there are multiple target modules, the processing information after each target module executes the corresponding business logic is obtained and merged.
[0057] In an optional manner, before the step of determining, from all preset modules, the target module corresponding to the interface registration information according to the interface registration information corresponding to the interface identifier in the interface configuration request message, the step further includes:
[0058] It is determined whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result.
[0059] The interface registration manager stores a plurality of interface registration information, each of which is associated with an interface identifier. In this embodiment, the corresponding interface registration information can be retrieved in the interface registration manager according to the interface identifier.
[0060] It should be noted that the interface registration manager uses a database as an interface management platform, and realizes unified management of interfaces by maintaining corresponding interface data in database tables. The above method eliminates the embedding of code and significantly reduces maintenance costs, and only requires providing a simple add, delete, modify, and query interface. In addition, using a database table as a data center facilitates subsequent interface data statistics and report export functions, which provides convenience for data analysis.
[0061] When the first judgment result is yes, the target key corresponding to the interface registration information is obtained, and the interface configuration request message is parsed according to the target key, and it is determined whether the interface configuration request message is parsed successfully to obtain a second judgment result.
[0062] Different interface registration information corresponds to different keys. The target key is the key corresponding to the interface registration information required in this embodiment. The key can effectively decode the content of the interface configuration request message.
[0063] It should be noted that when the first judgment result is no, it means that the corresponding interface registration information cannot be obtained, and the terminal system will immediately output a clear error prompt to inform the user that the interface identifier is invalid or the interface identifier is not registered.
[0064] When the second judgment result is yes, the parsed data of the interface configuration request message is verified, and it is determined whether the parsed data is successfully verified to obtain a third judgment result.
[0065] The verification method of parsed data is to check the key elements such as message digest and data signature in the parsed data to confirm that the parsed data has not been tampered with or damaged during transmission. In addition, the user's identity and permissions will be reviewed to ensure that only authorized users can access the corresponding interface.
[0066] It should be noted that when the second judgment result is no, it means that the parsing process has failed, such as key mismatch, format error or data corruption. The terminal system will promptly inform the target system of the parsing failure and provide specific error information.
[0067] The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises:
[0068] When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
[0069] When the parsed data is successfully verified, the subsequent steps are executed. When the parsed data is not successfully verified (there are any differences or inconsistencies), the terminal system immediately outputs a detailed and clear error prompt.
[0070] In an optional manner, the step of obtaining processing information after the target module executes the corresponding business logic includes:
[0071] The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
[0072] The specific process involved in the dynamic proxy mechanism includes creating a proxy instance, intelligently forwarding the interface configuration request message to the corresponding target module, and converting the acquired target module into executable business logic. During the execution process, the return result of the target module can be post-processed, and the result returned by the target module can be converted into a unified format to obtain business logic data.
[0073] It should be noted that the interface logic is split into independent preset modules using a dynamic interface driver. This design not only improves the flexibility of the terminal system, enabling it to quickly adapt to changes in business needs, but also enhances reusability, so that the same preset module can be referenced by multiple interfaces at the same time, avoiding the waste of repeated development. In addition, through the dynamic proxy mechanism, the terminal system can flexibly adjust the behavior and configuration of the module at runtime, thereby achieving more efficient resource management and maintenance. The advantage of this architecture is that it supports faster iterative development and can respond quickly to market changes while ensuring system stability. The core of this embodiment is to achieve dynamic expansion of the interface so that the interface can adapt to changing business needs. The dynamically expanded interface can automatically load or modify the corresponding configuration items according to different scenarios and user needs, thereby realizing personalized functions. It allows rapid iteration and deployment of new functions while ensuring system stability.
[0074] In an optional manner, the method further includes:
[0075] A template structure corresponding to the interface registration information is acquired, and format information corresponding to the interface registration information is determined according to the template structure.
[0076] Among them, by obtaining the template structure corresponding to the interface registration information, the format and content of the message are ensured to meet the predetermined specifications. When encapsulating the response message, the terminal system will extract the format information (such as interface verification information, etc.) according to the template structure and reorganize the data to ensure that the final interface configuration response message is complete and easy to understand.
[0077] It should be noted that in this embodiment, all data information involved in the entire process can be logged to facilitate subsequent auditing and troubleshooting.
[0078] In an optional manner, the method further includes:
[0079] The interface configuration response message is desensitized.
[0080] Among them, whether the interface configuration response message needs to be desensitized is determined according to the sensitive permission configuration to protect sensitive data and enhance data security.
[0081] In this embodiment, it should be noted that:
[0082] The terminal system is set up with multiple types of data interfaces by default (such as: data interface corresponding to new operations, data interface corresponding to deletion operations, data interface corresponding to modification operations, etc.). When the target system sends an interface configuration request message to the terminal system, the data interface type corresponding to the interface configuration request message can be determined through the message information contained in the interface configuration request message, and the interface configuration request message can be sent to the corresponding type of data interface on the terminal system, so that the terminal system receives the message through this type of data interface, thereby responding to the interface configuration more quickly.
[0083] The technical solution of this embodiment improves the efficiency and quality of interface configuration development by designing interface development into reusable modules and realizing dynamic interface configuration by combining different modules. The dynamic templated configuration greatly enhances the maintainability of development and the simplicity of operation and maintenance.
[0084] Figure 2 FIG. 2 is a schematic diagram showing a structure of an embodiment of a dynamic interface configuration device 200 provided by the present invention. Figure 2 As shown, the device 200 includes: a processing unit 210 and a configuration unit 220;
[0085] The processing unit 210 is used to: receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message; wherein each preset module corresponds to different interface configuration information;
[0086] The configuration unit 220 is used to obtain processing information after the target module executes the corresponding business logic, encapsulate the processing information with format information corresponding to the interface registration information, generate an interface configuration response message and send it to the target system.
[0087] In an optional manner, the method further includes: a preprocessing unit; the preprocessing unit is used to:
[0088] Determine whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result;
[0089] When the first judgment result is yes, obtain the target key corresponding to the interface registration information, and parse the interface configuration request message according to the target key, and determine whether the interface configuration request message is parsed successfully to obtain a second judgment result;
[0090] When the second judgment result is yes, verify the parsed data of the interface configuration request message, and determine whether the parsed data is successfully verified to obtain a third judgment result;
[0091] The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises:
[0092] When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
[0093] In an optional manner, the configuration unit 220 is specifically configured to:
[0094] The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
[0095] In an optional manner, the configuration module 220 is further configured to:
[0096] A template structure corresponding to the interface registration information is acquired, and format information corresponding to the interface registration information is determined according to the template structure.
[0097] In an optional manner, the configuration module 220 is further configured to:
[0098] The interface configuration response message is desensitized.
[0099] It should be noted that the beneficial effects of the dynamic interface configuration device provided in the above embodiment are the same as the beneficial effects of the above dynamic interface configuration method, which will not be described in detail here. In addition, when the device provided in the above embodiment realizes its functions, it only uses the division of the above functional units as an example. In actual applications, the above functions can be assigned to different functional units as needed, that is, the device can be divided into different functional units according to actual conditions to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.
[0100] Among them, the dynamic interface configuration device of the present invention can be a computer program (including program code) running in a computer device. For example, the dynamic interface configuration device of the present invention is an application software that can be used to execute the corresponding steps in the dynamic interface configuration method of the present invention.
[0101] In some embodiments, the dynamic interface configuration device of the present invention can be implemented in a combination of software and hardware. As an example, the dynamic interface configuration device of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the dynamic interface configuration method of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs) or other electronic components.
[0102] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The name of a module does not limit the module itself in some cases.
[0103] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any one of the above-mentioned dynamic interface configuration methods is implemented. That is to say, an electronic device according to an embodiment of the present invention may include but is not limited to: a processor and a memory; a memory for storing a computer program; a processor for executing the dynamic interface configuration method shown in any embodiment of the present invention by calling the computer program.
[0104] In an alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0105] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0106] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 In the figure, only one thick line is used to represent the bus 4002, but this does not mean that there is only one bus or one type of bus.
[0107] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0108] The memory 4003 is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.
[0109] Among them, the electronic device can also be a terminal device, and the terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart TV, and a smart car device.
[0110] It should be noted that Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0111] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned dynamic interface configuration methods is implemented.
[0112] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0113] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the above-mentioned dynamic interface configuration method.
[0114] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0115] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The computer-readable storage medium provided by the embodiment of the present invention may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or component.
[0117] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0118] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
[0119] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0120] Those skilled in the art know that the present invention can be implemented as an apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0121] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A dynamic interface configuration method, characterized in that: include: Receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message; wherein each preset module corresponds to different interface configuration information; The processing information after the target module executes the corresponding business logic is obtained, and the processing information is encapsulated with the format information corresponding to the interface registration information, and an interface configuration response message is generated and sent to the target system.
2. The dynamic interface configuration method according to claim 1, characterized in that: Before the step of determining the target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message, the method further includes: Determine whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result; When the first judgment result is yes, obtain the target key corresponding to the interface registration information, and parse the interface configuration request message according to the target key, and determine whether the interface configuration request message is parsed successfully to obtain a second judgment result; When the second judgment result is yes, verify the parsed data of the interface configuration request message, and determine whether the parsed data is successfully verified to obtain a third judgment result; The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises: When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
3. The dynamic interface configuration method according to claim 1, characterized in that: The step of obtaining processing information after the target module executes the corresponding business logic includes: The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
4. The dynamic interface configuration method according to claim 1, characterized in that: Also includes: A template structure corresponding to the interface registration information is acquired, and format information corresponding to the interface registration information is determined according to the template structure.
5. The dynamic interface configuration method according to claim 1, characterized in that: Also includes: The interface configuration response message is desensitized.
6. A dynamic interface configuration device, characterized in that: include: Processing unit and configuration unit; The processing unit is used to: receive an interface configuration request message sent by a target system, and determine a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message; wherein each preset module corresponds to different interface configuration information; The configuration unit is used to obtain processing information after the target module executes the corresponding business logic, encapsulate the processing information with format information corresponding to the interface registration information, generate an interface configuration response message and send it to the target system.
7. The dynamic interface configuration device according to claim 6, characterized in that: Also includes: Pre-processing unit; The pre-processing unit is used for: Determine whether there is interface registration information corresponding to the interface identifier in the interface registration manager to obtain a first determination result; When the first judgment result is yes, obtain the target key corresponding to the interface registration information, and parse the interface configuration request message according to the target key, and determine whether the interface configuration request message is parsed successfully to obtain a second judgment result; When the second judgment result is yes, verify the parsed data of the interface configuration request message, and determine whether the parsed data is successfully verified to obtain a third judgment result; The step of determining a target module corresponding to the interface registration information from all preset modules according to the interface registration information corresponding to the interface identifier in the interface configuration request message comprises: When the third judgment result is yes, according to the interface registration information corresponding to the interface identifier in the interface configuration request message, a target module corresponding to the interface registration information is determined from all preset modules.
8. The dynamic interface configuration device according to claim 6, characterized in that: The configuration unit is specifically used for: The dynamic proxy mechanism is used to obtain the processing information after the target module executes the corresponding business logic.
9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the dynamic interface configuration method as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor, so that the computer-readable storage medium implements the dynamic interface configuration method according to any one of claims 1 to 5.