CN110569064B - Interface identifier generation method, device, equipment and storage medium - Google Patents

Interface identifier generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN110569064B
CN110569064B CN201910829029.3A CN201910829029A CN110569064B CN 110569064 B CN110569064 B CN 110569064B CN 201910829029 A CN201910829029 A CN 201910829029A CN 110569064 B CN110569064 B CN 110569064B
Authority
CN
China
Prior art keywords
parameter
interface
identifier
parameter information
target
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.)
Active
Application number
CN201910829029.3A
Other languages
Chinese (zh)
Other versions
CN110569064A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910829029.3A priority Critical patent/CN110569064B/en
Publication of CN110569064A publication Critical patent/CN110569064A/en
Application granted granted Critical
Publication of CN110569064B publication Critical patent/CN110569064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program 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)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to an interface identifier generation method, device, equipment and 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; an interface identifier generation request is sent to a server, 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, a text document is not required to be established, and first target data is input 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

Interface identifier generation method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of the internet, and in particular relates to a method, a device, equipment and a storage medium for generating an interface identifier.
Background
The project development includes front-end development and back-end development. In order to accelerate development progress, front-end development and back-end development may be performed in parallel. Front-end development depends on the 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 development progress of the front-end is affected.
In the related art, a front-end developer needs to build a text document on a terminal, manually input data to be acquired in the text document, and build an interface on the terminal, and link to the text document through the interface. When the interface is subsequently called, the data in the text document can be obtained.
However, the front-end developer must create a text document in which the data to be acquired is manually input, and thus this scheme is time-consuming and labor-consuming, and increases development costs.
Disclosure of Invention
The disclosure provides an interface identifier generating method, device, equipment and storage medium, so as to at least solve the problem of high development cost in the related technology. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment 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;
an interface identifier generation request is sent to a server, 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 a 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 manner, 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, acquiring the first parameter information corresponding to the parameter identifier by the server based on the target interface identifier, generating first target data based on the first parameter information, and sending 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:
at least one name parameter input box, wherein the name parameter input box is used for acquiring the input name parameters;
and at least one type parameter input box, wherein the type parameter input box is used for acquiring the input type parameters.
In one possible implementation manner, 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 acquiring, based on the displayed parameter setting interface, the input first parameter information 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 for 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 based on 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 primary key of the database is used for storing the parameter identification.
In one possible implementation manner, the template interface identifier of the template interface is an address link, and 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 of the template interface is linked to obtain the target interface identifier.
In one 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 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 identifier with the second parameter information based on the target interface identifier.
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 display-based parameter setting interface, acquire input first parameter information for indicating first target data to be acquired;
the first sending unit is configured to send an interface identifier generating request to a server, wherein the interface identifier generating request carries the first parameter information, the server distributes parameter identifiers for the first parameter information, generates a target interface identifier according to a template interface identifier of a template interface and the parameter identifiers, and sends the target interface identifier to a terminal;
and the first receiving unit is configured to receive the target interface identification sent by the server.
In one possible implementation, the apparatus further includes:
the second sending unit is configured to send a target interface access request to the server, wherein the target interface access request carries the target interface identifier, 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;
And 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:
at least one name parameter input box, wherein the name parameter input box is used for acquiring the input name parameters;
and at least one type parameter input box, wherein 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 the parameter setting interface based on display, to acquire input second parameter information for indicating second target data to be acquired;
and the third sending unit is configured to send 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 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 the 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 for the first parameter information;
the first generation unit is configured to execute the generation of a target interface identifier according to the template interface identifier of the template interface and the parameter identifier;
and the first sending unit is configured to send the target interface identifier to the terminal.
In one possible implementation, the allocation unit includes:
an allocation subunit configured to perform adding 1 to the number based on the number of parameter information existing in the database, as a parameter identifier corresponding to the first parameter;
And the storage subunit is configured to perform corresponding storage of the first parameter information and the parameter identification into the database, and a primary key of the database is used for storing the parameter identification.
In one possible implementation, the template interface of the template interface is identified as an address link;
the first generating unit is configured to add the parameter identifier after the address linking of the template interface, so as to obtain the target interface identifier.
In one possible implementation, the apparatus further includes:
the second receiving unit is configured to execute receiving a target interface access request sent by the terminal, wherein the target interface access request carries the target interface identifier;
an obtaining unit configured to obtain 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;
and a second transmission unit configured to perform transmission of the first target data to the terminal.
In one possible implementation, the apparatus further includes:
the third receiving unit is configured to execute a parameter updating request sent by the receiving 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 a replacing unit configured to perform replacement of 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 embodiments of the present disclosure, there is provided a terminal comprising:
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 comprising:
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 second aspect above.
According to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of a terminal, enables the terminal to perform the interface identification generation method as described in the first aspect 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 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 which, when executed by a processor of a terminal, enable the terminal to perform the interface identification generation method as described in the first aspect above; 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 generating method, device, equipment and storage medium, wherein first parameter information of first target data is sent to a server through a parameter setting interface, the server distributes parameter identifiers for the first parameter information, and the target interface identifiers are generated according to template interface identifiers and parameter identifiers of a template interface. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. In addition, the scheme has universality, front-end developers can set any parameter information on the parameter setting interface or modify the set parameter information according to requirements, first target data do not need to be manually modified in a text document, 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, the parameter information of the changed data is only required to be input, and compared with the prior art that the front-end developer is required to manually modify the data in the text document, the writing is convenient, the writing process of the data document is reduced, and the cost of the front-end developer for self-developing the false data interface 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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram of an implementation environment, according to an example embodiment.
Fig. 2 is a flow chart illustrating a method of interface identification generation according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of interface identification generation according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a method of interface identification generation, according to an example embodiment.
FIG. 5 is a schematic diagram illustrating a parameter setting interface according to an example embodiment.
FIG. 6 is a schematic diagram of a database, according to an example embodiment.
Fig. 7 is a schematic diagram showing a presentation of target data according to an example embodiment.
Fig. 8 is a block diagram illustrating an interface identifier generating apparatus according to an exemplary 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 identifier generating apparatus according to an exemplary embodiment.
Fig. 11 is a block diagram illustrating another interface identification generation apparatus according to an example embodiment.
FIG. 12 is a block diagram of a terminal shown in accordance with an exemplary embodiment;
fig. 13 is a block diagram of a server, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of 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 foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
FIG. 1 is a schematic diagram of an implementation environment, according to 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 by a network.
The terminal 101 may be a mobile phone, a computer, a tablet computer, etc., 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 may obtain target data from the server 102 according to the target interface identifier.
In one possible implementation, the server 102 is a web server. The terminal 101 may access a target web page, the server 102 may provide services for the target web page, and the terminal 101 may send an interface identifier generation request to the server 102 by accessing a connection between the target web page and the server 102.
In another possible implementation, the server 102 is a target application server. The terminal 101 is provided 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, through which a front-end developer may perform front-end development.
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 development tool is installed on the terminal, through which a front-end developer can perform front-end development. When front-end developer performs front-end development, data needs to be acquired from the back-end, but if the back-end has not developed a corresponding interface, the terminal cannot acquire data through the interface. The front-end developer can input parameter information on a parameter setting interface, submit the parameter information to a server, allocate parameter identifiers for the received parameter information, generate target interface identifiers according to the template interface identifiers and the parameter identifiers of the template interface, and send the target interface identifiers to the terminal. The front-end developer can write the target interface identifier into a code, run the code, and the terminal can acquire target data from the server according to the target interface identifier.
In addition, the method for generating the interface identifier 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 embodiment of the present disclosure does not limit the development tool and the development language used by the front end and the back end.
In one possible implementation, the front end is developed with HTML (HyperText Markup Language ) and CSS (Cascading Style Sheets, cascading style sheets) in combination, implementing the page layout, the page architecture through vue-cli (a scaffold that quickly builds single page applications), and the web page update through ajax (Asynchronous JavaScript and XML, asynchronous JavaScript and XML technology, XML, extensible Markup Language, extensible markup language). The back end adopts node. Js (a development platform) for development, and adopts an expert framework for route control.
Fig. 2 is a flowchart illustrating an interface identifier generation method, as shown in fig. 2, for use in a terminal according to an exemplary embodiment, including the following steps.
In step S21, input first parameter information indicating first target data to be acquired is acquired based on the displayed parameter setting interface.
In step S22, an interface identifier generating request is sent to a server, where the interface identifier generating 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.
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, first parameter information of first target data is sent to the server through the parameter setting interface, the server distributes parameter identifiers 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. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. In addition, the scheme has universality, front-end developers can set any parameter information on the parameter setting interface or modify the set parameter information according to requirements, first target data do not need to be manually modified in a text document, the workload of the front-end developers is reduced, and the development cost is also reduced.
In one possible implementation manner, after the receiving the target interface identifier sent by the server, the method further includes:
a target interface access request is sent to the server, the target interface access request carries the target interface identifier, the server obtains 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 for acquiring the input name parameter;
and the type parameter input box is used for acquiring the input type parameters.
In one possible implementation manner, 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 acquiring, based on the displayed parameter setting interface, the input first parameter information 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, as shown in fig. 3, for use in a server, according to an exemplary embodiment, including 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.
According to the interface identifier generation method, first parameter information sent by a terminal is received, the first parameter information is used for indicating first target data to be acquired, a server distributes parameter identifiers for the first parameter information, and a target interface identifier is generated according to a template interface identifier and the parameter identifier of a template interface and is sent to the terminal. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. In addition, the scheme has universality, front-end developers can set any parameter information on the parameter setting interface or modify the set parameter information according to requirements, first target data do not need to be manually modified in a text document, 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 based on 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 identification into the database, wherein a primary key of the database is used for storing the parameter identification.
In one possible implementation manner, the template interface identifier of the template interface is an address link, and 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 of the template interface is linked to obtain the target interface identifier.
In one 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 identifier with the second parameter information based on the target interface identifier.
Fig. 4 is a flowchart of an interface identifier generating method according to an exemplary embodiment, and as shown in fig. 4, an interaction body of an embodiment of the disclosure is a terminal and a server, including the following steps.
In step S41, the terminal acquires input first parameter information indicating first target data to be acquired based on the displayed parameter setting interface.
The parameter setting interface may be a target webpage, and the terminal may access the target webpage through a browser, so as to display the parameter setting interface. The parameter setting interface may also be an interface provided by a target application, and the terminal may open the target application and display the parameter setting interface in the target application.
The parameter setting interface may include at least one parameter input box, and the front-end developer may input parameter information in the at least one parameter input box, where the parameter information is used to indicate target data to be acquired. The target data is a certain type of data which the front-end developer wants to acquire, 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 corresponding type of data 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 the corresponding parameter information includes the name parameter. For example, if the front-end developer wants to acquire the data of the age type, the parameter information is age (age), and the front-end developer inputs the 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, where the type parameter input box is used to obtain an input type parameter, and the corresponding first parameter information includes the type parameter. For example, if the front-end developer wants to acquire 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, the parameter setting interface includes at least one name parameter input box and at least one type parameter input box thereon. 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 the parameter information can comprise the name parameter and the type parameter correspondingly. For example, if the front-end developer wants to obtain name data of a character 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 string in a type parameter input box on the parameter setting interface.
Optionally, in the above 3 possible implementations, a quantity parameter input box may be included on the parameter setting interface, where 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 acquire. Accordingly, the parameter information may also include a quantity parameter. For example, if the front-end developer needs to acquire 10 age types of data, the parameter information is: and (5) inputting the ages and 10 in a name parameter input box on the parameter setting interface, and inputting 10 in a quantity parameter input box by the front-end developer.
In one possible implementation, the parameter setting interface may be a general interface, which may be displayed by different terminals.
An add option may be provided on the parameter setting interface, and the add option may be used to add at least one of a name parameter input box or a type parameter input 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 one possible implementation manner, the parameter setting interface includes a completion option, and when a trigger operation on the completion option is detected, 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 number parameter input box, when the front end developer needs to obtain 10 pieces of data, and each piece of data includes name data of a character string type, age data of a number type and sex data of a boolean type, name, age and six (sex) may be input in the name parameter input box corresponding to an APIName, string, number (number) and boolean (boolean value) are input in the APIKind (interface type), and 10 is input in the number parameter input box corresponding to a total number, and then a "submit" completion option is clicked to send an interface identifier generation request to the server.
In step S43, the server receives an interface identifier generation request sent by the terminal, and allocates a parameter identifier to the first parameter information.
In one possible implementation, assigning the parameter identification to the first parameter information may include: the server allocates parameter identifiers for the first parameter information randomly, and the parameter identifiers and the first parameter information are stored locally in a corresponding mode, so that the first parameter identifiers are only required to be different from the existing parameter identifiers in the server. Or the server distributes the parameter identification for the first parameter information according to the preset rule, correspondingly stores the parameter identification and the first parameter information in the local, and when the parameter identification is in a digital form, the preset rule can be gradually increased according to the parameter identification.
In another possible implementation manner, the server allocating the parameter identifier to the first parameter information may include: adding 1 to the number based on the number of the existing parameter information in the database, and taking the number 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 primary key of the database is used for storing the parameter identification. The main key is an identification used for determining only one piece of data in the database, and the corresponding parameter identification can be found by inquiring the content stored in the main key in the database, so that the first parameter information corresponding to the parameter identification is obtained.
Wherein, the database may be in a table form, an id (identity) may be set as a primary key when the table is established, and the primary key in the table may be set in a stepwise increasing mode. That is, when the database stores a first data record, the primary key stores id=1, and when the database stores a second data record, the primary key stores id=2.
In one possible implementation, the server allocating the parameter identifier to the first parameter information may include: the server randomly allocates a first parameter identification to the first parameter information based on the existing parameter identification in the database, wherein the first parameter identification is different from the existing parameter identification in the database.
In one possible implementation, the database may be a relational database. Wherein the relational database may be a table organized into a set of formally described tables, the data in which can be stored or recalled in many different ways without the need to reorganize the database tables. The standard data query language sql is a relational database-based language, and is used to perform retrieval operations on data in a relational database.
Alternatively, the relational database may be a mysql relational database or an oracle relational database, which is not limited in the embodiments of the present disclosure.
As shown in fig. 6, the corresponding storage of the first parameter information and the parameter identifier may be that id is a primary key, and is used for parameter identification, where the storage field may be a name parameter and a type parameter in the first parameter information, for example, first target data required by a front-end developer is a name of a string type and an age of a number type, and a data structure { name: string, age: number } is stored in the Apidetail. the totalNum stores the amount of data required by the front-end developer. The server obtains the parameter identification and the first parameter information stored in the relational database 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 may be a universal interface in the server, where the universal interface means that different terminals can use the interface to obtain data, and when the data obtained by the terminals are different, the interface can also be used to obtain data. And the generic interface may generate data corresponding to the parameter information based on the parameter information. The template interface may be considered as an incomplete interface with a certain function, and the interface has a function of generating data, but does not know what kind of data is generated. The target interface identifier is generated 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 a developed code, runs the code under any time, accesses the server through the target interface identifier, and generates target data according to parameter information corresponding to the parameter identifier by the template interface, so that the functions of the template interface are complete. Therefore, the scheme is equivalent to providing an interface for the terminal, and the front-end developer is not required to manually write an interface function, so that the interface can be automatically generated.
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, so that the template interface can generate first target data for the terminal according to the first parameter information.
In one possible implementation, 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 of the template interface is linked, 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 destination interface identifier sent by the server.
The terminal receives the target interface identifier sent by the server, and in one possible implementation, since the terminal sends an interface identifier generation request to the server based on the parameter setting interface, after the target interface identifier sent by the terminal interface server, the target interface identifier may be displayed on the parameter setting interface, for example, as shown in fig. 5, the target interface identifier "http:// localhost: 5666/getdata=24" is displayed on the parameter setting interface.
After the front-end developer obtains the target interface identifier, the target interface identifier can be written into a developed code, when the code runs, first target data can be obtained according to the target interface identifier, 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 steps S41 to S45 are processes of obtaining the target interface identifier, the obtaining process may be performed when the front end developer writes the code, after the target interface identifier is obtained, the code may be immediately run, the first target data is obtained according to the target interface identifier, the test is performed according to the first target data, and whether the page layout, the data display and the like have problems is determined; and the code can be continuously written, other target interface identifiers can be continuously obtained, when the code writing reaches a certain completion degree, the code is operated, target data are obtained according to at least one target interface, and testing is carried out according to a plurality of target data, so that whether problems exist in page layout, data display and the like or not is determined.
In step S47, the server receives the target interface access request sent by the terminal, obtains 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.
Because the target interface identifier is generated based on the template interface identifier and the parameter identifier, the parameter identifier can be acquired based on the target interface identifier, and because the parameter identifier corresponds to the first parameter information, the first parameter information can be acquired based on the parameter identifier, 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: the name parameter is set through a key value in json (JavaScriptObject Notation) and the fixed content is set through a value, the data quantity is set through total num, the data is integrated into one piece of data, the data is the target data, the server sends the target data to the terminal, and interface return of analog data is realized.
For example, the first parameter information is string, name, and 10, and { name: string } is stored in the Apidetail in the database. the total num stores 10, and the name in the data structure { name: string } is a key value, and the string type data is a value. Wherein the value may be set to a fixed content, such as "small Ming". In order to intuitively see the data type of the data, the "name" may be added before the "name", and if the number of the data is 10, the 10 "name names" are integrated into one piece of data, and 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 the data required by the front-end developer changes, a target interface identifier may be reacquired, and the target data is acquired based on the reacquired target interface identifier, where the method of reacquiring the target interface identifier is similar to the above steps S41 to S45, and will not be described in detail herein.
When the data required by the front-end developer changes, the target data to be acquired can also be modified by modifying the parameter information corresponding to the parameter identifier. In one 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 second parameter information based on the target interface identifier.
The server, based on the target interface identifier, may replace the first parameter information corresponding to the parameter identifier with the second parameter information, which may include: and obtaining a parameter identifier based on the target interface identifier, and storing second parameter information which covers the first parameter information into a database based on the parameter identifier. And subsequently, when the parameter information is acquired based on the parameter identification, 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, first parameter information of first target data is sent to the server through the parameter setting interface, the server distributes parameter identifiers 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. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. When the first target data wanted by the front-end developer is changed, the first parameter information is reset on the parameter setting interface, and the target interface identification is acquired, so that the first target data is not needed to be manually modified in the text file, the workload of the developer is reduced, and the development cost is also reduced. The strong dependency relationship between the front-end and the back-end development is decoupled.
Subsequently, when the data required by the front-end developer changes, the parameter information of the changed data is only required to be input, and compared with the prior art that the front-end developer is required to manually modify the data in the text document, the writing is convenient, the writing process of the data document is reduced, and the cost of the front-end developer for self-developing the false data interface is reduced.
Fig. 8 is a block diagram of an interface identification generation apparatus according to an exemplary 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 obtaining unit 801 configured to perform a display-based parameter setting interface, obtain input first parameter information for indicating first target data to be obtained;
a first sending unit 802 configured to perform sending an interface identifier generation request to a server, where the interface identifier generation request carries the first parameter information, and 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 identification sent by the server.
According to the interface identifier generating device provided by the embodiment of the disclosure, first parameter information of first target data is sent to the server through the parameter setting interface, the server distributes parameter identifiers for the first parameter information, and the target interface identifiers are generated according to the template interface identifiers and the parameter identifiers of the template interface. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. In addition, the scheme has universality, front-end developers can set any parameter information on the parameter setting interface or modify the set parameter information according to requirements, first target data do not need to be manually modified in a text document, 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 perform sending a target interface access request to the server, where the target interface access request carries the target interface identifier, and the server obtains, based on the target interface identifier, the first parameter information corresponding to the parameter identifier, generates, based on the first parameter information, the first target data, and sends the first target data to the terminal;
the second receiving unit 805 is 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 for acquiring the input name parameter;
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 acquisition unit 806 configured to execute the parameter setting interface based on the display, to acquire input second parameter information for indicating second target data to be acquired;
A third sending unit 807 configured to send 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 one possible implementation, the parameter setting interface includes a completion option, and the first obtaining unit 801 is configured to obtain the input first parameter information when a trigger operation for the completion option is detected.
Fig. 10 is a block diagram of an interface identifier generating device, according to an example embodiment. Referring to fig. 10, the apparatus includes a first receiving unit 1001, an allocating 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, where the first parameter information is used to indicate first target data to be acquired;
an allocation unit 1002 configured to perform allocation of a parameter identification for the first parameter information;
a first generating unit 1003 configured to perform generation of a target interface identifier according to the template interface identifier of the template interface and the parameter identifier;
A first transmitting unit 1004 is configured to perform transmitting the target interface identification to the terminal.
The interface identifier generating device provided by the embodiment of the disclosure receives first parameter information sent by a terminal, the first parameter information is used for indicating first target data to be acquired, a server distributes parameter identifiers for 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. Because the target interface identifier is generated according to the template interface identifier and the parameter identifier, the terminal can call the template interface and acquire the first parameter information based on the target interface identifier, so that the first target data corresponding to the first parameter information is acquired, a front-end developer only needs to set the first parameter information on the parameter setting interface, a text document is not required to be established, and the first target data is input in the text document. In addition, the scheme has universality, front-end developers can set any parameter information on the parameter setting interface or modify the set parameter information according to requirements, first target data do not need to be manually modified in a text document, 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 allocation unit 1002 includes:
an allocation subunit 10021 configured to perform adding 1 to the number based on the number of parameter information already in the database, as a parameter identifier corresponding to the first parameter;
a storage subunit 10022 is configured to perform storing the first parameter information and the parameter identification in the database, where the primary key of the database is used to store the parameter identification.
In one possible implementation, the template interface of the template interface is identified as an address link;
the first generating unit 1003 is configured to perform adding the parameter identifier after the address linking of the template interface, resulting in 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 obtain the first parameter information corresponding to the parameter identifier based on the target interface 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 transmission of 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, where the second parameter information is used to indicate new target data to be acquired;
and a replacing unit 1010 configured to perform replacement of the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 12 is a block diagram of a terminal according to an embodiment of the present disclosure. The terminal 1200 is configured to perform the steps performed by the terminal in the above embodiment, and may be a portable mobile terminal, for example: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 1200 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 1200 includes: a processor 1201 and a memory 1202.
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 DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1201 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1201 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence ) processor for processing computing operations 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 memory 1202 is used to store at least one instruction for execution by processor 1201 to implement the interface identification generation method provided by the method embodiments herein.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203, and at least one peripheral. The processor 1201, the memory 1202, and the peripheral interface 1203 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 1203 via buses, signal lines, or a 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 device associated with an I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1201, the memory 1202, and the peripheral interface 1203 may be implemented on separate chips or circuit boards, 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 via electromagnetic signals. The radio frequency circuit 1204 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1204 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 1204 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 1204 may also include NFC (Near Field Communication ) related circuits, which are not limited in this application.
The display 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1205 is a touch display, the display 1205 also has the ability to collect touch signals at or above the surface of the display 1205. The touch signal may be input as a control signal to the processor 1201 for processing. At this time, 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 a front panel of the terminal 1200; in other embodiments, the display 1205 may 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 a folded surface of the terminal 1200. Even more, the display 1205 may be arranged in an irregular pattern that is not rectangular, i.e., a shaped screen. The display 1205 can be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1206 is used to capture images or video. Optionally, camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1206 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under 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 to the processor 1201 for processing, or inputting the electric signals to the radio frequency circuit 1204 for voice communication. For purposes of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 1200. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The positioning component 1208 is used to position the current geographic location of the terminal 1200 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 1208 may be a positioning component based on the united states GPS (Global Positioning System ), the beidou system of china, or the grainer system of russia, or the galileo system of the european union.
The power supply 1209 is used to power the various components in the terminal 1200. The power source 1209 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. 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, gyroscope sensor 1212, pressure sensor 1213, fingerprint sensor 1214, optical sensor 1215, and proximity sensor 1216.
The acceleration sensor 1211 may detect the 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 gravitational acceleration in three coordinate axes. The processor 1201 may control the touch display 1205 to display a user interface in a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for the 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 may implement the following functions based on the data collected by the gyro sensor 1212: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 1213 may be disposed at a side frame of the terminal 1200 and/or at a lower layer of the touch display 1205. When the pressure sensor 1213 is provided at a side frame of the terminal 1200, a grip signal of the terminal 1200 by a user may be detected, and the processor 1201 performs a left-right hand recognition or a shortcut operation according to the grip signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed at the lower layer of the touch display 1205, the processor 1201 performs control of the operability control on the UI interface according to the pressure operation of the user on the touch display 1205. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1214 is used to collect a fingerprint of the user, and the processor 1201 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the identity of the user based on the fingerprint collected. Upon recognizing that the user's identity is a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1214 may be provided on the front, back or side of the terminal 1200. When a physical key or vendor Logo is provided on the terminal 1200, the fingerprint sensor 1214 may be integrated with the physical key 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 based on the ambient light intensity collected by the optical sensor 1215. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display screen 1205 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the shooting parameters of camera assembly 1206 based on the intensity of ambient light collected by optical sensor 1215.
A proximity sensor 1216, also referred to as a distance sensor, is typically provided on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect the distance between the user and the front of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front face of the terminal 1200 gradually decreases, the processor 1201 controls the touch display 1205 to switch from the bright screen state to the off screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually increases, the touch display 1205 is controlled by the processor 1201 to switch from the off-screen state to the on-screen state.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
Fig. 13 is a block diagram illustrating a server 1300 according to an example embodiment. The server 1300 may be configured or configured to vary greatly, and may include one or more processors (central processing units, CPU) 1301 and one or more memories 1302, where the memories 1302 store at least one instruction that is loaded and executed by the processor 1301 to implement the methods provided by the various method embodiments described above. Of course, the server may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
Server 1300 may be used to perform the steps performed by the server in the interface identification generation method described above.
In an exemplary embodiment, there is also provided a storage medium, which when executed by a processor of a terminal, enables the terminal to perform the interface identification generation method as described above; the instructions in the storage medium, when executed by a processor of the 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 adaptations, 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (21)

