CN113360300A - Interface calling link generation method, device, equipment and readable storage medium - Google Patents

Interface calling link generation method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113360300A
CN113360300A CN202110732756.5A CN202110732756A CN113360300A CN 113360300 A CN113360300 A CN 113360300A CN 202110732756 A CN202110732756 A CN 202110732756A CN 113360300 A CN113360300 A CN 113360300A
Authority
CN
China
Prior art keywords
interface
interface information
information
parameter
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.)
Granted
Application number
CN202110732756.5A
Other languages
Chinese (zh)
Other versions
CN113360300B (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 Space Technology Co ltd
Shenzhen Lian Intellectual Property Service Center
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110732756.5A priority Critical patent/CN113360300B/en
Publication of CN113360300A publication Critical patent/CN113360300A/en
Application granted granted Critical
Publication of CN113360300B publication Critical patent/CN113360300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The application relates to the technical field of interface test and block chain, and provides a method, a device, equipment and a readable storage medium for generating an interface call link, wherein the method comprises the following steps: acquiring a first interface information list; inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list, and updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list; acquiring target interface information, and screening interface information associated with the target interface information from a second interface information list to obtain an associated interface information set; and generating a target interface calling link according to the target interface information and each interface information in the associated interface information set. The method and the device can improve the efficiency and the accuracy of the generation of the interface calling link.

Description

Interface calling link generation method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of interface testing, and in particular, to a method, an apparatus, a device, and a readable storage medium for generating an interface call link.
Background
In the process of software project development, a front-end terminal device needs to be interfaced with a back-end server (e.g., an underlying database), and the terminal device needs to access the server through an underlying Interface (e.g., an Application Programming Interface (API)) defined by a developer to provide a micro service to the outside.
At present, a plurality of levels may exist between a terminal device and a server, each level has a corresponding interface, the terminal device calls a bottom interface in the server in a layer-by-layer calling mode, but in the process of calling the interfaces layer by layer in the prior art, the next layer of interface needs to be searched and called each time, and generated calling links need to be tested, so that the calling efficiency of the interfaces is low, and a large amount of resources and manpower are consumed. Therefore, how to generate the interface call link quickly and accurately is a problem to be solved urgently at present.
Disclosure of Invention
The application mainly aims to provide an interface calling link generation method, an interface calling link generation device, interface calling equipment and a readable storage medium, and aims to improve the efficiency and accuracy of interface calling link generation.
In a first aspect, the present application provides a method for generating an interface call link, including:
acquiring a first interface information list;
inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list, wherein the parameter category identification model is a pre-trained neural network model;
updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list;
acquiring target interface information, and screening interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
and generating a target interface calling link according to the target interface information and each interface information in the associated interface information set.
In a second aspect, the present application further provides an interface call link generating apparatus, where the interface call link generating apparatus includes: the device comprises an acquisition module, a generation module, an update module and a screening module, wherein:
the acquisition module is used for acquiring a first interface information list;
the generation module is used for inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list;
the updating module is used for updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list;
the acquisition module is also used for acquiring target interface information;
the screening module is used for screening the interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
the generating module is further configured to generate a target interface call link according to the target interface information and each interface information in the associated interface information set.
In a third aspect, the present application further provides a computer device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the interface call link generation method as described above.
In a fourth aspect, the present application further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the interface call link generation method as described above.
The application provides an interface calling link generation method, device, equipment and readable storage medium, by acquiring a first interface information list, then the first interface information list is input into a preset parameter category identification model, the parameter category of each parameter in the first interface information list can be accurately obtained, and based on the parameter category of each parameter, each parameter in the first interface information list is updated, a second interface information list with clear parameter types can be obtained, the subsequent screening of the associated interface information is more accurate, the target interface information is obtained, and the interface information associated with the target interface information is screened out from the second interface information list, so that an associated interface information set can be accurately obtained, and a target interface calling link can be accurately generated through the target interface information and each interface information in the associated interface information set. By the scheme, the efficiency and the accuracy of generating the interface calling link can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating steps of a method for generating an interface call link according to an embodiment of the present application;
FIG. 2 is a flow diagram illustrating sub-steps of the interface call link generation method of FIG. 1;
fig. 3 is a schematic block diagram of an interface call link generation apparatus according to an embodiment of the present disclosure;
FIG. 4 is a schematic block diagram of a sub-module of the interface call link generation apparatus of FIG. 3;
fig. 5 is a schematic block diagram of a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The embodiment of the application provides an interface call link generation method, an interface call link generation device, interface call link generation equipment and a readable storage medium. The interface calling link generation method can be applied to terminal equipment, and the terminal equipment can be electronic equipment such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and wearable equipment.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating steps of a method for generating an interface call link according to an embodiment of the present application.
As shown in fig. 1, the interface call link generation method includes steps S101 to S105.
And step S101, acquiring a first interface information list.
The first interface information list is an interface information list formed by combining interface parameters of each interface, and an arrangement mode of the parameters in the first interface information list may be set according to an actual situation, which is not specifically limited in the present application.
In one embodiment, as shown in fig. 2, step S101 includes sub-step S1011 to sub-step S1013.
And a substep S1011, obtaining at least one data packet.
When the terminal equipment runs, the data packet called in the running process of the terminal equipment is obtained through a preset packet capturing tool, and at least one data packet is obtained. The preset bag-grabbing tool can be selected according to actual conditions, for example, the preset bag-grabbing tool can be a Fiddler bag-grabbing tool. The data packet in the operation process of the terminal equipment can be accurately obtained through the preset packet capturing tool.
Illustratively, when the computer downloads data, the data packets downloaded by the computer are extracted by a Fiddler packet-capturing tool, so as to obtain at least one data packet downloaded by the computer, wherein the number of the obtained data packets may be set according to actual conditions, only one data packet may be obtained, or a plurality of data packets may be obtained.
Substep S1012, parsing at least one of the data packets to obtain message information of at least one interface.
Converting the data packet into a text format to obtain a data packet text, and analyzing the data packet text to obtain message information of the interface, wherein the message information includes a request mode of the interface, a Uniform Resource Locator (URL), first header information, sender information, second header information, and return information.
It should be noted that the number of message messages for generating an interface is determined according to the number of interfaces in a data packet and the number of data packets. For example, if only one interface is included in one data packet, only the message information of one interface can be analyzed; if one data packet comprises two interfaces, analyzing message information of the two interfaces; and analyzing the message information of the four interfaces if each data packet comprises two interfaces.
And a substep S1013 of generating a first interface information list according to the message information of at least one interface.
Analyzing the message information of at least one interface to obtain a request mode, a URL (uniform resource locator), first header information, sending body information, second header information and returning body information of at least one interface; a first interface information list is generated based on a request mode, a URL, first header information, sending body information, second header information, and returning body information of at least one interface. The request mode, the URL, the first header information, the sending body information, the second header information and the returning body information of the interface can be accurately obtained by analyzing the message information, and a first interface information list can be generated according to the request mode, the URL, the first header information, the sending body information, the second header information and the returning body information of the interface.
In an embodiment, the method of analyzing the message information of the at least one interface to obtain the request mode, the URL, the first header information, the sender information, the second header information, and the return information of the at least one interface may be: the method comprises the steps of obtaining a request mode identification, a URL identification, a first head information identification, a sending body information identification, a second head information identification and a returning body information identification of an interface in message information, obtaining a mapping relation table between a preset request mode identification, the URL identification, the first head information identification, the sending body information identification, the second head information identification, the returning body information identification and the request mode, the URL, the first head information, the sending body information, the second head information identification and the returning body information, and obtaining the request mode, the URL, the first head information, the sending body information identification, the second head information identification and the returning body information of the interface according to the mapping relation table and the request mode identification, the URL identification, the first head information, the sending body information, the second head information and the returning body information of the interface in the message information. Wherein, the mapping relation table is established in advance. Through the mapping relation table and the request mode identification, the URL identification, the first head information identification, the sending body information identification, the second head information identification and the returning body information identification of the interface in the message information, the request mode, the URL, the first head information, the sending body information, the second head information and the returning body information of the interface included in the message information can be accurately determined.
In an embodiment, the manner of generating the first interface information list based on the request manner, the URL, the first header information, the sending body information, the second header information, and the returning body information of the at least one interface may be: converting the request mode, URL, first header information, sending body information, second header information and returning body information of the interface into a key-value pair form to obtain key-value pair information of the interface, analyzing the key-value pair information of the interface into a dictionary form and storing the dictionary form into an interface information list to obtain a first interface information list. The convenience of parameter storage is improved by carrying out format conversion on the parameters of the interface.
Step S102, inputting the first interface information list into a preset parameter type identification model to obtain the parameter type of each parameter in the first interface information list, wherein the parameter type identification model is a pre-trained neural network model.
The preset parameter type identification model can comprise neural network models such as a long-term and short-term memory artificial neural network, a convolutional neural network model and a cyclic convolutional neural network. The parameter categories include a first parameter category, a second parameter category and a third parameter category, the first parameter category is an instruction parameter, the second parameter category is a parameter that must be filled by a user, such as a user account and a password, and the third parameter category is an association parameter.
In one embodiment, the preset parameter category identification model comprises an input layer, a hidden layer and an output layer. The input layer includes a first preset number of neural networks, the hidden layer includes a second preset number of neural networks, and the output layer includes a third preset number of neural networks. The first preset number, the second preset number and the third preset number may be set according to actual conditions, and the present application is not specifically limited thereto, for example, the first preset number may be 2, the second preset number may be 3, and the third preset number may be 2, when the neural network is a long-short term memory artificial neural network, the input layer includes a double-layer long-short term memory artificial neural network, the hidden layer includes a three-layer long-short term memory artificial neural network, and the output layer includes a double-layer long-short term memory artificial neural network.
In one embodiment, a first interface information list is input to an input layer to obtain a first vector; inputting a first vector to the hidden layer to obtain a second vector; and inputting the second vector to the output layer to obtain the parameter category of each parameter in the first interface information list. The first interface information list is input into the preset parameter type identification model, and the parameter type of each parameter in the first interface information list can be accurately determined.
In an embodiment, the method for updating the parameters in the preset parameter type identification model may be as follows: inputting the first interface information list into an input layer to obtain a first vector, inputting the first vector into a hidden layer to obtain a second vector, inputting the second vector into an output layer to obtain the parameter type of each parameter in the first interface information list, determining a target loss value according to each parameter in the first interface information list and the parameter type of each parameter in the first interface information list, determining whether the preset parameter type identification model converges or not according to the target loss value, if the preset parameter type identification model does not converge, updating the parameter of the preset parameter type identification model, and continuing training the updated preset parameter type identification model until the convergence.
In an embodiment, according to each parameter in the first interface information list and the parameter category of each parameter in the first interface information list, the manner of determining the target loss value may be: inputting each parameter in the first interface information list into a softmax function to obtain a first parameter, taking a logarithm of the first parameter to obtain a second parameter, adding the parameter type of each parameter in the first interface information list and the second parameter to obtain a third parameter of each parameter, carrying out average calculation on the third parameter and taking an inverse number to obtain a target loss value.
In an embodiment, the manner of determining whether the predetermined parameter type identification model converges according to the target loss value may be: determining that the target loss value is smaller than a preset threshold value, and if the target loss value is smaller than the preset threshold value, determining that the preset parameter type identification model is converged; and if the target loss value is greater than or equal to the preset threshold value, determining that the preset parameter type identification model is not converged. The preset threshold may be set according to actual conditions, which is not specifically limited in this application, and for example, the preset threshold may be set to 0.25. By determining whether the target loss value is smaller than the preset threshold value, the convergence condition of the preset parameter type identification model can be determined, and the accuracy of model identification is improved.
Step S103, updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list.
After the parameter category of each parameter in the first interface information list is determined, a preset parameter updating rule is obtained, and each parameter in the first interface information list is updated based on the preset parameter updating rule, so that an updated second interface information list is obtained. Wherein, the preset parameter updating rule can be set according to the actual situation. Parameters in the first interface information list are updated through a preset parameter updating rule, and the accuracy of the subsequent generation of the interface link can be improved.
Illustratively, the preset parameter update rule is as follows: the parameters of the first parameter type are kept the original parameter values, the parameters of the second parameter type are updated to input _ remap, and the parameters of the third parameter type are updated to svrid. For example, each parameter in the first interface information list is { "page": 1, "remap": xxxx "," svrid ": 111111}, where page is a parameter of the first parameter class, remap is a parameter of the second parameter class, and svrid is a parameter of the third parameter class, and according to the preset parameter update rule, the parameter in the first interface information list is updated, and each parameter in the updated second interface information list is {" page ": 1," remap ": input _ remap," svrid ": svrid }.
And step S104, acquiring target interface information, and screening interface information associated with the target interface information from the second interface information list to obtain an associated interface information set.
The associated interface information set at least comprises first associated interface information and second associated interface information, the first associated interface information is associated with the target interface information, the second associated interface information is associated with the first associated interface information, the first associated interface information comprises associated parameters in the target interface information, and the second associated interface information comprises associated parameters in the first associated interface information.
In an embodiment, the manner of obtaining the target interface information may be: and finding the last piece of interface information from the second interface information list, and taking the last piece of interface information as target interface information. Or acquiring an interface calling link request, extracting interface information from the interface calling link request, and taking the extracted interface information as target interface information. Of course, other manners of obtaining the target interface information exist, which is not specifically limited in the embodiment of the present application, for example, the penultimate interface information may also be found from the second interface information list, and the penultimate interface information is used as the target interface information.
In an embodiment, the manner of screening the interface information associated with the target interface information from the second interface information list to obtain the associated interface information set may be: extracting the associated parameters in the sender information of the target interface information, and taking the associated parameters as target parameters; and screening the interface information associated with the target interface information from the second interface information list based on the target parameters to obtain an associated interface information set. The related interface information can be accurately found through the related parameters in the sender information of the target interface information.
In an embodiment, based on the target parameter, the interface information associated with the target interface information is screened from the second interface information list, and the manner of obtaining the associated interface information set may be: screening interface information with target parameters in the returned body information from the second interface information list, and adding the selected interface information into a relevant interface information set to update the relevant interface information set; extracting the associated parameters in the sender information of the selected interface information, and taking the associated parameters as updated target parameters; and screening interface information with the updated target parameter in the returned body information from the second interface information list based on the updated target parameter, adding the selected interface information into the associated interface information set to update the associated interface information set, traversing all the interface information in the second interface information list until the same associated parameter does not exist, and finishing updating the associated interface information set. Through the level-to-level recursion of the associated parameters of the target interface information, the interface information associated with the target interface information can be found, and an associated interface information set is obtained.
Illustratively, the second interface information list includes interface information 1, interface information 2, interface information 3, interface information 4, interface information 5, interface information 6, interface information 7, interface information 8, interface information 9, and interface information 10, where interface information 2 is target interface information, an associated parameter in sending body information of interface information 2 is associated parameter 2, it is found that the return body information of interface information 7 includes associated parameter 2, interface information 7 is associated interface information, interface information 7 is added into the associated interface information set, the associated parameter in sending body information of interface information 7 is associated parameter 7, it is found that the return body information of interface information 5 includes associated parameter 7, interface information 5 is associated interface information, interface information 5 is added into the associated interface information set, the associated parameter in sending body information of interface information 5 is associated parameter 5, if the return body information without the interface information in the second interface information list includes the association parameter 5, the associated interface information set is updated, and the associated interface information set includes the interface information 7 and the interface information 5.
And step S105, generating a target interface calling link according to the target interface information and each interface information in the associated interface information set.
After the associated interface information set is obtained, determining the splicing sequence of the target interface information and each interface information in the associated interface information set; and splicing the target interface information and each interface information in the associated interface information set according to the splicing sequence to obtain a target interface calling link. By splicing the target interface information and each interface information in the associated interface information set, the target interface calling link can be accurately obtained.
In an embodiment, the manner of determining the splicing order of each interface information in the target interface information and the associated interface information set may be: acquiring the associated parameters of the sender information of the target interface; acquiring the association parameters of the sending body information and the association parameters of the returning body information of each interface in the association interface information set; and determining the splicing sequence of the target interface information and each interface information in the associated interface information set according to the associated parameters of the transmitting body information of the target interface, the associated parameters of the transmitting body information of each interface in the associated interface information set and the associated parameters of the returning body information.
Illustratively, the associated interface information set includes interface information 7 and interface information 5, the target interface information is interface information 2, the sending entity information of the interface information 2 includes associated parameters 2, the sending entity information of the interface information 7 includes associated parameters 7, the returning entity information includes associated parameters 2, and the returning information of the interface information 5 includes 7, so that the splicing sequence of the interface information is interface information 5, interface information 7, and interface information 2 in sequence.
In an embodiment, after the target interface calling link is obtained, a target interface operation detection parameter is generated according to the target interface calling link, a target interface information operation log is obtained, whether an error occurs in the target interface operation process is determined according to the target interface information operation log and the target interface operation detection parameter, and if the error occurs in the operation process, an interface calling error early warning is generated to remind a user of the occurrence of the error in the interface information calling. And the target interface calls the link to detect the operation of the interface, so that the accuracy and the safety of data transmission are improved.
In an embodiment, the method for determining whether an error occurs in the operation process of the target interface according to the target interface information operation log and the target interface operation detection parameter may be: and determining whether the operation parameters in the target interface information operation log are the same as the target interface operation detection parameters, if so, determining that no error occurs in the target interface operation process, and if not, determining that an error occurs in the target interface operation process.
The method for generating the interface call link according to the embodiment includes obtaining the first interface information list, inputting the first interface information list to the preset parameter category identification model, obtaining the parameter category of each parameter in the first interface information list accurately, updating each parameter in the first interface information list based on the parameter category of each parameter, obtaining the second interface information list with distinct parameter categories, obtaining the target interface information, screening the interface information associated with the target interface information from the second interface information list, obtaining the associated interface information set accurately, and generating the target interface call link accurately according to the target interface information and each interface information in the associated interface information set. By the scheme, the efficiency and the accuracy of generating the interface calling link can be improved.
Referring to fig. 3, fig. 3 is a schematic block diagram of an interface call link generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 3, the interface call link generation apparatus 200 includes: an obtaining module 210, a generating module 220, an updating module 230, and a screening module 240, wherein:
the obtaining module 210 is configured to obtain a first interface information list;
the generating module 220 is configured to input the first interface information list to a preset parameter category identification model, so as to obtain a parameter category of each parameter in the first interface information list;
the updating module 230 is configured to update each parameter in the first interface information list based on a parameter category of each parameter, so as to obtain a second interface information list;
the obtaining module 210 is further configured to obtain target interface information;
the screening module 240 is configured to screen the interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
the generating module 220 is further configured to generate a target interface call link according to the target interface information and each interface information in the associated interface information set.
In an embodiment, as shown in fig. 4, the obtaining module 210 further includes a obtaining sub-module 211, a parsing module 212, and a generating sub-module 213, where:
the obtaining sub-module 211 is configured to obtain at least one data packet;
the parsing module 212 is configured to parse at least one data packet to obtain message information of at least one interface;
the generating submodule 213 is configured to generate a first interface information list according to the message information of at least one interface.
In an embodiment, the generating module 220 is further configured to:
analyzing the message information of at least one interface to obtain a request mode, a Uniform Resource Locator (URL), first header information, sending body information, second header information and returning body information of at least one interface;
and generating a first interface information list based on the request mode, the URL, the first header information, the sending body information, the second header information and the return body information of at least one interface.
In an embodiment, the set of associated interface information at least includes first associated interface information and second associated interface information, the first associated interface information is associated with the target interface information, the second associated interface information is associated with the first associated interface information, the first associated interface information includes associated parameters in the target interface information, and the second associated interface information includes associated parameters in the first associated interface information.
In an embodiment, the generating module 220 is further configured to:
determining the splicing sequence of each interface information in the target interface information and the associated interface information set;
and splicing the target interface information and each interface information in the associated interface information set according to the splicing sequence to obtain the target interface calling link.
In an embodiment, the generating module 220 is further configured to:
acquiring the associated parameters of the sender information of the target interface;
acquiring the association parameters of the sending body information and the association parameters of the returning body information of each interface in the association interface information set;
and determining the splicing sequence of the target interface information and each interface information in the associated interface information set according to the associated parameters of the transmitting body information of the target interface, the associated parameters of the transmitting body information of each interface in the associated interface information set and the associated parameters of the returning body information.
In an embodiment, the preset parameter category identification model includes an input layer, a hidden layer, and an output layer, and the generating module 220 is further configured to:
inputting the first interface information list into the input layer to obtain a first vector;
inputting the first vector to the hidden layer to obtain a second vector;
and inputting the second vector to the output layer to obtain the parameter category of each parameter in the first interface information list.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the interface call link generation apparatus described above may refer to the corresponding process in the foregoing interface call link generation method embodiment, and details are not described herein again.
Referring to fig. 5, fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present disclosure.
As shown in fig. 5, the computer device includes a processor, a memory, and a communication interface connected by a system bus, wherein the memory may include a nonvolatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any of the interface call link generation methods.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for the execution of a computer program on a non-volatile storage medium, which when executed by the processor, causes the processor to perform any of the interface call link generation methods.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the bus is, for example, an I2C (Inter-Integrated Circuit) bus, the Memory may be a Flash chip, a Read-Only Memory (ROM) magnetic disk, an optical disk, a usb disk, or a removable hard disk, the Processor may be a Central Processing Unit (CPU), the Processor may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
acquiring a first interface information list;
inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list, wherein the parameter category identification model is a pre-trained neural network model;
updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list;
acquiring target interface information, and screening interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
and generating a target interface calling link according to the target interface information and each interface information in the associated interface information set.
In one embodiment, the processor, when implementing the obtaining the first interface information list, is configured to implement:
acquiring at least one data packet;
analyzing at least one data packet to obtain message information of at least one interface;
and generating a first interface information list according to the message information of at least one interface.
In an embodiment, when the processor generates the first interface information list according to the packet information of at least one of the interfaces, the processor is configured to:
analyzing the message information of at least one interface to obtain a request mode, a Uniform Resource Locator (URL), first header information, sending body information, second header information and returning body information of at least one interface;
and generating a first interface information list based on the request mode, the URL, the first header information, the sending body information, the second header information and the return body information of at least one interface.
In one embodiment, the processor is further configured to implement:
the associated interface information set at least comprises first associated interface information and second associated interface information, the first associated interface information is associated with the target interface information, the second associated interface information is associated with the first associated interface information, the first associated interface information comprises associated parameters in the target interface information, and the second associated interface information comprises associated parameters in the first associated interface information.
In one embodiment, when the processor generates a target interface call link according to the target interface information and each interface information in the associated interface information set, the processor is configured to:
determining the splicing sequence of each interface information in the target interface information and the associated interface information set;
and splicing the target interface information and each interface information in the associated interface information set according to the splicing sequence to obtain the target interface calling link.
In one embodiment, the processor, when performing the determining the splicing order of the target interface information and each interface information in the associated interface information set, is configured to perform:
acquiring the associated parameters of the sender information of the target interface;
acquiring the association parameters of the sending body information and the association parameters of the returning body information of each interface in the association interface information set;
and determining the splicing sequence of the target interface information and each interface information in the associated interface information set according to the associated parameters of the transmitting body information of the target interface, the associated parameters of the transmitting body information of each interface in the associated interface information set and the associated parameters of the returning body information.
In one embodiment, when the processor implements that the preset parameter category identification model includes an input layer, a hidden layer, and an output layer, and the first interface information list is input to the preset parameter category identification model to obtain a parameter category of each parameter in the first interface information list, the processor is configured to implement:
inputting the first interface information list into the input layer to obtain a first vector;
inputting the first vector to the hidden layer to obtain a second vector;
and inputting the second vector to the output layer to obtain the parameter category of each parameter in the first interface information list.
It should be noted that, as will be clearly understood by those skilled in the art, for convenience and brevity of description, the specific working process of the computer device described above may refer to the corresponding process in the foregoing interface call link generation method embodiment, and details are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to the embodiments of the interface call link generation method in the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An interface call link generation method, comprising:
acquiring a first interface information list;
inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list, wherein the parameter category identification model is a pre-trained neural network model;
updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list;
acquiring target interface information, and screening interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
and generating a target interface calling link according to the target interface information and each interface information in the associated interface information set.
2. The interface call link generation method of claim 1, wherein said obtaining the first list of interface information comprises:
acquiring at least one data packet;
analyzing at least one data packet to obtain message information of at least one interface;
and generating a first interface information list according to the message information of at least one interface.
3. The interface call link generation method according to claim 2, wherein the generating a first interface information list according to the packet information of at least one of the interfaces includes:
analyzing the message information of at least one interface to obtain a request mode, a Uniform Resource Locator (URL), first header information, sending body information, second header information and returning body information of at least one interface;
and generating a first interface information list based on the request mode, the URL, the first header information, the sending body information, the second header information and the return body information of at least one interface.
4. The interface call link generation method according to claim 1, wherein the set of associated interface information includes at least first associated interface information and second associated interface information, the first associated interface information being associated with the target interface information, the second associated interface information being associated with the first associated interface information, the first associated interface information including associated parameters in the target interface information, the second associated interface information including associated parameters in the first associated interface information.
5. The interface call link generation method of claim 3, wherein generating a target interface call link from the target interface information and each interface information in the associated interface information set comprises:
determining the splicing sequence of each interface information in the target interface information and the associated interface information set;
and splicing the target interface information and each interface information in the associated interface information set according to the splicing sequence to obtain the target interface calling link.
6. The interface call link generation method of claim 5, wherein said determining a splicing order of the target interface information and each interface information in the associated interface information set comprises:
acquiring the associated parameters of the sender information of the target interface;
acquiring the association parameters of the sending body information and the association parameters of the returning body information of each interface in the association interface information set;
and determining the splicing sequence of the target interface information and each interface information in the associated interface information set according to the associated parameters of the transmitting body information of the target interface, the associated parameters of the transmitting body information of each interface in the associated interface information set and the associated parameters of the returning body information.
7. The interface call link generation method according to any one of claims 1 to 6, wherein the preset parameter category identification model includes an input layer, a hidden layer, and an output layer, and the inputting the first interface information list into the preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list includes:
inputting the first interface information list into the input layer to obtain a first vector;
inputting the first vector to the hidden layer to obtain a second vector;
and inputting the second vector to the output layer to obtain the parameter category of each parameter in the first interface information list.
8. An interface call link generation apparatus, comprising: the device comprises an acquisition module, a generation module, an update module and a screening module, wherein:
the acquisition module is used for acquiring a first interface information list;
the generation module is used for inputting the first interface information list into a preset parameter category identification model to obtain the parameter category of each parameter in the first interface information list;
the updating module is used for updating each parameter in the first interface information list based on the parameter category of each parameter to obtain a second interface information list;
the acquisition module is also used for acquiring target interface information;
the screening module is used for screening the interface information associated with the target interface information from the second interface information list to obtain an associated interface information set;
the generating module is further configured to generate a target interface call link according to the target interface information and each interface information in the associated interface information set.
9. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the interface call link generation method of any one of claims 1 to 7.
10. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the interface call link generation method of any one of claims 1 to 7.
CN202110732756.5A 2021-06-29 2021-06-29 Interface call link generation method, device, equipment and readable storage medium Active CN113360300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110732756.5A CN113360300B (en) 2021-06-29 2021-06-29 Interface call link generation method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110732756.5A CN113360300B (en) 2021-06-29 2021-06-29 Interface call link generation method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113360300A true CN113360300A (en) 2021-09-07
CN113360300B CN113360300B (en) 2023-10-24

Family

ID=77537259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110732756.5A Active CN113360300B (en) 2021-06-29 2021-06-29 Interface call link generation method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113360300B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116643902A (en) * 2023-07-27 2023-08-25 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product
CN116954942A (en) * 2023-06-29 2023-10-27 广州汽车集团股份有限公司 Interface calling method, device, vehicle and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908485A (en) * 2017-10-26 2018-04-13 中国平安人寿保险股份有限公司 Interface parameters transmission method, device, equipment and computer-readable recording medium
CN109491894A (en) * 2018-10-25 2019-03-19 深圳壹账通智能科技有限公司 A kind of method and apparatus of interface testing
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium
US20190196811A1 (en) * 2017-12-21 2019-06-27 Fujitsu Limited Api specification generation
CN110324159A (en) * 2018-03-28 2019-10-11 华为技术有限公司 Link configuration method and controller
CN110532175A (en) * 2019-07-29 2019-12-03 深圳中兴网信科技有限公司 Interface test method, interface test device, server and storage medium
CN112487066A (en) * 2020-12-26 2021-03-12 李闽 Information tracking method based on block chain and big data and artificial intelligence service center
CN112667720A (en) * 2020-12-28 2021-04-16 平安普惠企业管理有限公司 Conversion method, device, equipment and storage medium of interface data model
CN112698971A (en) * 2020-12-30 2021-04-23 平安科技(深圳)有限公司 Rule engine based parameter conversion method, device, equipment and medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908485A (en) * 2017-10-26 2018-04-13 中国平安人寿保险股份有限公司 Interface parameters transmission method, device, equipment and computer-readable recording medium
US20190196811A1 (en) * 2017-12-21 2019-06-27 Fujitsu Limited Api specification generation
CN110324159A (en) * 2018-03-28 2019-10-11 华为技术有限公司 Link configuration method and controller
CN109491894A (en) * 2018-10-25 2019-03-19 深圳壹账通智能科技有限公司 A kind of method and apparatus of interface testing
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium
CN110532175A (en) * 2019-07-29 2019-12-03 深圳中兴网信科技有限公司 Interface test method, interface test device, server and storage medium
CN112487066A (en) * 2020-12-26 2021-03-12 李闽 Information tracking method based on block chain and big data and artificial intelligence service center
CN112667720A (en) * 2020-12-28 2021-04-16 平安普惠企业管理有限公司 Conversion method, device, equipment and storage medium of interface data model
CN112698971A (en) * 2020-12-30 2021-04-23 平安科技(深圳)有限公司 Rule engine based parameter conversion method, device, equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954942A (en) * 2023-06-29 2023-10-27 广州汽车集团股份有限公司 Interface calling method, device, vehicle and storage medium
CN116643902A (en) * 2023-07-27 2023-08-25 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product
CN116643902B (en) * 2023-07-27 2023-10-20 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product

Also Published As

Publication number Publication date
CN113360300B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US11868242B1 (en) Method, apparatus, and computer program product for predictive API test suite selection
CN108763398B (en) Database configuration parameter processing method and device, computer equipment and storage medium
CN107609004B (en) Application program embedding method and device, computer equipment and storage medium
CN109783785B (en) Method and device for generating experiment detection report and computer equipment
CN113360300B (en) Interface call link generation method, device, equipment and readable storage medium
CN113254472B (en) Parameter configuration method, device, equipment and readable storage medium
CN110880014A (en) Data processing method and device, computer equipment and storage medium
CN111124898B (en) Question-answering system testing method and device, computer equipment and storage medium
CN114610635A (en) Interface test case generation method and device, computer equipment and storage medium
CN113535582A (en) Interface testing method, device, equipment and computer readable storage medium
CN112286815A (en) Interface test script generation method and related equipment thereof
CN110795646A (en) Request processing method and device, electronic equipment and computer-readable storage medium
CN116168403A (en) Medical data classification model training method, classification method, device and related medium
CN115470152A (en) Test code generation method, test code generation device, and storage medium
CN112016297B (en) Intention recognition model testing method and device, computer equipment and storage medium
US11928208B2 (en) Calculation device, calculation method, and calculation program
CN110569659B (en) Data processing method and device and electronic equipment
US10873550B2 (en) Methods for communication in a communication network for reduced data traffic
CN111858386A (en) Data testing method and device, computer equipment and storage medium
CN115718696B (en) Source code cryptography misuse detection method and device, electronic equipment and storage medium
CN112633955B (en) Advertisement conversion abnormity detection method and system and computer readable storage medium
CN116795689A (en) Method and device for testing tool kit, computer equipment and storage medium
CN117909393A (en) Interface parameter mapping acquisition method, device, equipment, medium and program product
CN113886260A (en) Automatic testing method, system, computer equipment and storage medium
CN114546483A (en) Data verification method and device, computer equipment 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230915

Address after: Room 102, Room 1003, 10th Floor, No. 37 Nanmofang Road, Chaoyang District, Beijing, 100000

Applicant after: Beijing SPACE Technology Co.,Ltd.

Address before: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen LIAN intellectual property service center

Effective date of registration: 20230915

Address after: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen LIAN intellectual property service center

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant