CN110569064A - interface identifier generation method, device, equipment and storage medium - Google Patents
interface identifier generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110569064A CN110569064A CN201910829029.3A CN201910829029A CN110569064A CN 110569064 A CN110569064 A CN 110569064A CN 201910829029 A CN201910829029 A CN 201910829029A CN 110569064 A CN110569064 A CN 110569064A
- Authority
- CN
- China
- Prior art keywords
- parameter
- interface
- identifier
- parameter information
- interface identifier
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
The disclosure relates to an interface identifier generation method, an interface identifier generation device, interface identifier generation equipment and a storage medium, and relates to the technical field of internet. The method comprises the following steps: acquiring input first parameter information based on a displayed parameter setting interface, wherein the first parameter information is used for indicating first target data to be acquired; sending an interface identifier generation request to a server, wherein the interface identifier generation request carries first parameter information, the server distributes parameter identifiers for the first parameter information, a target interface identifier is generated according to the template interface identifier and the parameter identifiers of the template interface, and the target interface identifier is sent to a terminal; and receiving the target interface identification sent by the server. The front-end developer only needs to set the first parameter information on the parameter setting interface, does not need to establish a text document, and inputs the first target data in the text document. In addition, the scheme has universality, and front-end developers can set any parameter information on the parameter setting interface according to requirements.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating an interface identifier.
Background
Project development includes front-end development and back-end development. To speed up the development process, front-end development and back-end development may be performed in parallel. The front-end development depends on data provided by the back-end, and if the back-end does not develop a corresponding interface, the front-end cannot acquire the data through the interface, so that the development progress of the front-end is influenced.
In the related art, a front-end developer needs to create a text document on a terminal, manually input data to be acquired in the text document, and create an interface on the terminal, through which the text document is linked. When the interface is called subsequently, the data in the text document can be acquired.
However, the front-end developer must create a text document in which the data to be acquired is manually input, and therefore, the solution is time-consuming and labor-consuming, and the development cost is increased.
Disclosure of Invention
The present disclosure provides an interface identifier generation method, apparatus, device, and storage medium, to at least solve the problem of relatively high development cost in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an interface identifier generating method, including:
Acquiring input first parameter information based on a displayed parameter setting interface, wherein the first parameter information is used for indicating first target data to be acquired;
Sending an interface identifier generation request to a server, wherein the interface identifier generation request carries the first parameter information, the server distributes parameter identifiers for the first parameter information, a target interface identifier is generated according to the template interface identifier of the template interface and the parameter identifiers, and the target interface identifier is sent to a terminal;
And receiving the target interface identification sent by the server.
In one possible implementation, after the receiving the target interface identifier sent by the server, the method further includes:
Sending a target interface access request to the server, wherein the target interface access request carries the target interface identifier, the server acquires the first parameter information corresponding to the parameter identifier based on the target interface identifier, generates the first target data based on the first parameter information, and sends the first target data to the terminal;
And receiving the first target data sent by the server.
In one possible implementation, the parameter information includes at least one of a name parameter or a type parameter.
In one possible implementation, the parameter setting interface includes at least one of:
the system comprises at least one name parameter input box, a name parameter input box and a name parameter output box, wherein the name parameter input box is used for acquiring input name parameters;
And the type parameter input box is used for acquiring the input type parameters.
In one possible implementation, after the receiving the target interface identifier sent by the server, the method further includes:
acquiring input second parameter information based on the displayed parameter setting interface, wherein the second parameter information is used for indicating second target data to be acquired;
Sending a parameter updating request to the server, wherein the parameter updating request carries the target interface identifier and the second parameter information, and the server replaces the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
In one possible implementation manner, the acquiring the input first parameter information based on the displayed parameter setting interface includes:
And when the triggering operation of the completion option is detected, acquiring the input first parameter information.
according to a second aspect of the embodiments of the present disclosure, there is provided an interface identifier generating method, including:
receiving an interface identifier generation request sent by a terminal, wherein the interface identifier generation request carries first parameter information, and the first parameter information is used for indicating first target data to be acquired;
Distributing parameter identification to the first parameter information;
generating a target interface identifier according to the template interface identifier of the template interface and the parameter identifier;
and sending the target interface identifier to the terminal.
In one possible implementation manner, the allocating a parameter identifier to the first parameter information includes:
Adding 1 to the number of the existing parameter information in the database to serve as a parameter identifier corresponding to the first parameter information;
And correspondingly storing the first parameter information and the parameter identification into a database, wherein a main key of the database is used for storing the parameter identification.
In one possible implementation manner, the generating a target interface identifier according to the template interface identifier of the template interface and the parameter identifier includes:
and adding the parameter identifier after the address link of the template interface to obtain the target interface identifier.
in a possible implementation manner, after the sending the interface identifier of the target interface to the terminal, the method further includes:
receiving a target interface access request sent by the terminal, wherein the target interface access request carries the target interface identifier;
Acquiring the first parameter information corresponding to the parameter identification based on the target interface identification;
Generating the first target data based on the first parameter information;
and sending the first target data to the terminal.
In one possible implementation manner, after the sending the interface identifier of the target interface to the terminal, the method further includes:
Receiving a parameter updating request sent by a terminal, wherein the parameter updating request carries the target interface identifier and second parameter information, and the second parameter information is used for indicating new target data to be acquired;
And replacing the first parameter information corresponding to the parameter identification with the second parameter information based on the target interface identification.
According to a third aspect of the embodiments of the present disclosure, there is provided an interface identifier generating apparatus, including:
A first acquisition unit configured to execute a parameter setting interface based on display, and acquire input first parameter information indicating first target data to be acquired;
the first sending unit is configured to execute sending of an interface identifier generation request to a server, the interface identifier generation request carries the first parameter information, the server distributes a parameter identifier to the first parameter information, a target interface identifier is generated according to a template interface identifier of a template interface and the parameter identifier, and the target interface identifier is sent to a terminal;
A first receiving unit configured to perform receiving the target interface identifier sent by the server.
in one possible implementation, the apparatus further includes:
a second sending unit, configured to execute sending of a target interface access request to the server, where the target interface access request carries the target interface identifier, and the server obtains the first parameter information corresponding to the parameter identifier based on the target interface identifier, generates the first target data based on the first parameter information, and sends the first target data to the terminal;
A second receiving unit configured to perform receiving the first target data transmitted by the server.
In one possible implementation, the parameter information includes at least one of a name parameter or a type parameter.
In one possible implementation, the parameter setting interface includes at least one of:
The system comprises at least one name parameter input box, a name parameter input box and a name parameter output box, wherein the name parameter input box is used for acquiring input name parameters;
And the type parameter input box is used for acquiring the input type parameters.
in one possible implementation, the apparatus further includes:
A second acquisition unit configured to execute acquiring, based on the displayed parameter setting interface, input second parameter information indicating second target data to be acquired;
A third sending unit, configured to execute sending of a parameter update request to the server, where the parameter update request carries the target interface identifier and the second parameter information, and the server replaces the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
In a possible implementation manner, the parameter setting interface includes a completion option, and the first obtaining unit is configured to obtain the input first parameter information when a trigger operation on the completion option is detected.
according to a fourth aspect of the embodiments of the present disclosure, there is provided an interface identifier generating apparatus, including:
The first receiving unit is configured to execute an interface identifier generation request sent by a receiving terminal, wherein the interface identifier generation request carries first parameter information, and the first parameter information is used for indicating first target data to be acquired;
an allocation unit configured to perform allocation of a parameter identification to the first parameter information;
The first generation unit is configured to execute generation of a target interface identifier according to a template interface identifier of a template interface and the parameter identifier;
A first sending unit configured to execute sending the target interface identifier to the terminal.
In one possible implementation, the allocation unit includes:
the allocation subunit is configured to perform adding 1 to the number of the existing parameter information in the database as the parameter identifier corresponding to the first parameter;
the storage subunit is configured to perform corresponding storage of the first parameter information and the parameter identifier in the database, and a primary key of the database is used for storing the parameter identifier.
In one possible implementation, the template interface identifier of the template interface is an address link;
The first generating unit is configured to add the parameter identifier after the address link of the template interface to obtain the target interface identifier.
in one possible implementation, the apparatus further includes:
a second receiving unit, configured to execute receiving of a target interface access request sent by the terminal, where the target interface access request carries the target interface identifier;
The acquisition unit is configured to acquire the first parameter information corresponding to the parameter identifier based on the target interface identifier;
A second generation unit configured to perform generation of the first target data based on the first parameter information;
A second transmitting unit configured to perform transmission of the first target data to the terminal.
In one possible implementation, the apparatus further includes:
A third receiving unit, configured to execute a parameter update request sent by a receiving terminal, where the parameter update request carries the target interface identifier and second parameter information, and the second parameter information is used to indicate new target data to be acquired;
a replacing unit configured to replace the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a terminal, including:
One or more processors;
Volatile or non-volatile memory for storing the one or more processor-executable commands;
Wherein the one or more processors are configured to perform the interface identification generation method as described in the first aspect above.
According to a sixth aspect of embodiments of the present disclosure, there is provided a server including:
One or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
Wherein the one or more processors are configured to perform the interface identification generation method according to the second aspect.
according to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions that, when executed by a processor of a terminal, enable the terminal to perform the interface identifier generation method according to the first aspect; the instructions in said storage medium, when executed by a processor of a server, enable the server to perform the interface identification generation method as described in the second aspect above.
according to an eighth aspect of embodiments of the present disclosure, there is provided a computer program product comprising executable instructions that, when executed by a processor of a terminal, enable the terminal to perform the interface identification generation method according to the first aspect; the instructions in the computer program product, when executed by a processor of a server, enable the server to perform the interface identification generation method as described in the second aspect above.
the technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
The embodiment of the disclosure provides an interface identifier generation method, an interface identifier generation device and a storage medium. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. In addition, the scheme has universality, and front-end developers can set any parameter information or modify the set parameter information on the parameter setting interface according to requirements without manually modifying the first target data in the text document, so that the workload of the front-end developers is reduced, and the development cost is also reduced.
subsequently, when the data required by the front-end developer changes, only the parameter information of the changed data needs to be input, and compared with the prior art that the front-end developer needs to manually modify the data in the text document, the method has the advantages that the compiling is convenient, the compiling process of the data document is reduced, and the cost for the front-end developer to develop the false data interface by himself is reduced.
it is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating one implementation environment in accordance with an example embodiment.
Fig. 2 is a flow chart illustrating a method of interface identification generation according to an example embodiment.
Fig. 3 is a flow chart illustrating a method of interface identification generation in accordance with an exemplary embodiment.
fig. 4 is a flow chart illustrating a method of interface identification generation in accordance with an exemplary embodiment.
FIG. 5 is a schematic diagram illustrating a parameter setting interface in accordance with an exemplary embodiment.
FIG. 6 is a schematic diagram illustrating a database in accordance with an exemplary embodiment.
FIG. 7 is a schematic diagram illustrating presentation of target data, according to an example embodiment.
fig. 8 is a block diagram illustrating an interface identification generation apparatus according to an example embodiment.
Fig. 9 is a block diagram illustrating another interface identification generation apparatus according to an example embodiment.
Fig. 10 is a block diagram illustrating an interface identification generation apparatus according to an example embodiment.
Fig. 11 is a block diagram illustrating another interface identification generation apparatus according to an example embodiment.
FIG. 12 is a block diagram illustrating a terminal in accordance with an exemplary embodiment;
FIG. 13 is a block diagram illustrating a server in accordance with an exemplary embodiment.
Detailed Description
in order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
FIG. 1 is a schematic diagram illustrating one implementation environment in accordance with an example embodiment. As shown in fig. 1, the implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a network.
the terminal 101 may be a mobile phone, a computer, a tablet computer, or the like, the terminal 101 sends an interface identifier generation request to the server 102, and the server 102 generates a target interface identifier for the terminal 101 according to the interface identifier generation request sent by the terminal 101, so that the terminal 101 can obtain target data from the server 102 according to the target interface identifier.
in one possible implementation, server 102 is a web server. The terminal 101 may access the target web page, the server 102 may provide a service for the target web page, and the terminal 101 establishes a connection with the server 102 by accessing the target web page and transmits an interface identifier generation request to the server 102.
In another possible implementation, the server 102 is a target application server. The terminal 101 is installed with a target application, the server 102 is a server related to the target application, the terminal 101 establishes a connection with the server 102 through the target application, and sends an interface identifier generation request to the server 102. The target application may be a development tool, and a front-end developer may perform front-end development through the development tool.
the interface identifier generation method provided by the embodiment of the disclosure can be applied to a scene of front-end development.
for example, a terminal is provided with a development tool, and a front-end developer can perform front-end development through the development tool. When the front-end developer performs front-end development, the front-end developer needs to acquire data from the back end, but if the back end does not develop a corresponding interface, the terminal cannot acquire the data through the interface. The front-end developer can input parameter information on the parameter setting interface, submit the parameter information to the server, the server can distribute parameter identification for the received parameter information, generate target interface identification according to the template interface identification and the parameter identification of the template interface, and send the target interface identification to the terminal. The front-end developer can write the target interface identifier into a code, and the terminal can obtain target data from the server according to the target interface identifier by running the code.
In addition, the interface identifier generation method provided by the embodiment of the present disclosure may be applicable to any development tool used by the front end and the back end and any development language used by the front end and the back end, and the development tool and the development language used by the front end and the back end are not limited in the embodiment of the present disclosure.
in a possible implementation manner, the front end is developed by combining HTML (HyperText Markup Language) and CSS (Cascading Style Sheets), so as to implement page layout, and the page is constructed by vue-cli (a scaffold for quickly constructing single-page applications), and the web page is updated by ajax (asynchronous JavaScript and XML, asynchronous JavaScript and XML technology, XML, Extensible Markup Language). Js (a development platform) is adopted for development at the back end, and an expert framework is adopted for routing control.
fig. 2 is a flowchart illustrating an interface identifier generating method according to an exemplary embodiment, where the interface identifier generating method is used in a terminal, as shown in fig. 2, and includes the following steps.
in step S21, based on the displayed parameter setting interface, the input first parameter information indicating the first target data to be acquired is acquired.
In step S22, an interface identifier generation request is sent to the server, where the interface identifier generation request carries the first parameter information, the server allocates a parameter identifier for the first parameter information, generates a target interface identifier according to the template interface identifier of the template interface and the parameter identifier, and sends the target interface identifier to the terminal.
In step S23, the target interface identifier sent by the server is received.
according to the interface identifier generation method provided by the embodiment of the disclosure, the first parameter information of the first target data is sent to the server through the parameter setting interface, the server distributes the parameter identifier for the first parameter information, and the target interface identifier is generated according to the template interface identifier and the parameter identifier of the template interface. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. In addition, the scheme has universality, and front-end developers can set any parameter information or modify the set parameter information on the parameter setting interface according to requirements without manually modifying the first target data in the text document, so that the workload of the front-end developers is reduced, and the development cost is also reduced.
In one possible implementation, after the receiving the target interface identifier sent by the server, the method further includes:
sending a target interface access request to the server, wherein the target interface access request carries the target interface identifier, the server acquires the first parameter information corresponding to the parameter identifier based on the target interface identifier, generates the target data based on the first parameter information, and sends the target data to the terminal;
and receiving the target data sent by the server.
In one possible implementation, the parameter information includes at least one of a name parameter or a type parameter.
In one possible implementation, the parameter setting interface includes at least one of:
At least one name parameter input box, wherein the name parameter input box is used for acquiring input name parameters;
and the type parameter input box is used for acquiring the input type parameters.
in one possible implementation, after the receiving the target interface identifier sent by the server, the method further includes:
acquiring input second parameter information based on the displayed parameter setting interface, wherein the second parameter information is used for indicating second target data to be acquired;
And sending a parameter updating request to the server, wherein the parameter updating request carries the target interface identifier and the second parameter information, and the server replaces the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
In one possible implementation manner, the parameter setting interface includes a completion option, and the obtaining the input first parameter information based on the displayed parameter setting interface includes:
When the triggering operation of the completion option is detected, the input first parameter information is acquired.
fig. 3 is a flowchart illustrating an interface identifier generation method according to an exemplary embodiment, where the interface identifier generation method is used in a server, as shown in fig. 3, and includes the following steps.
In step S31, an interface identifier generation request sent by the terminal is received, where the interface identifier generation request carries first parameter information, and the first parameter information is used to indicate first target data to be acquired.
In step S32, a parameter identifier is assigned to the first parameter information.
In step S33, a target interface identifier is generated according to the template interface identifier of the template interface and the parameter identifier.
In step S34, the target interface identification is sent to the terminal.
the interface identifier generation method provided by the embodiment of the present disclosure receives first parameter information sent by a terminal, where the first parameter information is used to indicate first target data to be acquired, and a server allocates a parameter identifier to the first parameter information, generates a target interface identifier according to a template interface identifier and the parameter identifier of a template interface, and sends the target interface identifier to the terminal. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. In addition, the scheme has universality, and front-end developers can set any parameter information or modify the set parameter information on the parameter setting interface according to requirements without manually modifying the first target data in the text document, so that the workload of the front-end developers is reduced, and the development cost is also reduced.
in one possible implementation manner, the allocating a parameter identifier to the first parameter information includes:
Adding 1 to the number of the existing parameter information in the database to serve as a parameter identifier corresponding to the first parameter;
and correspondingly storing the first parameter information and the parameter identifier into the database, wherein a primary key of the database is used for storing the parameter identifier.
In one possible implementation manner, the generating the target interface identifier according to the template interface identifier of the template interface and the parameter identifier includes:
and adding the parameter identifier after the address link of the template interface to obtain the target interface identifier.
in a possible implementation manner, after the sending the interface identifier of the target interface to the terminal, the method further includes:
receiving a target interface access request sent by the terminal, wherein the target interface access request carries the target interface identifier;
Acquiring the first parameter information corresponding to the parameter identifier based on the target interface identifier;
generating the target data based on the first parameter information;
And sending the target data to the terminal.
In one possible implementation, after the sending the interface identifier of the target interface to the terminal, the method further includes:
Receiving a parameter updating request sent by a terminal, wherein the parameter updating request carries the target interface identifier and second parameter information, and the second parameter information is used for indicating new target data to be acquired;
And replacing the first parameter information corresponding to the parameter identification with the second parameter information based on the target interface identification.
Fig. 4 is a flowchart illustrating an interface identifier generating method according to an exemplary embodiment, where as shown in fig. 4, an interaction subject according to an embodiment of the present disclosure is a terminal and a server, and includes the following steps.
In step S41, the terminal acquires the input first parameter information indicating the first target data to be acquired, based on the displayed parameter setting interface.
The parameter setting interface can be a target webpage, and the terminal can access the target webpage through a browser so as to display the parameter setting interface. The parameter setting interface can also be an interface provided by a target application, and the terminal can open the target application and display the parameter setting interface in the target application.
The parameter setting interface can comprise at least one parameter input box, and the front-end developer can input parameter information in the at least one parameter input box, wherein the parameter information is used for indicating target data to be acquired. The target data is data of a certain type which a front-end developer wants to obtain, and the parameter information is information describing the type. Therefore, the front-end developer can only input the first parameter information on the parameter setting interface, and the subsequent server can generate the data of the corresponding type according to the first parameter information, wherein the data is the first target data.
In a first possible implementation manner, the parameter setting interface includes at least one name parameter input box, where the name parameter input box is used to obtain an input name parameter, and correspondingly, the parameter information includes a name parameter. For example, if the front-end developer wants to acquire data of an age type, the parameter information is age (age), and the front-end developer inputs age in a name parameter input box on the parameter setting interface.
in a second possible implementation manner, the parameter setting interface includes at least one type parameter input box, the type parameter input box is used to obtain an input type parameter, and correspondingly, the first parameter information includes the type parameter. For example, if the front-end developer wants to obtain data of a string type, the parameter information is string (string), and the front-end developer inputs string in a type parameter input box on the parameter setting interface.
In a third possible implementation manner, at least one name parameter input box and at least one type parameter input box are included on the parameter setting interface. The name parameter input box is used for acquiring an input name parameter, the type parameter input box is used for acquiring an input type parameter, and correspondingly, the parameter information may include a name parameter and a type parameter. For example, if the front-end developer wants to obtain name data of a string type, the parameter information includes: name and string, the front-end developer inputs the name in a name parameter input box on the parameter setting interface, and inputs the string in a type parameter input box on the parameter setting interface.
Optionally, in the above 3 possible implementation manners, a quantity parameter input box may be included on the parameter setting interface, and the quantity parameter input box is used to obtain the input quantity parameter. The quantity parameter indicates the amount of data that the front-end developer needs to obtain. Accordingly, the parameter information may also include a quantity parameter. For example, if the front-end developer needs to obtain data of 10 age types, the parameter information is: and (5) inputting age into a name parameter input box on the parameter setting interface and inputting 10 into a quantity parameter input box by a front-end developer.
in a possible implementation manner, the parameter setting interface may be a general interface, and different terminals may display the parameter setting interface.
An add option may be provided on the parameter setting interface, which may be used to add at least one of a name parameter entry box or a type parameter entry box. When the number of the name parameter input boxes or the type parameter input boxes on the parameter setting interface cannot meet the requirements of front-end developers, the front-end developers can manually add the name parameter input boxes or the type parameter input boxes through add options.
In step S42, the terminal sends an interface identifier generation request to the server, where the interface identifier generation request carries the first parameter information.
In a possible implementation manner, the parameter setting interface includes a completion option, and when a trigger operation on the completion option is detected, the input first parameter information is acquired, and an interface identifier generation request is sent to the server.
for example, as shown in fig. 5, the parameter setting interface includes 3 name parameter input boxes, 3 type parameter input boxes, and 1 quantity parameter input box, when the front-end developer needs to obtain 10 pieces of data, each piece of data includes name data of a string type, age data of a number type, and gender data of a boolean type, name, age, and sexe (gender) may be respectively input in the name parameter input box corresponding to an APIName (interface name), string, number, and boolean (boolean) values may be respectively input in an apikid (interface type), 10 may be input in the quantity parameter input box corresponding to a totalNumber (total quantity), and then a "submit" completion option is clicked, and an interface identifier generation request is sent to the server.
in step S43, the server receives the interface identifier generation request sent by the terminal, and assigns a parameter identifier to the first parameter information.
In one possible implementation, assigning the parameter identifier to the first parameter information may include: the server randomly distributes a parameter identifier for the first parameter information, and the parameter identifier and the first parameter information are correspondingly stored locally, so that the first parameter identifier is different from the existing parameter identifier in the server. Or, the server allocates a parameter identifier to the first parameter information according to a preset rule, and the parameter identifier and the first parameter information are correspondingly stored locally, wherein when the parameter identifier is in a digital form, the preset rule can be gradually increased step by step according to the parameter identifier.
In another possible implementation manner, the server allocating the parameter identifier to the first parameter information may include: adding 1 to the number of the existing parameter information in the database to serve as a parameter identifier corresponding to the first parameter information; and correspondingly storing the first parameter information and the parameter identifier into a database, wherein a main key of the database is used for storing the parameter identifier. The main key is an identifier used for determining only one piece of data in the database, and the corresponding parameter identifier can be found by inquiring the content stored by the main key in the database, so that the first parameter information corresponding to the parameter identifier is obtained.
The database may be in the form of a table, and when the table is established, id (identity) may be set as a primary key, and the primary key in the table may be set in a step-by-step increment mode. That is, the primary key stores id 1 when the database stores the first data record, and the primary key stores id 2 when the database stores the second data record.
in one possible implementation manner, the server allocating the parameter identifier to the first parameter information may include: the server randomly allocates a first parameter identifier to the first parameter information based on the existing parameter identifier in the database, wherein the first parameter identifier is different from the existing parameter identifier in the database.
In one possible implementation, the database may be a relational database. Where a relational database may be organized as a set of tables having formal descriptions, the data in these tables may be stored or recalled in many different ways without the need to reorganize the database tables. The standard data query language sql is a language based on a relational database, and is used for executing retrieval operation on data in the relational database.
optionally, the relational database may be a mysql relational database, or an oracle relational database, and the embodiment of the present disclosure does not limit the relational database.
as shown in fig. 6, id is a primary key and is used for storing a parameter identifier, and a storage field of an apidateai (interface detail) recording interface may be used as the storage field of the first parameter information, where the storage field may be a name parameter and a type parameter in the first parameter information, for example, if the first target data required by the front-end developer is a name of string type and an age of number type, a data structure { name: string, age: number } is stored in apidateai. totalNum stores the amount of data needed by the front-end developer. The server acquires the parameter identification and the first parameter information stored in the relational database by using the sql.
in step S44, the server generates a target interface identifier according to the template interface identifier and the parameter identifier of the template interface, and sends the target interface identifier to the terminal.
The template interface can be a universal interface in the server, the universal interface means that different terminals can use the interface to acquire data, and when the data acquired by the terminals are different, the interface can also be used to acquire the data. And the generic interface may generate data corresponding to the parameter information based on the parameter information. The template interface may be considered to be an incomplete interface having a certain function, and the interface has a function of generating data but does not know what kind of data is generated. And generating a target interface identifier according to the template interface identifier and the parameter identifier, so that the universal interface can generate data according to the parameter information corresponding to the parameter identifier. Subsequently, the front-end developer writes the target interface identifier into the developed code, runs the code at any time, and further accesses the server through the target interface identifier, and the template interface generates target data according to the parameter information corresponding to the parameter identifier, so that the function of the template interface is complete. Therefore, the scheme is equivalent to providing an interface for the terminal, and the interface can be automatically generated without manually writing an interface function by a front-end developer.
The server generates a target interface identifier according to the template interface identifier and the parameter identifier of the template interface, wherein the target interface identifier comprises the template interface identifier and the parameter identifier, so that the terminal can call the template interface according to the template interface identifier and acquire first parameter information through the parameter identifier, and the template interface can generate first target data for the terminal according to the first parameter information.
In one possible implementation manner, the template interface identifier of the template interface is an address link, and generating the target interface identifier according to the template interface identifier and the parameter identifier of the template interface may include: and after the address link of the template interface, adding the parameter identifier to obtain a target interface identifier. The target interface is identified as an address link, and the subsequent terminal can acquire data based on the address link.
in step S45, the terminal receives the target interface identifier sent by the server.
in a possible implementation manner, since the terminal sends the interface identifier generation request to the server based on the parameter setting interface, after the terminal sends the target interface identifier to the server, the target interface identifier may be displayed on the parameter setting interface, for example, as shown in fig. 5, a target interface identifier "http:// localhost: 5666/getdata.
the front-end developer can write the target interface identification into a developed code after acquiring the target interface identification, when the code runs, first target data can be acquired according to the target interface identification, the terminal displays the first target data, and the front-end developer determines whether problems exist in page layout, data display and the like according to the first target data.
In step S46, the terminal sends a target interface access request to the server, where the target interface access request carries a target interface identifier.
it should be noted that, the above steps S41 to S45 are processes of obtaining a target interface identifier, where the obtaining processes may be performed when a front-end developer writes a code, after obtaining the target interface identifier, the code may be run immediately, first target data is obtained according to the target interface identifier, a test is performed according to the first target data, and whether a page layout, a data display, and the like have problems is determined; and the codes can be continuously compiled, other target interface identifications are continuously obtained, when the code compiling reaches a certain completion degree, the codes are operated, target data are obtained according to at least one target interface, testing is carried out according to a plurality of target data, and whether problems exist in page layout, data display and the like is determined.
In step S47, the server receives the target interface access request sent by the terminal, acquires first parameter information corresponding to the parameter identifier based on the target interface identifier, and generates first target data based on the first parameter information.
The target interface identifier is generated based on the template interface identifier and the parameter identifier, so that the parameter identifier can be obtained based on the target interface identifier, and the first parameter information can be obtained based on the parameter identifier because the parameter identifier corresponds to the first parameter information, and the template interface can generate the first target data based on the first parameter information. Wherein generating the first target data based on the first parameter information may include: name parameters are set through key values in json (JS object Notation), fixed contents are set through value values, data quantity is set through totalNum and integrated into one piece of data, the data is target data, and the server sends the target data to the terminal, so that interface return of analog data is realized.
For example, the first parameter information is string, name and 10, and Apidemail in the database stores { name: string }. the totalNum stores 10, then the name in the data structure { name: string } is a key value, and the string type data is a value. Wherein the value can be set to a fixed content, such as "Ming". In order to visually see the data type of the data, the name can be added in front of the name, the number of the data is 10, then the 10 names and the names are integrated into one piece of data to be sent to the terminal, and the terminal displays the data, as shown in fig. 7.
in step S48, the server transmits the first target data to the terminal.
in step S49, the terminal receives the first target data.
After receiving the first target data, the terminal displays the first target data, as shown in fig. 7.
it should be noted that, in the embodiment of the present disclosure, when data needed by a front-end developer changes, a target interface identifier may be obtained again, and target data is obtained based on the obtained target interface identifier, where a method for obtaining the target interface identifier again is similar to that in steps S41 to S45, and is not described here again.
when the data required by the front-end developer changes, the target data to be acquired can be modified by modifying the parameter information corresponding to the parameter identifier. In a possible implementation manner, based on a displayed parameter setting interface, input second parameter information is acquired, the second parameter information is used for indicating second target data to be acquired, a parameter updating request is sent to a server, the parameter updating request carries a target interface identifier and the second parameter information, and the server replaces first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
the replacing, by the server, the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier may include: and obtaining a parameter identifier based on the target interface identifier, and storing second parameter information into a database based on the parameter identifier, wherein the second parameter information can cover the first parameter information. Subsequently, when the parameter information is acquired based on the parameter identifier, second parameter information is acquired, so that second target data is acquired.
According to the interface identifier generation method provided by the embodiment of the disclosure, the first parameter information of the first target data is sent to the server through the parameter setting interface, the server distributes the parameter identifier for the first parameter information, and the target interface identifier is generated according to the template interface identifier and the parameter identifier of the template interface. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. Moreover, when the first target data desired by the front-end developer is changed, the first parameter information is only required to be reset on the parameter setting interface, and then a target interface identifier is obtained, so that the first target data does not need to be manually modified in the text file, the workload of the developer is reduced, and the development cost is also reduced. The strong dependence relationship during front-end and back-end development is decoupled.
Subsequently, when the data required by the front-end developer changes, only the parameter information of the changed data needs to be input, and compared with the prior art that the front-end developer needs to manually modify the data in the text document, the method has the advantages that the compiling is convenient, the compiling process of the data document is reduced, and the cost for the front-end developer to develop the false data interface by himself is reduced.
Fig. 8 is a block diagram illustrating an interface identification generation apparatus according to an example embodiment. Referring to fig. 8, the apparatus includes a first acquisition unit 801, a first transmission unit 802, and a first reception unit 803.
a first acquisition unit 801 configured to execute a parameter setting interface based on display, acquiring input first parameter information indicating first target data to be acquired;
A first sending unit 802, configured to execute sending an interface identifier generation request to a server, where the interface identifier generation request carries the first parameter information, the server allocates a parameter identifier for the first parameter information, generates a target interface identifier according to a template interface identifier of a template interface and the parameter identifier, and sends the target interface identifier to a terminal;
A first receiving unit 803 configured to perform receiving the target interface identifier sent by the server.
The interface identifier generating device provided by the embodiment of the present disclosure sends the first parameter information of the first target data to the server through the parameter setting interface, and the server allocates the parameter identifier for the first parameter information, and generates the target interface identifier according to the template interface identifier and the parameter identifier of the template interface. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. In addition, the scheme has universality, and front-end developers can set any parameter information or modify the set parameter information on the parameter setting interface according to requirements without manually modifying the first target data in the text document, so that the workload of the front-end developers is reduced, and the development cost is also reduced.
In one possible implementation, as shown in fig. 9, the apparatus further includes:
A second sending unit 804, configured to execute sending of a target interface access request to the server, where the target interface access request carries the target interface identifier, and the server obtains the first parameter information corresponding to the parameter identifier based on the target interface identifier, generates the first target data based on the first parameter information, and sends the first target data to the terminal;
A second receiving unit 805 configured to perform receiving the first target data sent by the server.
in one possible implementation, the parameter information includes at least one of a name parameter or a type parameter.
In one possible implementation, the parameter setting interface includes at least one of:
At least one name parameter input box, wherein the name parameter input box is used for acquiring input name parameters;
And the type parameter input box is used for acquiring the input type parameters.
in one possible implementation, as shown in fig. 9, the apparatus further includes:
A second obtaining unit 806 configured to perform obtaining, based on the displayed parameter setting interface, input second parameter information indicating second target data to be obtained;
A third sending unit 807 configured to execute sending a parameter update request to the server, where the parameter update request carries the target interface identifier and the second parameter information, and the server replaces the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
In a possible implementation manner, the parameter setting interface includes a completion option, and the first obtaining unit 801 is configured to perform, when a trigger operation on the completion option is detected, obtaining the input first parameter information.
fig. 10 is a block diagram illustrating an interface identification generation apparatus according to an example embodiment. Referring to fig. 10, the apparatus includes a first receiving unit 1001, an assigning unit 1002, a first generating unit 1003, and a first transmitting unit 1004.
a first receiving unit 1001, configured to execute an interface identifier generation request sent by a receiving terminal, where the interface identifier generation request carries first parameter information, and the first parameter information is used to indicate first target data to be acquired;
An assigning unit 1002 configured to perform assigning a parameter identification to the first parameter information;
a first generating unit 1003 configured to execute generating a target interface identifier according to the template interface identifier of the template interface and the parameter identifier;
A first sending unit 1004 configured to perform sending the target interface identification to the terminal.
The interface identifier generating device provided by the embodiment of the present disclosure receives first parameter information sent by a terminal, where the first parameter information is used to indicate first target data to be acquired, and a server allocates a parameter identifier to the first parameter information, generates a target interface identifier according to a template interface identifier and the parameter identifier of a template interface, and sends the target interface identifier to the terminal. The target interface identifier is generated according to the template interface identifier and the parameter identifier, so that the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, and accordingly first target data corresponding to the first parameter information is acquired. In addition, the scheme has universality, and front-end developers can set any parameter information or modify the set parameter information on the parameter setting interface according to requirements without manually modifying the first target data in the text document, so that the workload of the front-end developers is reduced, and the development cost is also reduced.
in one possible implementation, as shown in fig. 11, the allocating unit 1002 includes:
An allocating subunit 10021, configured to perform adding 1 to the number of pieces of existing parameter information in the database as a parameter identifier corresponding to the first parameter;
a storage subunit 10022, configured to perform corresponding storage of the first parameter information and the parameter identifier in the database, where a primary key of the database is used for storing the parameter identifier.
In one possible implementation, the template interface identifier of the template interface is an address link;
The first generating unit 1003 is configured to add the parameter identifier after the address link of the template interface, to obtain the target interface identifier.
in one possible implementation, as shown in fig. 11, the apparatus further includes:
a second receiving unit 1005, configured to perform receiving a target interface access request sent by the terminal, where the target interface access request carries the target interface identifier;
An obtaining unit 1006, configured to perform, based on the target interface identifier, obtaining the first parameter information corresponding to the parameter identifier;
a second generating unit 1007 configured to perform generation of the first target data based on the first parameter information;
A second transmitting unit 1008 configured to perform transmitting the first target data to the terminal.
In one possible implementation, as shown in fig. 11, the apparatus further includes:
A third receiving unit 1009, configured to execute a parameter update request sent by the receiving terminal, where the parameter update request carries the target interface identifier and second parameter information, and the second parameter information is used to indicate new target data to be acquired;
a replacing unit 1010 configured to replace the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
with regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 12 is a block diagram of a terminal according to an embodiment of the present disclosure. The terminal 1200 is used for executing the steps executed by the terminal in the above embodiments, and may be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1200 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
in general, terminal 1200 includes: a processor 1201 and a memory 1202.
the processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1202 is used to store at least one instruction for execution by the processor 1201 to implement the interface identification generation method provided by the method embodiments of the present application.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, touch display 1205, camera assembly 1206, audio circuitry 1207, positioning assembly 1208, and power supply 1209.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, memory 1202, and peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202 and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 1204 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1204 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1204 may communicate with other terminals through at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1204 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to acquire touch signals on or over the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this point, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, providing the front panel of the terminal 1200; in other embodiments, the display 1205 can be at least two, respectively disposed on different surfaces of the terminal 1200 or in a folded design; in still other embodiments, the display 1205 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 1200. Even further, the display screen 1205 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display panel 1205 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials.
Camera assembly 1206 is used to capture images or video. Optionally, camera assembly 1206 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1206 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
the audio circuitry 1207 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1201 for processing or inputting the electric signals into the radio frequency circuit 1204 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided at different locations of terminal 1200. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The positioning component 1208 is configured to locate a current geographic Location of the terminal 1200 to implement navigation or LBS (Location Based Service). The Positioning component 1208 can be a Positioning component based on the GPS (Global Positioning System) in the united states, the beidou System in china, or the graves System in russia, or the galileo System in the european union.
the power supply 1209 is used to provide power to various components within the terminal 1200. The power source 1209 may be alternating current, direct current, disposable or rechargeable. When the power source 1209 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
in some embodiments, terminal 1200 also includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: acceleration sensor 1211, gyro sensor 1212, pressure sensor 1213, fingerprint sensor 1214, optical sensor 1215, and proximity sensor 1216.
the acceleration sensor 1211 can detect magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1200. For example, the acceleration sensor 1211 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1201 may control the touch display 1205 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1212 may detect a body direction and a rotation angle of the terminal 1200, and the gyro sensor 1212 may collect a 3D motion of the user on the terminal 1200 in cooperation with the acceleration sensor 1211. The processor 1201 can implement the following functions according to the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
pressure sensors 1213 may be disposed on a side bezel of terminal 1200 and/or an underlying layer of touch display 1205. When the pressure sensor 1213 is disposed on the side frame of the terminal 1200, the user's holding signal of the terminal 1200 can be detected, and the processor 1201 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed at a lower layer of the touch display screen 1205, the processor 1201 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1205. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
the fingerprint sensor 1214 is used for collecting a fingerprint of the user, and the processor 1201 identifies the user according to the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 1214 may be provided on the front, back, or side of the terminal 1200. When a physical button or vendor Logo is provided on the terminal 1200, the fingerprint sensor 1214 may be integrated with the physical button or vendor Logo.
The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, the processor 1201 may control the display brightness of the touch display 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the touch display panel 1205 is increased; when the ambient light intensity is low, the display brightness of the touch display panel 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the camera head 1206 shooting parameters based on the ambient light intensity collected by optical sensor 1215.
A proximity sensor 1216, also known as a distance sensor, is typically disposed on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect a distance between the user and the front surface of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually decreases, the processor 1201 controls the touch display 1205 to switch from the bright screen state to the dark screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually becomes larger, the processor 1201 controls the touch display 1205 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 1200 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
fig. 13 is a block diagram illustrating a server 1300 according to an example embodiment. The server 1300 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1301 and one or more memories 1302, where the memory 1302 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 1301 to implement the methods provided by the method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
the server 1300 may be configured to execute the steps executed by the server in the interface identifier generating method.
in an exemplary embodiment, there is also provided a storage medium having instructions that, when executed by a processor of a terminal, enable the terminal to perform the interface identification generation method as described above; the instructions in the storage medium, when executed by a processor of a server, enable the server to perform the interface identification generation method as described above.
In an exemplary embodiment, there is also provided a computer program product comprising executable instructions, which when executed by a processor of a terminal, enable the terminal to perform the interface identification generation method provided by the embodiments of the present disclosure; the instructions in the computer program product, when executed by a processor of a server, enable the server to perform the interface identification generation method provided by the embodiments of the present disclosure.
other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. an interface identifier generation method, the method comprising:
acquiring input first parameter information based on a displayed parameter setting interface, wherein the first parameter information is used for indicating first target data to be acquired;
Sending an interface identifier generation request to a server, wherein the interface identifier generation request carries the first parameter information, the server distributes parameter identifiers for the first parameter information, a target interface identifier is generated according to the template interface identifier of the template interface and the parameter identifiers, and the target interface identifier is sent to a terminal;
and receiving the target interface identification sent by the server.
2. the method according to claim 1, wherein after said receiving said target interface identification sent by said server, said method further comprises:
sending a target interface access request to the server, wherein the target interface access request carries the target interface identifier, the server acquires the first parameter information corresponding to the parameter identifier based on the target interface identifier, generates the first target data based on the first parameter information, and sends the first target data to the terminal;
And receiving the first target data sent by the server.
3. the method of claim 1, wherein the parameter information comprises at least one of a name parameter or a type parameter.
4. The method of claim 3, wherein the parameter setting interface comprises at least one of:
The system comprises at least one name parameter input box, a name parameter input box and a name parameter output box, wherein the name parameter input box is used for acquiring input name parameters;
And the type parameter input box is used for acquiring the input type parameters.
5. An interface identifier generation method, the method comprising:
Receiving an interface identifier generation request sent by a terminal, wherein the interface identifier generation request carries first parameter information, and the first parameter information is used for indicating first target data to be acquired;
distributing parameter identification to the first parameter information;
Generating a target interface identifier according to the template interface identifier of the template interface and the parameter identifier;
And sending the target interface identifier to the terminal.
6. an interface identifier generation apparatus, the apparatus comprising:
A first acquisition unit configured to execute a parameter setting interface based on display, and acquire input first parameter information indicating first target data to be acquired;
The first sending unit is configured to execute sending of an interface identifier generation request to a server, the interface identifier generation request carries the first parameter information, the server distributes a parameter identifier to the first parameter information, a target interface identifier is generated according to a template interface identifier of a template interface and the parameter identifier, and the target interface identifier is sent to a terminal;
a first receiving unit configured to perform receiving the target interface identifier sent by the server.
7. An interface identifier generation apparatus, the apparatus comprising:
the first receiving unit is configured to execute an interface identifier generation request sent by a receiving terminal, wherein the interface identifier generation request carries first parameter information, and the first parameter information is used for indicating first target data to be acquired;
An allocation unit configured to perform allocation of a parameter identification to the first parameter information;
The first generation unit is configured to execute generation of a target interface identifier according to a template interface identifier of a template interface and the parameter identifier;
a first sending unit configured to execute sending the target interface identifier to the terminal.
8. A terminal, characterized in that the terminal comprises:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the interface identification generation method of any of claims 1-4.
9. a server, characterized in that the server comprises:
one or more processors;
Volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the interface identification generation method of claim 5.
10. A storage medium, characterized in that instructions in the storage medium, when executed by a processor of a terminal, enable the terminal to perform the interface identification generation method according to any one of claims 1 to 4; the instructions in the storage medium, when executed by a processor of a server, enable the server to perform the interface identification generation method of claim 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910829029.3A CN110569064B (en) | 2019-09-03 | 2019-09-03 | Interface identifier generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910829029.3A CN110569064B (en) | 2019-09-03 | 2019-09-03 | Interface identifier generation method, device, equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110569064A true CN110569064A (en) | 2019-12-13 |
| CN110569064B CN110569064B (en) | 2024-01-30 |
Family
ID=68777571
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910829029.3A Active CN110569064B (en) | 2019-09-03 | 2019-09-03 | Interface identifier generation method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110569064B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111858596A (en) * | 2020-07-22 | 2020-10-30 | 广东电网有限责任公司 | Data acquisition method and device, computer equipment and storage medium |
| CN113032473A (en) * | 2021-03-29 | 2021-06-25 | 北京大米科技有限公司 | Data interface generation method and device, storage medium and mobile terminal |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102567023A (en) * | 2010-12-28 | 2012-07-11 | 微软公司 | Parameterized interface identifier techniques |
| US20160366248A1 (en) * | 2015-06-09 | 2016-12-15 | Alibaba Group Holding Limited | System, method, and device for remotely operating a server |
| CN109491905A (en) * | 2018-11-02 | 2019-03-19 | 北京金山云网络技术有限公司 | Head end test method, apparatus and electronic equipment |
| CN109634607A (en) * | 2018-12-13 | 2019-04-16 | 泰康保险集团股份有限公司 | A kind of method and device of Code automatic build |
-
2019
- 2019-09-03 CN CN201910829029.3A patent/CN110569064B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102567023A (en) * | 2010-12-28 | 2012-07-11 | 微软公司 | Parameterized interface identifier techniques |
| US20160366248A1 (en) * | 2015-06-09 | 2016-12-15 | Alibaba Group Holding Limited | System, method, and device for remotely operating a server |
| CN109491905A (en) * | 2018-11-02 | 2019-03-19 | 北京金山云网络技术有限公司 | Head end test method, apparatus and electronic equipment |
| CN109634607A (en) * | 2018-12-13 | 2019-04-16 | 泰康保险集团股份有限公司 | A kind of method and device of Code automatic build |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111858596A (en) * | 2020-07-22 | 2020-10-30 | 广东电网有限责任公司 | Data acquisition method and device, computer equipment and storage medium |
| CN113032473A (en) * | 2021-03-29 | 2021-06-25 | 北京大米科技有限公司 | Data interface generation method and device, storage medium and mobile terminal |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110569064B (en) | 2024-01-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107885533B (en) | Method and device for managing component codes | |
| CN110674022B (en) | Behavior data acquisition method and device and storage medium | |
| CN110321126B (en) | Method and device for generating page code | |
| CN110245255B (en) | Song display method, device, equipment and storage medium | |
| CN111159604A (en) | Picture resource loading method and device | |
| CN110058935B (en) | Log level adjusting method, device and system and readable storage medium | |
| CN111737100A (en) | Data acquisition method, device, equipment and storage medium | |
| CN111459466B (en) | Code generation method, device, equipment and storage medium | |
| CN110543350A (en) | Method and device for generating page component | |
| CN108038232B (en) | Webpage editing method, device and system and storage medium | |
| CN110290191B (en) | Resource transfer result processing method, device, server, terminal and storage medium | |
| CN110569064B (en) | Interface identifier generation method, device, equipment and storage medium | |
| CN113377647B (en) | Page processing method, device, server, terminal and readable storage medium | |
| CN111580892A (en) | Method, device, terminal and storage medium for calling service component | |
| CN114329292A (en) | Resource information configuration method and device, electronic equipment and storage medium | |
| CN111008083B (en) | Page communication method and device, electronic equipment and storage medium | |
| CN111064657B (en) | Method, device and system for grouping concerned accounts | |
| CN113051485A (en) | Group searching method, device, terminal and storage medium | |
| CN112100528A (en) | Method, device, equipment and medium for training search result scoring model | |
| CN109033473B (en) | Picture sharing method and device and computer readable storage medium | |
| CN113158099A (en) | Page display method and device and storage medium | |
| CN115774822B (en) | Data updating method, device, terminal and storage medium | |
| CN113535039B (en) | Method and device for updating page, electronic equipment and computer readable storage medium | |
| CN112783533B (en) | Version information updating method, device, terminal and storage medium | |
| CN110045999B (en) | Method, device, terminal and storage medium for drawing assembly |
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 |