1. An interface identifier generating method, characterized in that the method comprises:
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;
an interface identifier generating request is sent to a server, the interface identifier generating request carries the first parameter information, the server distributes parameter identifiers for the first parameter information, a target interface identifier comprising a template interface identifier and the parameter identifier is generated according to the template interface identifier of the template interface and the parameter identifier, the target interface identifier is sent to a terminal, and the template interface is a universal interface in the server;
receiving the target interface identification sent by the server;
sending a target interface access request to the server, wherein the target interface access request carries the target interface identifier, calling the template interface by the server based on the template interface identifier in the target interface identifier, acquiring the first parameter information corresponding to the parameter identifier in the target interface identifier through the template interface, generating the first target data based on the first parameter information, and sending the first target data to the terminal;
And receiving the first target data sent by the server.
2. The method of claim 1, wherein the parameter information comprises at least one of a name parameter or a type parameter.
3. The method of claim 2, wherein the parameter setting interface comprises at least one of:
at least one name parameter input box, wherein the name parameter input box is used for acquiring the input name parameters;
and at least one type parameter input box, wherein the type parameter input box is used for acquiring the input type parameters.
4. The method of claim 1, wherein after said receiving said destination interface identification sent by said server, said method further comprises:
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.
5. The method of any of claims 1-4, wherein the parameter setting interface includes a completion option, wherein the obtaining the entered 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.
6. An interface identifier generating method, characterized in that the method comprises:
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 for the first parameter information;
generating a target interface identifier comprising the template interface identifier and the parameter identifier according to the template interface identifier of the template interface and the parameter identifier, wherein the template interface is a universal interface in a server;
transmitting the target interface identifier to the terminal;
receiving a target interface access request sent by the terminal, wherein the target interface access request carries the target interface identifier;
calling the template interface based on the template interface identification in the target interface identification, acquiring the first parameter information corresponding to the parameter identification in the target interface identification through the template interface, and generating the first target data based on the first parameter information;
And sending the first target data to the terminal.
7. The method of claim 6, wherein assigning a parameter identification to the first parameter information comprises:
adding 1 to the number based on 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 primary key of the database is used for storing the parameter identification.
8. The method of claim 6, wherein the template interface identifier of the template interface is an address link, and wherein generating the target interface identifier based on the template interface identifier of the template interface and the parameter identifier comprises:
and adding the parameter identifier after the address of the template interface is linked to obtain the target interface identifier.
9. The method of claim 6, wherein after said transmitting the interface identification of the target interface to the terminal, the method further comprises:
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 second target data to be acquired;
And replacing the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
10. An interface identifier generating device, characterized in that the device comprises:
a first acquisition unit configured to execute a display-based parameter setting interface, acquire input first parameter information for indicating first target data to be acquired;
the first sending unit is configured to send an interface identifier generating request to a server, wherein the interface identifier generating request carries the first parameter information, the server distributes parameter identifiers for the first parameter information, generates a target interface identifier comprising a template interface identifier and the parameter identifiers according to the template interface identifier of the template interface and the parameter identifiers, and sends the target interface identifier to a terminal, and the template interface is a universal interface in the server;
a first receiving unit configured to perform receiving the target interface identifier sent by the server;
the second sending unit is configured to send a target interface access request to the server, wherein the target interface access request carries the target interface identifier, the server calls the template interface based on the template interface identifier in the target interface identifier, obtains the first parameter information corresponding to the parameter identifier in the target interface identifier through the template interface, generates the first target data based on the first parameter information, and sends the first target data to the terminal;
And a second receiving unit configured to perform receiving the first target data transmitted by the server.
11. The apparatus of claim 10, wherein the parameter information comprises at least one of a name parameter or a type parameter.
12. The apparatus of claim 11, wherein the parameter setting interface comprises at least one of:
at least one name parameter input box, wherein the name parameter input box is used for acquiring the input name parameters;
and at least one type parameter input box, wherein the type parameter input box is used for acquiring the input type parameters.
13. The apparatus of claim 10, wherein the apparatus further comprises:
a second acquisition unit configured to execute the parameter setting interface based on display, to acquire input second parameter information for indicating second target data to be acquired;
and the third sending unit is configured to send 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.
14. The apparatus according to any one of claims 10 to 13, wherein the parameter setting interface includes a completion option, and the first acquisition unit is configured to perform acquisition of the first parameter information inputted when a trigger operation for the completion option is detected.
15. An interface identifier generating device, characterized in that the device comprises:
the first receiving unit is configured to execute an interface identifier generation request sent by the 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 for the first parameter information;
the first generation unit is configured to execute a template interface identifier and the parameter identifier according to a template interface, and generate a target interface identifier comprising the template interface identifier and the parameter identifier, wherein the template interface is a universal interface in a server;
a first transmitting unit configured to perform transmitting the target interface identification to the terminal;
the second receiving unit is configured to execute receiving a target interface access request sent by the terminal, wherein the target interface access request carries the target interface identifier;
The acquisition unit is configured to execute the template interface based on the template interface identification in the target interface identification, call the template interface and acquire the first parameter information corresponding to the parameter identification in the target interface identification through the template interface;
a second generation unit configured to perform generation of the first target data through the template interface based on the first parameter information;
and a second transmission unit configured to perform transmission of the first target data to the terminal.
16. The apparatus of claim 15, wherein the distribution unit comprises:
an allocation subunit configured to perform adding 1 to the number based on the number of parameter information existing in the database, as a parameter identifier corresponding to the first parameter;
and the storage subunit is configured to perform corresponding storage of the first parameter information and the parameter identification into the database, and a primary key of the database is used for storing the parameter identification.
17. The apparatus of claim 15, wherein a template interface of the template interface is identified as an address link;
the first generating unit is configured to add the parameter identifier after the address linking of the template interface, so as to obtain the target interface identifier.
18. The apparatus of claim 15, wherein the apparatus further comprises:
the third receiving unit is configured to execute a parameter updating request sent by the receiving terminal, wherein the parameter updating request carries the target interface identifier and second parameter information, and the second parameter information is used for indicating second target data to be acquired;
and a replacing unit configured to perform replacement of the first parameter information corresponding to the parameter identifier with the second parameter information based on the target interface identifier.
19. A terminal, the terminal comprising:
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-5.
20. A server, the server comprising:
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 6-9.
21. 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 of any one of claims 1 to 5; 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 any one of claims 6 to 9.
CN201910829029.3A 2019-09-03 2019-09-03 Interface identifier generation method, device, equipment and storage medium Active CN110569064B (en)

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 CN110569064A (en) 2019-12-13
CN110569064B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567023A (en) * 2010-12-28 2012-07-11 微软公司 Parameterized interface identifier techniques
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250104B (en) * 2015-06-09 2019-08-20 阿里巴巴集团控股有限公司 A kind of remote operating system for server, method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567023A (en) * 2010-12-28 2012-07-11 微软公司 Parameterized interface identifier techniques
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

Also Published As

Publication number Publication date
CN110569064A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN107885533B (en) Method and device for managing component codes
CN109828802B (en) List view display method, device and readable medium
CN112000331A (en) Page rendering method and device, electronic equipment and storage medium
CN110321126B (en) Method and device for generating page code
CN108920606B (en) Map data processing method, map data processing device, terminal equipment and storage medium
CN111459466B (en) Code generation method, device, equipment and storage medium
CN112749362B (en) Control creation method, device, equipment and storage medium
CN111737100A (en) Data acquisition method, device, equipment and storage medium
CN111159604A (en) Picture resource loading method and device
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN108038232B (en) Webpage editing method, device and system and storage medium
CN110515962B (en) Method and device for caching data, electronic equipment and storage medium
CN110569064B (en) Interface identifier generation method, device, equipment and storage medium
CN107943484B (en) Method and device for executing business function
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN111580892B (en) Method, device, terminal and storage medium for calling service components
CN113051485B (en) Group searching method, device, terminal and storage medium
CN113535039B (en) Method and device for updating page, electronic equipment and computer readable storage medium
CN112596810B (en) Loading prompt information display method and device, electronic equipment and storage medium
CN114329292A (en) Resource information configuration method and device, electronic equipment and storage medium
CN110045999B (en) Method, device, terminal and storage medium for drawing assembly
CN111294320B (en) Data conversion method and device
CN109816047B (en) Method, device and equipment for providing label and readable storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN112783533A (en) Version information updating method, version information updating device, terminal and storage 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