Disclosure of Invention
The invention provides an interface parameter simplifying method, an interface parameter simplifying device, electronic equipment and a computer readable storage medium, and mainly aims to simplify interface parameters and improve data request efficiency of an interface.
In order to achieve the above object, the method for simplifying interface parameters provided by the present invention comprises:
acquiring an information request sent by a client, sending the information request to a back-end service platform corresponding to the client, and constructing an information agent platform of a background service platform so as to configure a parameter interface of the client through the information agent platform, wherein the parameter interface comprises a parameter filtering interface and a parameter query interface;
inquiring whether request information corresponding to the information request exists in the information agent platform;
if the request information corresponding to the information request exists in the information agent platform, returning the request information to the client;
if the request information corresponding to the information request does not exist in the information agent platform, inquiring the request total information corresponding to the information request from the back-end service platform according to the parameter inquiry interface;
and according to the parameter filtering interface, performing information filtering on the request full-scale information to obtain target information, and returning the target information to the client.
Optionally, the sending the information request to a backend service platform corresponding to the client includes:
constructing a synchronous channel between the client and the background service platform, and configuring a transmission indicator of the information request;
and sending an information request to a back-end service platform corresponding to the client according to the synchronous channel and the transmission indicator.
Optionally, the constructing the information agent platform of the background service platform includes:
configuring an information agent file of the background service platform by using a preset information management server;
according to the information agent file, establishing an agent parameter of the background service platform, and according to the agent parameter, establishing an agent tool package of the background service platform;
and creating an information agent platform of the background service platform according to the agent tool package.
Optionally, the configuring, by the information broker platform, a parameter interface of the client includes:
configuring gateway attributes of the client through the information agent platform, wherein the gateway attributes comprise a filtering attribute and a query attribute;
configuring a filtering domain name and a filtering server of the client by using the information agent platform according to the filtering attribute, and creating a parameter filtering interface of the client according to the filtering attribute, the filtering domain name and the filtering server;
configuring a query domain name and a query server of the client by using the information agent platform according to the query attribute, and creating a parameter query interface of the client according to the over-query attribute, the query domain name and the query server;
and generating a parameter interface of the client according to the parameter filtering interface and the parameter query interface.
Optionally, the querying whether there is request information corresponding to the information request from the information broker platform includes:
creating a data query table of the information request in the information agent platform, and configuring a query object of the information request in the data query table;
according to the query object, indexing query data of the query object from the data query table;
if the query data of the query object is indexed from a data query table, the information agent platform has request information corresponding to the information request;
and if the query data of the query object is not indexed from the data query table, the information agent platform does not have the request information corresponding to the information request.
Optionally, the returning the request information to the client includes:
inquiring the transmission addresses of the information agent platform and the client corresponding to the request information to obtain a first address and a second address, and configuring a transmission protocol of the information agent platform and the client;
constructing a transmission channel between the information agent platform and the client according to the first address, the second address and the transmission protocol;
and returning the request information to the client according to the transmission channel.
Optionally, the performing information filtering on the request full-size information according to the parameter filtering interface to obtain target information further includes:
defining a filtering rule of the request full-scale information in the parameter filtering interface;
and screening the request full amount information according to the filtering rule to obtain target information.
In order to solve the above problem, the present invention further provides an interface parameter reduction apparatus, including:
the parameter interface configuration module is used for acquiring an information request sent by a client, sending the information request to a back-end service platform corresponding to the client, and constructing an information agent platform of the background service platform so as to configure a parameter interface of the client through the information agent platform, wherein the parameter interface comprises a parameter filtering interface and a parameter query interface;
the request information inquiry module is used for inquiring whether request information corresponding to the information request exists in the information agent platform;
the request information returning module is used for returning the request information to the client when the request information corresponding to the information request exists in the information agent platform;
a full information query module, configured to query, according to the parameter query interface, full information of a request corresponding to the information request from the back-end service platform when there is no request information corresponding to the information request in the information agent platform;
and the target information returning module is used for filtering the request full-scale information according to the parameter filtering interface to obtain target information and returning the target information to the client.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to implement the interface parameter reduction method described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the interface parameter reduction method described above.
It can be seen that, in the embodiment of the present invention, firstly, an information request of a client is sent to a back-end service platform corresponding to the client, so as to process the information request through the back-end service platform, thereby ensuring the precise reference and simplification of the subsequent information request, and an information agent platform of the back-end service platform is constructed, and a parameter interface of the client is configured through the information agent platform, including a parameter filtering interface and a parameter query interface, so that the client parameter interface can provide information for the client, thereby ensuring the precise reference and simplification of the interface parameters of the client; further, in the embodiment of the present invention, if there is request information corresponding to the information request in the information agent platform and the request information corresponding to the information request does not exist in the information agent platform, the request information corresponding to the information request is queried from the back-end service platform according to the parameter query interface, the request information is filtered according to the parameter filter interface to obtain the target information, and the target information is returned to the client, so as to implement fast query of data of the information request, reduce query parameters of the information request, and ensure efficiency of information query. Therefore, the interface parameter simplification method, the interface parameter simplification device, the electronic device and the computer-readable storage medium provided by the embodiments of the present invention can realize the simplification of the interface parameter and improve the data request efficiency of the interface.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides an interface parameter simplifying method. The execution subject of the interface parameter reduction method includes, but is not limited to, at least one of electronic devices, such as a server and a terminal, which can be configured to execute the method provided by the embodiment of the present invention. In other words, the interface parameter reduction method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart illustrating an interface parameter reduction method according to an embodiment of the present invention. In the embodiment of the present invention, the interface parameter reduction method includes the following steps S1-S5:
s1, acquiring an information request sent by a client, sending the information request to a back-end service platform corresponding to the client, and constructing an information agent platform of the back-end service platform to configure a parameter interface of the client through the information agent platform, wherein the parameter interface comprises a parameter filtering interface and a parameter query interface.
In the embodiment of the invention, the client requirement information can be obtained by obtaining an information request sent by the client, wherein the client is a program which corresponds to the server and provides local service for the client, the information request can be understood as the information requirement of the user, such as the requirements of order information inquiry, logistics information inquiry, after-sales information inquiry and the like, optionally, the information request can be obtained through an automatic script, and the automatic script can be constructed through a script language, such as a JS script language.
Further, the embodiment of the present invention sends the information request to a back-end service platform corresponding to the client, so as to process the information request through the back-end service platform, thereby ensuring the accurate reference and access of the subsequent information request. The back-end service platform refers to a server management background and is used for managing the information requested by the client.
As an embodiment of the present invention, the sending the information request to a backend service platform corresponding to the client includes: and constructing a synchronous channel between the client and the background service platform, configuring a transmission indicator of the information request, and sending the information request to a back-end service platform corresponding to the client according to the synchronous channel and the transmission indicator.
The synchronization channel is a channel for providing data transmission between different application terminals, and the transmission indicator is an identification mode of a value.
Optionally, the synchronization channel between the client and the background service platform is obtained through an LET frame structure, and the synchronization channel and the transmission indicator are obtained through setting of a program script
Furthermore, the embodiment of the invention can ensure the premise of parameter interface configuration of the subsequent client by constructing the information agent platform of the background service platform, wherein the information agent platform is a third-party platform applied to information interaction between the client and the server. Optionally, the information agent platform may be compiled by a programming language, such as JAVA.
As an embodiment of the present invention, the information agent platform for constructing the background service platform includes: configuring an information agent file of the background service platform by using a preset information management server, creating an agent parameter of the background service platform according to the information agent file, creating an agent tool package of the background service platform according to the agent parameter, and creating an information agent platform of the background service platform according to the agent tool package.
The information agent file is a processing file generated by a bridge constructed by a front end and a back end by a third-party platform, the agent parameter is a parameter set by a program in the background service platform agent, such as a port parameter, an address parameter and the like, and the agent tool package is a code package, such as a jar package, for running the background service platform. Optionally, the preset information management server includes a web management server.
Furthermore, in the embodiment of the present invention, the parameter interface of the client is configured through the information agent platform, and the parameter interface of the client can provide information for the client to ensure the premise of simplifying the interface parameters of the client, wherein the parameter interface includes a parameter filtering interface and a parameter query interface, the parameter filtering interface is a filtering window for filtering parameters, the query interface is a query window for querying parameters,
as an embodiment of the present invention, the configuring, by the information broker platform, a parameter interface of the client includes: configuring gateway attributes of the client through the information agent platform, wherein the gateway attributes comprise filtering attributes and query attributes, configuring a filtering domain name and a filtering server of the client by using the information agent platform according to the filtering attributes, and creating a parameter filtering interface of the client according to the filtering attributes, the filtering domain name and the filtering server; configuring a query domain name and a query server of the client by using the information agent platform according to the query attribute, and creating a parameter query interface of the client according to the over-query attribute, the query domain name and the query server; and generating a parameter interface of the client according to the parameter filtering interface and the parameter query interface.
The gateway attribute refers to a gateway of a connector and has functions of identification, indication and the like, the filtering domain name refers to an IP address for generating filtering parameters, the filtering server refers to a server for filtering data parameters, the query domain name refers to an IP address for generating query parameters, and the query server refers to a server for adopting and querying data.
Optionally, the gateway attribute of the client is configured by a specific IP address set by a program in the information agent platform, and the filtering domain name of the client obtains the configuration of the filtering server by a server in the information agent platform through an IP address set in the information agent platform, it needs to be explained that, in the present invention, the query domain name of the client and the query server are the same as the filtering domain name and the filtering server configuration principle of the client, and further description is not given here.
S2, inquiring whether the request information corresponding to the information request exists in the information agent platform.
In the embodiment of the invention, whether the request information corresponding to the information request exists or not is inquired from the information agent platform, so that the return mode of the subsequent request information can be determined, and the return efficiency of the request information is ensured.
As an embodiment of the present invention, the querying whether there is request information corresponding to the information request from the information broker platform includes: creating a data query table of the information request in the information agent platform, configuring a query object of the information request in the data query table, indexing query data of the query object from the data query table according to the query object, and if the query data of the query object is indexed from the data query table, the information agent platform has request information corresponding to the information request; and if the query data of the query object is not indexed from the data query table, the information agent platform does not have the request information corresponding to the information request.
The data query table is a data table containing a large number of data parameters, and the query object is the client.
Optionally, the data query table of the information request is created through a limit statement in SQL, the query object of the information request is configured through an end service query window, and the query data of the query object can be completed through a search engine configured by a server.
And S3, if the request information corresponding to the information request exists in the information agent platform, returning the request information to the client.
It should be understood that when request information corresponding to the information request exists in the information agent platform, the request information is in a high-frequency information state, that is, exists in a cache of the information agent platform, so that in the embodiment of the present invention, the request information is returned to the client, so as to implement fast query of data of the information request, reduce query parameters of the information request, and ensure efficiency of information query.
As an embodiment of the present invention, the returning the request information to the client includes: inquiring the transmission address of the information agent platform and the client corresponding to the request information to obtain a first address and a second address, configuring a transmission protocol of the information agent platform and the client, constructing a transmission channel of the information agent platform and the client according to the first address, the second address and the transmission protocol, and returning the request information to the client according to the transmission channel.
The transmission address refers to an IP address for transmitting data parameters, and the transmission protocol refers to a network protocol that needs to be followed in the data transmission process, such as http, UDP, and other protocols.
And S4, if the request information corresponding to the information request does not exist in the information agent platform, inquiring the request total information corresponding to the information request from the back-end service platform according to the parameter inquiry interface.
It should be understood that when the request information corresponding to the information request does not exist in the information agent platform, it indicates that further search request information is needed, and therefore, in the embodiment of the present invention, by querying the request total information corresponding to the information request from the backend service platform according to the parameter query interface, the request information of the client may be searched more comprehensively, and the information request response of the client is ensured, where the request total information refers to all information of an information request object.
As an embodiment of the present invention, the querying, according to the parameter querying interface, total request information corresponding to the information request from the backend service platform includes: and configuring an information query object and an information query condition of the information request according to the parameter query interface, generating an information query statement according to the information query object and the information query condition, and querying the request total information corresponding to the information request from the back-end service platform by using the information query statement.
The information query object is a data demand object for constructing the information request through the parameter query interface, and the information query condition is a condition set by constructing the information request through the parameter query interface, such as a request type, a request range and the like of the information request. Optionally, the information query statement may be created through an SQL programming language.
And S5, performing information filtering on the request full-scale information according to the parameter filtering interface to obtain target information, and returning the target information to the client.
In the embodiment of the invention, the total information is filtered according to the parameter filtering interface, so that the demand information corresponding to the information request can be accurately obtained.
As an embodiment of the present invention, the performing information filtering on the request full-scale information according to the parameter filtering interface to obtain target information includes: and defining a filtering rule of the request full-scale information in the parameter filtering interface, and screening the request full-scale information according to the filtering rule to obtain target information.
The filtering rules refer to filtering policies to be followed by the request full-amount information when the request full-amount information is filtered through the parameter filtering interface, and the filtering policies include filtering logics and filtering modes, the filtering logics refer to filtering conditions specifically required to be set, for example, data with filtering character length larger than 10 is set, and the filtering modes refer to filtering methods specifically required to be executed, for example, script filtering methods are set.
It should be further noted that, in the present invention, the return of the target information is the same as the return principle of the request information in the above-mentioned S3, and is not further described herein.
It can be seen that, in the embodiment of the present invention, firstly, an information request of a client is sent to a back-end service platform corresponding to the client, so as to process the information request through the back-end service platform, guarantee the precondition of entering and exiting the subsequent information request to be simplified, and construct an information agent platform of the back-end service platform, and a parameter interface of the client is configured through the information agent platform, including a parameter filtering interface and a parameter query interface, so that the client parameter interface can provide information for the client, and guarantee the precondition of simplifying interface parameters of the client, and secondly, by querying whether to store request information corresponding to the information request from the information agent platform, the embodiment of the present invention can determine the returning mode of the subsequent request information, and guarantee the returning efficiency of the request information; further, in the embodiment of the present invention, if there is request information corresponding to the information request in the information agent platform and the request information corresponding to the information request does not exist in the information agent platform, the request information corresponding to the information request is queried from the back-end service platform according to the parameter query interface, the request information is filtered according to the parameter filter interface to obtain the target information, and the target information is returned to the client, so as to implement fast query of data of the information request, reduce query parameters of the information request, and ensure efficiency of information query. Therefore, the interface parameter simplification method provided by the embodiment of the invention can realize the simplification of the interface parameters and improve the data request efficiency of the interface.
Fig. 2 is a functional block diagram of the interface parameter reduction apparatus according to the present invention.
The interface parameter reduction apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the interface parameter reduction device may include a parameter interface configuration device module 101, a request information query module 102, a request information return module 103, a full information query module 104, and a target information return module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform a fixed function, and is stored in a memory of the electronic device.
In the present embodiment, the functions of the respective modules/units are as follows:
the parameter interface configuration module 101 is configured to obtain an information request sent by a client, send the information request to a back-end service platform corresponding to the client, and construct an information agent platform of the background service platform, so as to configure a parameter interface of the client through the information agent platform, where the parameter interface includes a parameter filtering interface and a parameter query interface;
the request information query module 102 is configured to query whether request information corresponding to the information request exists in the information agent platform;
the request information returning module 103 is configured to return the request information to the client when the request information corresponding to the information request exists in the information agent platform;
the total information query module 104 is configured to query, according to the parameter query interface, the request total information corresponding to the information request from the back-end service platform when the request information corresponding to the information request does not exist in the information agent platform;
and the target information returning module 105 is configured to perform information filtering on the request full-scale information according to the parameter filtering interface to obtain target information, and return the target information to the client.
In detail, when the modules in the interface parameter reduction apparatus 100 according to the embodiment of the present invention are used, the same technical means as the interface parameter reduction method described in fig. 1 are used, and the same technical effect can be produced, which is not described herein again.
Fig. 3 is a schematic structural diagram of an electronic device 1 for implementing the interface parameter reduction method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an interface parameter reduction program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the electronic device 1 by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, executing an interface parameter reduction program) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of interface parameter reduction programs, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device 1 and other devices, and includes a network interface and an employee interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices 1. The employee interface may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally 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 device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visual staff interface.
Fig. 3 shows only the electronic device 1 with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are for illustrative purposes only and that the scope of the claimed invention is not limited to this configuration.
The interface parameter reduction program stored in the memory 11 of the electronic device 1 is a combination of computer programs, which when executed in the processor 10, can implement:
acquiring an information request sent by a client, sending the information request to a back-end service platform corresponding to the client, and constructing an information agent platform of a background service platform so as to configure a parameter interface of the client through the information agent platform, wherein the parameter interface comprises a parameter filtering interface and a parameter query interface;
inquiring whether request information corresponding to the information request exists in the information agent platform;
if the request information corresponding to the information request exists in the information agent platform, returning the request information to the client;
if the request information corresponding to the information request does not exist in the information agent platform, inquiring the request total information corresponding to the information request from the back-end service platform according to the parameter inquiry interface;
and according to the parameter filtering interface, performing information filtering on the request full-scale information to obtain target information, and returning the target information to the client.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device 1, may implement:
acquiring an information request sent by a client, sending the information request to a back-end service platform corresponding to the client, and constructing an information agent platform of the back-end service platform so as to configure a parameter interface of the client through the information agent platform, wherein the parameter interface comprises a parameter filtering interface and a parameter query interface;
inquiring whether request information corresponding to the information request exists in the information agent platform;
if the request information corresponding to the information request exists in the information agent platform, returning the request information to the client;
if the request information corresponding to the information request does not exist in the information agent platform, inquiring the request total information corresponding to the information request from the back-end service platform according to the parameter inquiry interface;
and according to the parameter filtering interface, performing information filtering on the request full-scale information to obtain target information, and returning the target information to the client.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
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 attributes 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.
The embodiment of the invention can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.