CN113360300B - Interface call link generation method, device, equipment and readable storage medium - Google Patents

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

Info

Publication number
CN113360300B
CN113360300B CN202110732756.5A CN202110732756A CN113360300B CN 113360300 B CN113360300 B CN 113360300B CN 202110732756 A CN202110732756 A CN 202110732756A CN 113360300 B CN113360300 B CN 113360300B
Authority
CN
China
Prior art keywords
interface
information
interface 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.)
Active
Application number
CN202110732756.5A
Other languages
Chinese (zh)
Other versions
CN113360300A (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
Beijing Space 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 Space Technology Co ltd filed Critical Beijing Space Technology 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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of interface testing and blockchain, and provides a method, a device and equipment for generating an interface call link and a readable storage medium, wherein the method comprises the following steps: acquiring a first interface information list; inputting the first interface information list into a preset parameter type recognition model to obtain the parameter type of each parameter in the first interface information list, and updating each parameter in the first interface information list based on the parameter type 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 call link according to the target interface information and each interface information in the associated interface information set. The application can improve the efficiency and accuracy of interface call link generation.

Description

Interface call 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 development, a front-end terminal device and a back-end server (e.g., an underlying database) are required to interface, and the terminal device needs to access the server through an underlying interface defined by a developer (e.g., an API (Application Programming Interface, application program interface)) to provide a micro service to the outside.
At present, a plurality of levels possibly exist between the terminal equipment and the server, each level is provided with a corresponding interface, the terminal equipment calls the bottom layer interface in the server in a layer-by-layer calling mode, but the current prior art needs to search and recall the interface of the next layer every time in the layer-by-layer calling process of the interface, and the generated calling links need to be tested, so that the calling efficiency of the interface is low, and a large amount of resources and manpower are consumed. Therefore, how to quickly and accurately generate the interface call link is a problem to be solved at present.
Disclosure of Invention
The application mainly aims to provide a method, a device and equipment for generating an interface call link and a readable storage medium, aiming at improving the efficiency and the accuracy of generating the interface call link.
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 class identification model to obtain a parameter class of each parameter in the first interface information list, wherein the parameter class 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 call 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 generation device, where the interface call link generation device includes: the device comprises an acquisition module, a generation module, an updating 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 also provides 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 as described above.
In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the interface call link generation method as described above.
The application provides a method, a device, equipment and a readable storage medium for generating an interface call link. By the scheme, the efficiency and the accuracy of interface call link generation can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of steps of an interface call link generation method according to an embodiment of the present application;
FIG. 2 is a flow chart of 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 device according to an embodiment of the present application;
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 computer device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
The embodiment of the application provides a method, a device, equipment and a readable storage medium for generating an interface call link. The interface calling link generation method can be applied to terminal equipment, and the terminal equipment can be electronic equipment such as mobile phones, tablet computers, notebook computers, desktop computers, personal digital assistants, wearable equipment and the like.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of an interface call link generation method according to an embodiment of the present application.
As shown in fig. 1, the interface call link generation method includes steps S101 to S105.
Step S101, a first interface information list is acquired.
The first interface information list is an interface information list formed by combining interface parameters of each interface, and the arrangement mode of the parameters in the first interface information list can be set according to actual situations, which is not particularly limited in the application.
In one embodiment, as shown in fig. 2, step S101 includes sub-steps S1011 to S1013.
Substep S1011, acquires at least one data packet.
When the terminal equipment is in operation, acquiring a data packet called in the operation process of the terminal equipment through a preset packet grabbing tool to obtain at least one data packet. The preset bale plucking tool may be selected according to practical situations, for example, the preset bale plucking tool may be a Fiddler bale plucking tool. The data packet in the running process of the terminal equipment can be accurately obtained through the preset packet grabbing tool.
When the computer downloads data, the packet capturing tool extracts the data packets downloaded by the computer through the Fiddler, so as to obtain at least one data packet downloaded by the computer, wherein the number of the obtained data packets can be set according to the actual situation, only one data packet can be obtained, and a plurality of data packets can be obtained.
And step S1012, analyzing at least one data packet to obtain message information of at least one interface.
Converting the data packet into a text format form to obtain a data packet text, and analyzing the data packet text to obtain message information of the interface, wherein the message information comprises a request mode of the interface, a URL (uniform resource locator, uniform resource locator system), first header information, sender information, second header information and return body information.
It should be noted that, the number of message information of the generated interfaces is determined according to the number of interfaces and the number of data packets in the data packets. For example, a data packet only includes one interface, and only message information of one interface can be analyzed; the data packet comprises two interfaces, and message information of the two interfaces is analyzed; and analyzing the message information of the four interfaces if the two data packets comprise two interfaces.
Substep S1013, generating a first interface information list according to the message information of at least one of the interfaces.
Analyzing the message information of at least one interface to obtain a request mode, a URL, first header information, transmitting 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 pattern, a URL, first header information, sender information, second header information, and return body information of at least one interface. The request mode, the URL, the first head information, the transmitting body information, the second head information and the returning body information of the interface can be accurately obtained through analyzing the message information, and a first interface information list can be generated according to the request mode, the URL, the first head information, the transmitting body information, the second head information and the returning body information of the interface.
In an embodiment, the parsing of the message information of at least one interface to obtain the request mode, URL, first header information, sender information, second header information and return body information of at least one interface may be: obtaining a request mode identification, a URL identification, a first head information identification, a sender information identification, a second head information identification and a return information identification of an interface in message information, obtaining a preset request mode identification, a URL identification, a first head information identification, a sender information identification, a second head information identification and a return information identification, and obtaining a mapping relation table between the request mode identification, the URL, the first head information, the sender information, the second head information and the return information according to the mapping relation table and the request mode identification, the URL identification, the first head information identification, the sender information identification, the second head information identification and the return information identification of the interface in the message information, thereby obtaining the request mode, the URL, the first head information, the sender information, the second head information and the return information of the interface. Wherein, the mapping relation table is pre-established. The request mode, the URL, the first header information, the sender information, the second header information and the return body information of the interface included in the message information can be accurately determined through the request mode identification, the URL identification, the first header information identification, the sender information identification, the second header information identification and the return body information identification of the interface in the mapping relation table and the message information.
In an embodiment, the manner of generating the first interface information list based on the request manner of the at least one interface, the URL, the first header information, the sender information, the second header information, and the returned body information may be: the request mode, the URL, the first header information, the transmitting body information, the second header information and the returning body information of the interface are converted into key value pair modes to obtain key value pair information of the interface, the key value pair information of the interface is analyzed into dictionary modes and stored in the 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 recognition model to obtain the parameter type of each parameter in the first interface information list, wherein the parameter type recognition model is a pre-trained neural network model.
The preset parameter type recognition model can comprise a long-term and short-term memory artificial neural network, a convolutional neural network model, a cyclic convolutional neural network and other neural network models. The parameter categories comprise a first parameter category, a second parameter category and a third parameter category, wherein the first parameter category is an instruction parameter, the second parameter category is a parameter which is necessary to be filled by a user, such as a user account number and a password, and the third parameter category is an associated parameter.
In one embodiment, the preset parameter class identification model includes an input layer, a hidden layer, and an output layer. The input layer includes a first predetermined number of neural networks, the hidden layer includes a second predetermined number of neural networks, and the output layer includes a third predetermined number of neural networks. The first preset number, the second preset number and the third preset number can be set according to actual conditions, the application is not limited in particular, for example, the first preset number can be 2, the second preset number can be 3 and the third preset number can be 2, when the neural network is a long-short-period memory artificial neural network, the input layer comprises a double-layer long-short-period memory artificial neural network, the hidden layer comprises three-layer long-short-period memory artificial neural network, and the output layer comprises a double-layer long-short-period memory artificial neural network.
In one embodiment, a first interface information list is input to an input layer to obtain a first vector; inputting the first vector into 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, so that 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 class identification model may be: 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 a parameter class 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 class of each parameter in the first interface information list, determining whether the preset parameter class identification model is converged according to the target loss value, updating the parameters of the preset parameter class identification model if the preset parameter class identification model is not converged, and continuously training the updated preset parameter class identification model until the preset parameter class identification model is converged.
In an embodiment, according to each parameter in the first interface information list and the parameter class of each parameter in the first interface information list, the method for 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 the logarithm of the first parameter to obtain a second parameter, carrying out addition operation on 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 the opposite number to obtain a target loss value.
In an embodiment, the determining whether the preset parameter class 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 class identification model converges; and if the target loss value is greater than or equal to a preset threshold value, determining that the preset parameter class identification model is not converged. The preset threshold may be set according to the actual situation, which is not limited in the present application, and for example, the preset threshold may be set to 0.25. By determining whether the target loss value is smaller than a preset threshold value, the convergence condition of the preset parameter type recognition model can be determined, and the accuracy of model recognition 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 to obtain an updated second interface information list. The preset parameter updating rule can be set according to actual conditions. The parameters in the first interface information list are updated through the preset parameter updating rule, so that the accuracy of the subsequent interface link generation can be improved.
The preset parameter updating rule is exemplified by: the parameters of the first parameter class keep the original parameter values, the parameters of the second parameter class are updated to input_remark, and the parameters of the third parameter class are updated to svrid. For example, each parameter in the first interface information list is { "page":1, "index": xxxx "," svrid ":111111}, where page is a parameter of the first parameter class, index is a parameter of the second parameter class, svrid is a parameter of the third parameter class, and according to the preset parameter updating rule, the parameters in the first interface information list are updated, so that each parameter in the updated second interface information list is {" page ":1," index ": input_index," svrid ": svrid }.
Step S104, obtaining 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 call link request, extracting interface information from the interface call link request, and taking the extracted interface information as target interface information. Of course, there are other ways of obtaining the target interface information, and the embodiment of the present application is not limited thereto, for example, the second last interface information may be found from the second interface information list, and the second last interface information may be used as the target interface information.
In an embodiment, the method for obtaining the associated interface information set by screening the interface information associated with the target interface information from the second interface information list may be: extracting associated parameters in the sender information of the target interface information, and taking the associated parameters as target parameters; and screening 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 associated interface information can be accurately found through the associated parameters in the sender information of the target interface information.
In an embodiment, based on the target parameter, the method for 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: screening interface information with target parameters in the returned body information from the second interface information list, and adding the selected interface information into the associated interface information set to update the associated 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 based on the updated target parameters, screening the interface information with the updated target parameters in the returned body information from the second interface information list, 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 parameters are not available, and finishing updating the associated interface information set. And the interface information associated with the target interface information can be found through the recursion of the associated parameters of the target interface information layer by layer, so as to obtain an associated interface information set.
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 the interface information 2 is target interface information, the association parameter in the sender information of the interface information 2 is association parameter 2, the returned body information of the interface information 7 is queried to include association parameter 2, the interface information 7 is association interface information, the interface information 7 is added to the associated interface information set, the association parameter in the sender information of the interface information 7 is association parameter 7, the interface information 5 is association interface information, the interface information 5 is added to the associated interface information set, the association parameter in the sender information of the interface information 5 is association parameter 5, the association interface information set is updated if the association parameter 5 is included in the returned body information of the interface information 7, and the association interface information set includes the interface information 7 and the interface information 5.
Step 105, generating a target interface call 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 each piece of interface information in the target interface information and 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, a target interface call 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 associated parameters of sender information of a target interface; acquiring the association parameters of the sender information and the association parameters of the return 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 sender information of the target interface, the associated parameters of the sender information of each interface in the associated interface information set and the associated parameters of the returned body information.
The associated interface information set includes interface information 7 and interface information 5, the target interface information is interface information 2, the sender information of the interface information 2 includes associated parameter 2, the sender information of the interface information 7 includes associated parameter 7, the return body information includes associated parameter 2, and the return information of the interface information 5 includes 7, so that the splicing order of the interface information is sequentially interface information 5, interface information 7 and interface information 2.
In an embodiment, after the target interface call link is obtained, generating a target interface operation detection parameter according to the target interface call link, obtaining a target interface information operation log, determining whether an error occurs in the target interface operation process according to the target interface information operation log and the target interface operation detection parameter, and generating an interface call error early warning if the error occurs in the operation process so as to remind a user of the error occurrence of the interface information call. And the link is called by the target interface to detect the operation of the interface, so that the accuracy and the safety of data transmission are improved.
In an embodiment, according to the target interface information operation log and the target interface operation detection parameter, the determining whether an error occurs in the target interface operation process may be: determining whether the operation parameters in the target interface information operation log are the same as the target interface operation detection parameters, if the operation parameters in the target interface information operation log are the same as the target interface operation detection parameters, determining that no error occurs in the operation process of the target interface, and if the operation parameters in the target interface information operation log are different from the target interface operation detection parameters, determining that an error occurs in the operation process of the target interface.
According to the interface call link generation method provided by the embodiment, the parameter type of each parameter in the first interface information list can be accurately obtained by acquiring the first interface information list and inputting the first interface information list into the preset parameter type identification model, each parameter in the first interface information list is updated based on the parameter type of each parameter, a second interface information list with clear parameter type can be obtained, target interface information is acquired, interface information associated with the target interface information is screened out from the second interface information list, an associated interface information set can be accurately obtained, and the target interface call 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 interface call link generation can be improved.
Referring to fig. 3, fig. 3 is a schematic block diagram of an interface call link generating device according to an embodiment of the present application.
As shown in fig. 3, the interface call link generation apparatus 200 includes: an acquisition module 210, a generation module 220, an update module 230, and a screening module 240, wherein:
the acquiring module 210 is configured to acquire a first interface information list;
The generating module 220 is configured to input the first interface information list to a preset parameter class identification model, so as to obtain a parameter class 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 class of each parameter to obtain a second interface information list;
the acquiring module 210 is further configured to acquire target interface information;
the screening module 240 is configured to screen 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 an obtaining sub-module 211, a parsing module 212, and a generating sub-module 213, where:
the acquiring submodule 211 is configured to acquire at least one data packet;
the parsing module 212 is configured to parse at least one of the data packets to obtain message information of at least one interface;
The generating sub-module 213 is configured to generate a first interface information list according to the message information of at least one of the interfaces.
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 URL, first header information, sender information, second header information and return body information of at least one interface;
a first interface information list is generated based on a request mode, a URL, first header information, transmitting body information, second header information and returning body information of at least one of the interfaces.
In an embodiment, the set of associated interface information includes at least first associated interface information associated with the target interface information and second associated interface information 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.
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 each piece of interface information in the target interface information and 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 associated parameters of sender information of the target interface;
acquiring the association parameters of the sender information and the association parameters of the return 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 sender information of the target interface, the associated parameters of the sender information of each interface in the associated interface information set and the associated parameters of the returned body information.
In an embodiment, the preset parameter class 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 into 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, for convenience and brevity of description, a specific working process of the interface call link generation device may refer to a corresponding process in the foregoing interface call link generation method embodiment, which is not described herein.
Referring to fig. 5, fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present application.
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 non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions that, when executed, cause a processor to perform any of a number of interface call link generation methods.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform any of the interface call link generation methods.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
It should be appreciated that the bus may be, for example, an I2C (Inter-integrated Circuit) bus, the Memory may be a Flash chip, a Read-Only Memory (ROM) disk, an optical disk, a U-disk or a removable hard disk, etc., the processor may be a central processing unit (Central Processing Unit, CPU), the processor may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein the 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 run 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 class identification model to obtain a parameter class of each parameter in the first interface information list, wherein the parameter class 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 call link according to the target interface information and each interface information in the associated interface information set.
In one embodiment, when implementing the acquiring the first interface information list, the processor 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 one embodiment, when implementing the generating a first interface information list according to the message information of at least one interface, the processor is configured to implement:
analyzing the message information of at least one interface to obtain a request mode, a URL, first header information, sender information, second header information and return body information of at least one interface;
a first interface information list is generated based on a request mode, a URL, first header information, transmitting body information, second header information and returning body information of at least one of the interfaces.
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, wherein 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, the processor, when implementing the generating a target interface call link according to the target interface information and each interface information in the associated interface information set, is configured to implement:
Determining the splicing sequence of each interface information in the target interface information and the associated interface information set;
and splicing each piece of interface information in the target interface information and the associated interface information set according to the splicing sequence to obtain the target interface calling link.
In one embodiment, the processor, when implementing the determining the concatenation order of the target interface information and each interface information in the set of associated interface information, is configured to implement:
acquiring associated parameters of sender information of the target interface;
acquiring the association parameters of the sender information and the association parameters of the return 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 sender information of the target interface, the associated parameters of the sender information of each interface in the associated interface information set and the associated parameters of the returned body information.
In one embodiment, when the processor implements the preset parameter class identification model including an input layer, a hidden layer and an output layer, the processor inputs the first interface information list to the preset parameter class identification model to obtain a parameter class 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 into 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, 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, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, the computer program including program instructions that, when executed, implement a method for invoking various embodiments of a link generation method with reference to an interface of the present application.
The computer readable storage medium may be an internal storage unit of the computer device according to 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), or the like, which are 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 from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
It is to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification 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 the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. 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 one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (7)

1. An interface call link generation method, comprising:
acquiring at least one data packet;
analyzing at least one data packet to obtain message information of at least one interface;
analyzing the message information of at least one interface to obtain a request mode, a URL, first header information, sender information, second header information and return body information of at least one interface;
generating a first interface information list based on a request mode, a URL, first header information, transmitting body information, second header information and returning body information of at least one interface;
inputting the first interface information list into a preset parameter class identification model to obtain a parameter class of each parameter in the first interface information list, wherein the parameter class 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, wherein 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;
And generating a target interface call 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 the generating the 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 each piece of interface information in the target interface information and the associated interface information set according to the splicing sequence to obtain the target interface calling link.
3. The interface call link generation method of claim 2, wherein the determining a concatenation order of the target interface information and each interface information in the associated interface information set comprises:
acquiring associated parameters of sender information of the target interface;
acquiring the association parameters of the sender information and the association parameters of the return 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 sender information of the target interface, the associated parameters of the sender information of each interface in the associated interface information set and the associated parameters of the returned body information.
4. The method for generating an interface call link according to any one of claims 1 to 3, wherein the preset parameter class 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 class identification model to obtain a parameter class 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 into 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.
5. An interface call link generation apparatus, characterized in that the interface call link generation apparatus includes: the device comprises an acquisition module, a generation module, an updating module and a screening module, wherein:
the acquisition module is used for acquiring at least one data packet; analyzing at least one data packet to obtain message information of at least one interface; analyzing the message information of at least one interface to obtain a request mode, a URL, first header information, sender information, second header information and return body information of at least one interface; generating a first interface information list based on a request mode, a URL, first header information, transmitting body information, second header information and returning body information of at least one interface;
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 configured to screen interface information associated with the target interface information from the second interface information list to obtain an associated interface information set, where the associated interface information set 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 an associated parameter in the target interface information, and the second associated interface information includes an associated parameter in the first associated interface information;
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.
6. 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 of claims 1 to 4.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the interface call link generation method according to any of claims 1 to 4.
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 CN113360300A (en) 2021-09-07
CN113360300B true 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)

