[go: up one dir, main page]

CN112558950A - System interface generation method and device - Google Patents

System interface generation method and device Download PDF

Info

Publication number
CN112558950A
CN112558950A CN202011520955.1A CN202011520955A CN112558950A CN 112558950 A CN112558950 A CN 112558950A CN 202011520955 A CN202011520955 A CN 202011520955A CN 112558950 A CN112558950 A CN 112558950A
Authority
CN
China
Prior art keywords
interface
generation request
interface generation
query
parameter
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
CN202011520955.1A
Other languages
Chinese (zh)
Other versions
CN112558950B (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.)
Beijing Soufun Science & Technology Development Co ltd
Original Assignee
Beijing Soufun Science & Technology Development 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 Beijing Soufun Science & Technology Development Co ltd filed Critical Beijing Soufun Science & Technology Development Co ltd
Priority to CN202011520955.1A priority Critical patent/CN112558950B/en
Publication of CN112558950A publication Critical patent/CN112558950A/en
Application granted granted Critical
Publication of CN112558950B publication Critical patent/CN112558950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a system interface generation method and a system interface generation device, wherein the method comprises the following steps: when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition; under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request; analyzing the query statement to obtain a query parameter in the query statement; acquiring a result set corresponding to the query parameter; mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set; and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object. By applying the method provided by the invention, the interface generation code of the system interface to be generated can be obtained so as to generate the system interface, the system interface does not need to be repeated, and the development efficiency is improved.

Description

System interface generation method and device
Technical Field
The invention relates to the technical field of computer application, in particular to a system interface generation method and device.
Background
With the rapid development of computer technology, software developers develop various application programs, and the various application programs enable people to live more conveniently and more colorful. During the development of an application program project, a software developer usually needs to develop a large number of system interfaces to implement different system functions.
In the prior art, in order to meet project requirements, an application system usually needs to be continuously adjusted and optimized, and in the process of changing the system functions related to changes, repeated development of a large number of system interfaces is often involved, so that development efficiency is low.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a system interface generation method, which can acquire a transmission object of a system interface to be generated so as to generate the system interface and improve the development efficiency.
The invention also provides a system interface generating device which is used for ensuring the realization and the application of the method in practice.
A system interface generation method comprises the following steps:
when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition;
under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request;
analyzing the query statement to obtain a query parameter in the query statement;
acquiring a result set corresponding to the query parameter;
mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set;
and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object.
Optionally, the determining the format of the return object and the query statement corresponding to the interface generation request includes:
acquiring an interface identifier contained in the interface generation request;
determining an interface information table corresponding to the interface identifier;
and determining a return object format and a query statement corresponding to the interface generation request based on the interface information table.
Optionally, the obtaining of the result set corresponding to the query parameter includes:
determining a data source corresponding to the query parameter;
acquiring a code query result of the query parameter in the data source;
and forming each code query result into a result set corresponding to the query parameter.
Optionally, the method for determining whether the interface generation request meets a preset interception condition includes:
acquiring an interface identifier and an input parameter contained in the interface generation request;
judging whether the input parameters meet parameter input rules corresponding to the interface identification or not based on a preset configuration file;
if the input parameter meets the parameter input rule corresponding to the interface identifier, determining that the interface generation request does not meet a preset interception condition;
and if the input parameters do not meet the parameter input rules corresponding to the interface identification, determining that the interface generation request meets the preset interception conditions.
Optionally, the method for determining whether the interface generation request meets a preset interception condition includes:
determining a calling object and an interface identifier corresponding to the interface generation request;
judging whether the calling object has an operation authority corresponding to the interface identifier;
if the calling object has the interface operation authority corresponding to the interface identifier, judging that the interface generation does not meet the interception condition;
and if the calling object does not have the interface operation authority corresponding to the interface identifier, judging that the interface generation request meets the interception condition.
Optionally, in the method, after the sending the transmission object to the call object corresponding to the interface generation request, the method further includes:
and sending a prompt message to the calling object to prompt the calling object to request successfully.
A system interface generation apparatus comprising:
the receiving unit is used for judging whether an interface generation request sent by a calling object meets a preset interception condition or not when the interface generation request is received;
the determining unit is used for determining a return object format and a query statement corresponding to the interface generation request under the condition that the interface generation request does not meet the interception condition;
the analysis unit is used for analyzing the query statement to obtain a query parameter in the query statement;
the acquisition unit is used for acquiring a result set corresponding to the query parameter;
the mapping unit is used for mapping the result set according to the mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set;
and the sending unit is used for sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object.
The above apparatus, optionally, the determining unit includes:
the first obtaining subunit is configured to obtain an interface identifier included in the interface generation request;
the first determining subunit is used for determining an interface information table corresponding to the interface identifier;
and the second determining subunit is used for determining the return object format and the query statement corresponding to the interface generation request based on the interface information table.
The above apparatus, optionally, the obtaining unit includes:
a third determining subunit, configured to determine a data source corresponding to the query parameter;
the second acquisition subunit is used for acquiring the code query result of the query parameter from the data source;
and the execution subunit is used for forming each code query result into a result set corresponding to the query parameter.
Optionally, the above apparatus, where the receiving unit that determines whether the interface generation request meets a preset interception condition includes:
the third acquiring subunit is configured to acquire the interface identifier and the input parameter included in the interface generation request;
the judging subunit is used for judging whether the input parameters meet the parameter input rules corresponding to the interface identifiers or not based on a preset configuration file;
a fourth determining subunit, configured to determine that the interface generation request does not meet a preset interception condition if the input parameter meets a parameter input rule corresponding to the interface identifier;
and the fifth determining subunit is configured to determine that the interface generation request satisfies a preset interception condition if the input parameter does not satisfy the parameter input rule corresponding to the interface identifier.
Compared with the prior art, the invention has the following advantages:
the invention provides a system interface generation method and a system interface generation device, wherein the method comprises the following steps: when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition; under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request; analyzing the query statement to obtain a query parameter in the query statement; acquiring a result set corresponding to the query parameter; mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set; and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object. By applying the method provided by the invention, the interface generation code of the system interface to be generated can be obtained so as to generate the system interface, the system interface does not need to be repeated, and the development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for generating a system interface according to the present invention;
FIG. 2 is a flowchart of a method for determining a return object format and a query statement corresponding to an interface generation request according to the present invention;
FIG. 3 is a flowchart of a method for obtaining a result set corresponding to a query parameter according to the present invention;
FIG. 4 is a flowchart of a process for determining whether an interface generation request satisfies an interception condition according to the present invention;
FIG. 5 is a diagram illustrating a system interface generating method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a system interface generating apparatus provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
An embodiment of the present invention provides a system interface generating method, which may be applied to an electronic device, where the electronic device may be a computer terminal or various mobile devices, and a flowchart of the method is shown in fig. 1, and specifically includes:
s101: when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition.
In the method provided by the embodiment of the present invention, when the calling object has a requirement for generating a system interface, the system interface to be generated is determined, and a corresponding interface generation request is sent based on the interface identifier of the interface to be generated, the calling object may be an interface development device, and the interface development device and the electronic device are the same device or different devices.
Specifically, in a feasible manner, whether the interface generation request meets the interception condition may be determined based on the operation authority of the call object.
In another feasible manner, it may be determined whether the input parameter included in the interface generation request is the input parameter specified by the interface identifier based on a preset configuration file, if so, it is determined that the interface generation request does not satisfy the interception condition, otherwise, it is determined that the interface generation request satisfies the interception condition.
In another feasible manner, whether the interface generation request meets the interception condition may be further determined based on a load condition of the current electronic device, and if the current load condition indicates that the electronic device has sufficient service resources to respond to the interface generation request, it may be determined that the interface generation request does not meet the interception condition, otherwise, it is determined that the interface generation request meets the interception condition.
The interface generation request may include an interface identifier of the interface to be generated.
S102: and under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request.
The interface generation request may include an interface identifier, and the return object format and the query statement corresponding to the interface generation request may be determined based on the interface identifier of the interface generation request, specifically, an initial query statement corresponding to the interface identifier may be determined, and the initial query parameter in the initial query statement is assigned based on the input parameter included in the interface generation request, so as to obtain the query statement corresponding to the interface generation request.
In the method provided by the embodiment of the present invention, when the interface generation request meets the interception condition, the interface generation request is intercepted, and after the interface generation request is intercepted, a notification message that rejects the interface generation request may be sent to a calling object.
S103: and analyzing the query statement to obtain the query parameters in the query statement.
In the method provided by the embodiment of the present invention, the query statement may be specifically analyzed to complete decomposition of the query statement, obtain a plurality of fields, and determine the query parameter field in the plurality of fields, thereby obtaining the query parameter in the query parameter field, where the query parameter may be one or more.
S104: and acquiring a result set corresponding to the query parameters.
In the method provided by the embodiment of the present invention, each query parameter corresponds to one or more query result fields, the result set is composed of the query result fields corresponding to the one or more query parameters, and the query result fields may be code fields.
S105: and mapping the result set according to the mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set.
In the method provided by the embodiment of the present invention, the result set is mapped according to the mapping mode corresponding to the format of the returned object, so as to perform format processing on the result set, thereby obtaining the transmission object in the format of the returned object, where the transmission object may include an interface generation code composed of a plurality of code fields.
S106: and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object.
In the method provided by the embodiment of the invention, the transmission object is sent to the calling object, and a system interface can be generated based on the interface generation code contained in the transmission object.
The embodiment of the invention provides a system interface generation method, which comprises the following steps: when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition; under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request; analyzing the query statement to obtain a query parameter in the query statement; acquiring a result set corresponding to the query parameter; mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set; and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object. By applying the method provided by the invention, the interface generation code of the system interface to be generated can be obtained so as to generate the system interface, the system interface does not need to be repeated, and the development efficiency is improved.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, the determining the return object format and the query statement corresponding to the interface generation request includes, as shown in fig. 2:
s201: and acquiring an interface identifier contained in the interface generation request.
In the method provided by the embodiment of the present invention, the interface identifier may be an interface name.
S202: and determining an interface information table corresponding to the interface identifier.
In the method provided by the embodiment of the present invention, the interface information table corresponding to the interface identifier may be determined in a preset interface information table set.
The corresponding relation between the interface identification, the return object format and the query statement is recorded in the interface information table.
S203: and determining a return object format and a query statement corresponding to the interface generation request based on the interface information table.
Optionally, the return object format and the initial query statement corresponding to the interface identifier are obtained from the interface information table, and the initial query parameter in the initial query statement is assigned based on the input parameter included in the interface generation request, so as to obtain the query statement corresponding to the interface generation request.
Optionally, the returned object format may define a combination rule of each field, and the combination rule of each field may determine a mapping manner corresponding to the returned object format.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, the obtaining of the result set corresponding to the query parameter includes, as shown in fig. 3:
s301: and determining a data source corresponding to the query parameter.
In the method provided by the embodiment of the invention, the data source corresponding to the query parameter is determined based on the data source field in the query statement.
Alternatively, the data source may be a database or a storage table, etc.
S302: and acquiring a code query result of the query parameter in the data source.
In the method provided by the embodiment of the invention, the data source is traversed to obtain the code query result of the query parameter.
Optionally, the query parameter may be one or more, and each query parameter may correspond to at least one query result.
S303: and forming each code query result into a result set corresponding to the query parameter.
In the method provided by the embodiment of the present invention, a result set may be formed from each code query result of each query parameter, the result set includes the code query result of each query parameter, and the code query result may be a code field.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, a feasible manner for determining whether the interface generation request meets a preset interception condition may include, as shown in fig. 4:
s401: and acquiring an interface identifier and an input parameter contained in the interface generation request.
In the method provided by the embodiment of the present invention, the interface generation request includes an interface identifier and an input parameter.
S402: and judging whether the input parameters meet the parameter input rule corresponding to the interface identifier or not based on a preset configuration file, if so, executing S403, and if not, executing S404.
In the method provided by the embodiment of the present invention, a parameter input rule corresponding to the interface identifier may be recorded in the configuration file, and based on the parameter input rule, it may be determined whether the input parameter is an input parameter specified by the interface identifier, and the like, if at least one of the format, the type, and the number of the input parameter does not satisfy the parameter input rule of the interface identifier, it is determined that the input parameter is not an input parameter specified by the interface identifier, if the format, the type, and the number of the input parameter all satisfy the parameter input rule of the interface identifier, it is determined that the input parameter is an input parameter specified by the interface identifier, if the input parameter is an input parameter specified by the interface identifier, the interface generation request is not intercepted, and if the input parameter is not an input parameter specified by the interface identifier, the interface generation request is intercepted.
S403: and determining that the interface generation request does not meet the preset interception condition.
S404: and determining that the interface generation request meets a preset interception condition.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, another feasible way of determining whether the interface generation request meets a preset interception condition includes:
and determining a calling object and an interface identifier corresponding to the interface generation request.
And judging whether the calling object has the operation authority corresponding to the interface identifier.
If the calling object has the interface operation authority corresponding to the interface identifier, judging that the interface generation does not meet the interception condition.
And if the calling object does not have the interface operation authority corresponding to the interface identifier, judging that the interface generation request meets the interception condition.
Optionally, it may be determined whether the call object has an operation right corresponding to the interface identifier based on object information of the call object, where the object information may include one or more of the object identifier and the right information of the call object.
Optionally, a preset object permission table may be traversed to determine whether the object permission table records the object identifier of the call object, and also determine a permission level of the operation permission of the call object, and determine whether the permission level is greater than a level threshold corresponding to the interface identifier.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, after the sending the transmission object to the call object corresponding to the interface generation request, the method further includes:
and sending a prompt message to the calling object to prompt the calling object to request successfully.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, the transmission object may be cached, and within a preset time period, if the interface generation request corresponding to the interface identifier is received again, the transmission object may be transmitted to the call object, and after caching for a certain time period, the transmission object may be deleted.
After receiving an interface generation request, under the condition that the interface generation request does not satisfy the interception condition, determining whether a transmission object corresponding to an interface identifier of the interface generation request exists in a cache or not, if so, transmitting the transmission object to a calling object, and if not, determining a return object format and an inquiry statement corresponding to the interface generation request, and performing a subsequent process.
In the method provided by the embodiment of the invention, in some application scenarios, an interface information table may be designed first, the interface information table defines an interface address, a returned object format, and a query statement, and the query statement may be an sql statement.
A generic logic can be developed that queries or updates data through sql statements.
After the query statement is obtained, the query statement is executed to obtain a result set corresponding to the query statement.
Specifically, the sql statement may be decomposed, and a field corresponding to the WHERE condition is used as an input field; a field corresponding to the SELECT is a return field, referring to fig. 5, which is an exemplary diagram provided in the embodiment of the present invention and illustrates a decomposition process of an sql statement, WHERE the sql statement may be "SELECT a, b, c.. FROM table WHERE b and c are xx", WHERE b and c are entry parameters, that is, query parameters, and an output field may be an identifier, short message data, and the like. The identifier is used for indicating that the query result is successful or failed, and the data comprises a query result field.
Mapping a result set ResultSet inquired in a database into a transmission object; the ResultSet result set is an object returned by the query results in the data, and the result set is an object storing the query results.
And returning the transmission object to the calling object to complete calling, wherein the calling object obtains codes required by generating the interface based on the transmission object and generates a corresponding system interface.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a system interface generating device, which is used for implementing the method in fig. 1 specifically, the system interface generating device provided in the embodiment of the present invention may be applied to an electronic device, where the electronic device is a computer terminal or various mobile devices, and a schematic structural diagram of the electronic device is shown in fig. 6, and specifically includes:
a receiving unit 501, configured to, when an interface generation request sent by a call object is received, determine whether the interface generation request meets a preset interception condition;
a determining unit 502, configured to determine a return object format and a query statement corresponding to the interface generation request when the interface generation request does not satisfy the interception condition;
an analyzing unit 503, configured to analyze the query statement to obtain a query parameter in the query statement;
an obtaining unit 504, configured to obtain a result set corresponding to the query parameter;
a mapping unit 505, configured to map the result set according to a mapping manner corresponding to the returned object format, so as to obtain a transmission object corresponding to the result set;
a sending unit 506, configured to send the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object.
The embodiment of the invention provides a system interface generation device, which judges whether an interface generation request meets a preset interception condition or not when receiving the interface generation request sent by a calling object; under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request; analyzing the query statement to obtain a query parameter in the query statement; acquiring a result set corresponding to the query parameter; mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set; and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object. By applying the method provided by the invention, the interface generation code of the system interface to be generated can be obtained so as to generate the system interface, the system interface does not need to be repeated, and the development efficiency is improved.
In an embodiment provided by the present invention, based on the above scheme, specifically, the determining unit 502 includes:
the first obtaining subunit is configured to obtain an interface identifier included in the interface generation request;
the first determining subunit is used for determining an interface information table corresponding to the interface identifier;
and the second determining subunit is used for determining the return object format and the query statement corresponding to the interface generation request based on the interface information table.
In another embodiment provided by the present invention, based on the above scheme, specifically, the obtaining unit 504 includes:
a third determining subunit, configured to determine a data source corresponding to the query parameter;
the second acquisition subunit is used for acquiring the code query result of the query parameter from the data source;
and the execution subunit is used for forming each code query result into a result set corresponding to the query parameter.
In another embodiment provided by the present invention, based on the above scheme, specifically, the receiving unit 501 for determining whether the interface generation request meets a preset interception condition includes:
the third acquiring subunit is configured to acquire the interface identifier and the input parameter included in the interface generation request;
the judging subunit is used for judging whether the input parameters meet the parameter input rules corresponding to the interface identifiers or not based on a preset configuration file;
a fourth determining subunit, configured to determine that the interface generation request does not meet a preset interception condition if the input parameter meets a parameter input rule corresponding to the interface identifier;
and the fifth determining subunit is configured to determine that the interface generation request satisfies a preset interception condition if the input parameter does not satisfy the parameter input rule corresponding to the interface identifier.
In another embodiment provided by the present invention, based on the above scheme, specifically, the receiving unit 501 for determining whether the interface generation request meets a preset interception condition includes:
a sixth determining subunit, configured to determine a call object and an interface identifier corresponding to the interface generation request;
the second judging subunit is used for judging whether the calling object has the operation authority corresponding to the interface identifier;
the first judgment subunit is configured to judge that the interface generation does not satisfy the interception condition if the calling object has the interface operation permission corresponding to the interface identifier;
and the second judging subunit is configured to judge that the interface generation request meets the interception condition if the calling object does not have the interface operation permission corresponding to the interface identifier.
In another embodiment provided by the present invention, based on the above scheme, specifically, the system interface generating device further includes a prompt unit;
and the prompting unit is used for sending a prompting message to the calling object so as to prompt the calling object to request successfully.
The specific principle and the implementation process of each unit and module in the system interface generating device disclosed in the embodiment of the present invention are the same as those of the system interface generating method disclosed in the embodiment of the present invention, and reference may be made to corresponding parts in the system interface generating method provided in the embodiment of the present invention, which are not described herein again.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The above detailed description is provided for the system interface generation method provided by the present invention, and a specific example is applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A system interface generation method, comprising:
when an interface generation request sent by a calling object is received, judging whether the interface generation request meets a preset interception condition;
under the condition that the interface generation request does not meet the interception condition, determining a return object format and a query statement corresponding to the interface generation request;
analyzing the query statement to obtain a query parameter in the query statement;
acquiring a result set corresponding to the query parameter;
mapping the result set according to a mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set;
and sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface based on the transmission object.
2. The method of claim 1, wherein determining the return object format and the query statement corresponding to the interface generation request comprises:
acquiring an interface identifier contained in the interface generation request;
determining an interface information table corresponding to the interface identifier;
and determining a return object format and a query statement corresponding to the interface generation request based on the interface information table.
3. The method of claim 1, wherein the obtaining the result set corresponding to the query parameter comprises:
determining a data source corresponding to the query parameter;
acquiring a code query result of the query parameter in the data source;
and forming each code query result into a result set corresponding to the query parameter.
4. The method according to claim 1, wherein the determining whether the interface generation request meets a preset interception condition includes:
acquiring an interface identifier and an input parameter contained in the interface generation request;
judging whether the input parameters meet parameter input rules corresponding to the interface identification or not based on a preset configuration file;
if the input parameter meets the parameter input rule corresponding to the interface identifier, determining that the interface generation request does not meet a preset interception condition;
and if the input parameters do not meet the parameter input rules corresponding to the interface identification, determining that the interface generation request meets the preset interception conditions.
5. The method according to claim 1, wherein the determining whether the interface generation request meets a preset interception condition includes:
determining a calling object and an interface identifier corresponding to the interface generation request;
judging whether the calling object has an operation authority corresponding to the interface identifier;
if the calling object has the interface operation authority corresponding to the interface identifier, judging that the interface generation does not meet the interception condition;
and if the calling object does not have the interface operation authority corresponding to the interface identifier, judging that the interface generation request meets the interception condition.
6. The method according to claim 1, wherein after sending the transmission object to the call object corresponding to the interface generation request, further comprising:
and sending a prompt message to the calling object to prompt the calling object to request successfully.
7. A system interface generating apparatus, comprising:
the receiving unit is used for judging whether an interface generation request sent by a calling object meets a preset interception condition or not when the interface generation request is received;
the determining unit is used for determining a return object format and a query statement corresponding to the interface generation request under the condition that the interface generation request does not meet the interception condition;
the analysis unit is used for analyzing the query statement to obtain a query parameter in the query statement;
the acquisition unit is used for acquiring a result set corresponding to the query parameter;
the mapping unit is used for mapping the result set according to the mapping mode corresponding to the returned object format to obtain a transmission object corresponding to the result set;
and the sending unit is used for sending the transmission object to a calling object corresponding to the interface generation request, so that the calling object generates a system interface corresponding to the transmission object.
8. The apparatus of claim 7, wherein the determining unit comprises:
the first obtaining subunit is configured to obtain an interface identifier included in the interface generation request;
the first determining subunit is used for determining an interface information table corresponding to the interface identifier;
and the second determining subunit is used for determining the return object format and the query statement corresponding to the interface generation request based on the interface information table.
9. The apparatus of claim 7, wherein the obtaining unit comprises:
a third determining subunit, configured to determine a data source corresponding to the query parameter;
the second acquisition subunit is used for acquiring the code query result of the query parameter from the data source;
and the execution subunit is used for forming each code query result into a result set corresponding to the query parameter.
10. The apparatus according to claim 7, wherein the receiving unit that determines whether the interface generation request satisfies a preset interception condition comprises:
the third acquiring subunit is configured to acquire the interface identifier and the input parameter included in the interface generation request;
the judging subunit is used for judging whether the input parameters meet the parameter input rules corresponding to the interface identifiers or not based on a preset configuration file;
a fourth determining subunit, configured to determine that the interface generation request does not meet a preset interception condition if the input parameter meets a parameter input rule corresponding to the interface identifier;
and the fifth determining subunit is configured to determine that the interface generation request satisfies a preset interception condition if the input parameter does not satisfy the parameter input rule corresponding to the interface identifier.
CN202011520955.1A 2020-12-21 2020-12-21 System interface generation method and device Active CN112558950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011520955.1A CN112558950B (en) 2020-12-21 2020-12-21 System interface generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011520955.1A CN112558950B (en) 2020-12-21 2020-12-21 System interface generation method and device

Publications (2)

Publication Number Publication Date
CN112558950A true CN112558950A (en) 2021-03-26
CN112558950B CN112558950B (en) 2024-08-02

Family

ID=75032055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011520955.1A Active CN112558950B (en) 2020-12-21 2020-12-21 System interface generation method and device

Country Status (1)

Country Link
CN (1) CN112558950B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116996493A (en) * 2023-09-27 2023-11-03 国网北京市电力公司 Request methods, systems, equipment and media for the artificial intelligence platform operating interface

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373536A (en) * 2014-08-19 2016-03-02 阿里巴巴集团控股有限公司 DAO interface realizing method and device
CN109857479A (en) * 2018-12-14 2019-06-07 平安科技(深圳)有限公司 Interface data processing method, device, computer equipment and storage medium
CN110083650A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of data-query interfaces automatic generation method and system based on metadata self-discovery
CN110515608A (en) * 2019-08-30 2019-11-29 网易(杭州)网络有限公司 A kind of generation method and device, electronic equipment, storage medium of interface code
CN110990011A (en) * 2019-12-06 2020-04-10 重庆邮电大学 Data request method of automation interface
CN111104421A (en) * 2019-12-31 2020-05-05 新奥数能科技有限公司 Data query method and device based on data interface standard configuration
CN111259037A (en) * 2020-01-14 2020-06-09 重庆特斯联智慧科技股份有限公司 A data query method, device, storage medium and terminal based on rule configuration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373536A (en) * 2014-08-19 2016-03-02 阿里巴巴集团控股有限公司 DAO interface realizing method and device
CN109857479A (en) * 2018-12-14 2019-06-07 平安科技(深圳)有限公司 Interface data processing method, device, computer equipment and storage medium
CN110083650A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of data-query interfaces automatic generation method and system based on metadata self-discovery
CN110515608A (en) * 2019-08-30 2019-11-29 网易(杭州)网络有限公司 A kind of generation method and device, electronic equipment, storage medium of interface code
CN110990011A (en) * 2019-12-06 2020-04-10 重庆邮电大学 Data request method of automation interface
CN111104421A (en) * 2019-12-31 2020-05-05 新奥数能科技有限公司 Data query method and device based on data interface standard configuration
CN111259037A (en) * 2020-01-14 2020-06-09 重庆特斯联智慧科技股份有限公司 A data query method, device, storage medium and terminal based on rule configuration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘素芳: "基于数据访问中间件的移动审批框架模型研究", 福建农机, no. 04, 30 December 2014 (2014-12-30), pages 51 - 54 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116996493A (en) * 2023-09-27 2023-11-03 国网北京市电力公司 Request methods, systems, equipment and media for the artificial intelligence platform operating interface
CN116996493B (en) * 2023-09-27 2024-01-23 国网北京市电力公司 Method, system, equipment and medium for requesting operation interface of artificial intelligent platform

Also Published As

Publication number Publication date
CN112558950B (en) 2024-08-02

Similar Documents

Publication Publication Date Title
CN110798380B (en) Data acquisition method, system, device, test equipment and test server
CN110795485A (en) Database access method, device and equipment
CN112948138B (en) A method and device for processing messages
CN109450969B (en) Method and device for acquiring data from third-party data source server and server
CN112579997B (en) User permission configuration method and device, computer equipment and storage medium
CN111563015A (en) Data monitoring method and device, computer readable medium and terminal equipment
CN111694620B (en) Interaction method, device and equipment of third party service and computer storage medium
CN113067853A (en) Data pushing method and device, electronic equipment and storage medium
CN111090434B (en) Page display method and device for custom column
CN116523457A (en) Workflow processing method, device, equipment and storage medium based on business process
CN117632994A (en) Data query method, data query device, electronic equipment and storage medium
CN108255967B (en) Method and device for calling storage process, storage medium and terminal
CN112558950B (en) System interface generation method and device
CN112560025A (en) Interface permission detection method, device, medium and electronic equipment
CN114390457B (en) Short message verification method, device, equipment and storage medium
CN108255672B (en) Data verification method and device, storage medium and electronic equipment
CN111078571B (en) Test method for analog response, terminal equipment and computer readable storage medium
CN113901153A (en) Data processing method and related equipment
CN113691618A (en) Message notification method, device, message center and storage medium
CN116561755A (en) Vulnerability detection method and device of cloud API, computer equipment and storage medium
CN116974653B (en) Class loading method and system
CN113535780A (en) User request processing method and device, computer equipment and storage medium
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
CN111061543A (en) Multi-tenant workflow engine service method, device and server
CN119149558A (en) Distributed database sharding key updating method, device, equipment and medium

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