Families Citing this family (2)

* 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
CN116643902B (en) * 2023-07-27 2023-10-20 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product

Citations (9)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10620945B2 (en) * 2017-12-21 2020-04-14 Fujitsu Limited API specification generation

Patent Citations (9)

* 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
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

Also Published As

Publication number Publication date
CN113360300A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US11150874B2 (en) API specification generation
CN109684607B (en) JSON data analysis method and device, computer equipment and storage medium
CN112154420B (en) Automatic intelligent cloud service testing tool
CN113360300B (en) Interface call link generation method, device, equipment and readable storage medium
CN106874253A (en) Recognize the method and device of sensitive information
CN111859986A (en) Semantic matching method, device, equipment and medium based on multitask twin network
CN112597020A (en) Interface testing method and device, computer equipment and storage medium
CN114840869A (en) Data sensitivity identification method and device based on sensitivity identification model
CN113961768B (en) Sensitive word detection method and device, computer equipment and storage medium
CN111651140A (en) Service method and device based on workflow
CN113535582A (en) Interface testing method, device, equipment and computer readable storage medium
CN117493309A (en) Standard model generation method, device, equipment and storage medium
CN111209325B (en) Service system interface identification method, device and storage medium
CN116776030A (en) Gray release method, device, computer equipment and storage medium
CN112395880A (en) Error correction method and device for structured triples, computer equipment and storage medium
CN112087473A (en) Document downloading method and device, computer readable storage medium and computer equipment
CN112016297B (en) Intention recognition model testing method and device, computer equipment and storage medium
CN114817523A (en) Abstract generation method and device, computer equipment and storage medium
CN110502483B (en) Data processing method, data processing device, computer equipment and storage medium
CN110795424B (en) Characteristic engineering variable data request processing method and device and electronic equipment
CN112148902A (en) Data processing method, device, server and storage medium
CN110780983A (en) Task exception handling method and device, computer equipment and storage medium
CN117235236B (en) Dialogue method, dialogue device, computer equipment and storage medium
CN115718696B (en) Source code cryptography misuse detection method and device, electronic equipment and storage medium
CN113535594B (en) Method, device, equipment and storage medium for generating service scene test case

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

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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant