Interface protocol management method and device, equipment and storage medium

By storing and managing the protocol files of the interface protocol on the public access platform, the problem of rigid interface protocol format requirements and low acquisition convenience in the existing technology is solved, custom format conversion and convenient acquisition are realized, and the management efficiency of the interface protocol is improved.

CN119847588APending Publication Date: 2025-04-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311348653.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, when using cloud service management interface protocols, the format requirements are rigid and the convenience of obtaining interface protocols is low. Especially in the multi-party cooperative development scenario, network environment and authentication restrictions make it difficult for devices to access the interface protocol platform.

Method used

By obtaining at least one first format interface protocol, format conversion is performed to generate protocol files corresponding to the interface protocol, and store these files on a public access platform, supporting custom format conversion and open storage, any device can obtain interface protocol files through the public access platform.

Benefits of technology

It realizes the custom format conversion of interface protocols, meets actual usage needs, reduces useless information and redundant content in protocol files, and improves the convenience of accessing interface protocol files through public access platforms, and lifts network environment and authentication restrictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847588A_ABST
    Figure CN119847588A_ABST
Patent Text Reader

Abstract

The invention discloses an interface protocol management method and device, equipment and a storage medium, and belongs to the technical field of computers and the Internet. The method comprises the steps of obtaining at least one interface protocol of a first format; wherein the first format corresponds to a format requirement of a cloud service storage interface protocol; performing format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol comprises protocol content with a use requirement in the interface protocol, and the format conversion is used for extracting the protocol content with the use requirement from the interface protocol; the protocol files corresponding to the interface protocols are stored to a public access platform, and the public access platform is used for managing the protocol files and providing the protocol files for equipment accessing the public access platform in the form of an open source platform. The method supports custom generation of the protocol file based on the interface protocol, and the protocol file is stored through the public access platform, so that the convenience of obtaining the interface protocol is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and Internet technology, and in particular to a management method, device, equipment and storage medium for an interface protocol. Background Art

[0002] The interface protocol is used to help front-end and back-end staff reach consensus on data transmission, feedback, etc. during application development and testing. In order to facilitate the maintenance of the interface protocol, the interface protocol needs to be managed.

[0003] In related technologies, a third-party cloud service is used to manage the interface protocol. The back-end staff converts the interface protocol into the protocol format required by the cloud service and uploads the converted interface protocol to the cloud service. When there is a need to call the protocol, the device needs to access the cloud service through the intranet and read the interface protocol from the cloud service database.

[0004] However, using cloud services to manage interface protocols places rigid requirements on the format of the interface protocols, and it is less convenient to obtain the interface protocols. Summary of the invention

[0005] The present application provides a method, device, equipment and storage medium for managing an interface protocol. The technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a method for managing an interface protocol is provided, the method being executed by a first device, the method comprising acquiring at least one interface protocol in a first format; wherein the first format corresponds to a format requirement of a cloud service storage interface protocol;

[0007] Performing format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol;

[0008] The protocol files corresponding to the respective interface protocols are stored in a public access platform, and the public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

[0009] According to one aspect of an embodiment of the present application, a method for managing an interface protocol is provided, the method being performed by a public access platform, the public access platform being used to manage a protocol file corresponding to an interface protocol, and providing the protocol file to a device accessing the public access platform in the form of an open source platform, the method comprising:

[0010] Receiving a first access request from a second device; wherein the first access request includes a storage address of the interface protocol;

[0011] According to the storage address of the interface protocol, searching for the protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes the protocol content with usage requirements in the interface protocol;

[0012] Send a protocol file corresponding to the interface protocol to the second device.

[0013] According to one aspect of an embodiment of the present application, a device for managing an interface protocol is provided, the device comprising:

[0014] A protocol acquisition module, used to acquire at least one interface protocol in a first format; wherein the first format corresponds to the format requirements of the cloud service storage interface protocol;

[0015] A format conversion module, used to perform format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol;

[0016] The file storage module is used to store the protocol files corresponding to each of the interface protocols in a public access platform. The public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

[0017] According to one aspect of an embodiment of the present application, a device for managing an interface protocol is provided, the device comprising:

[0018] A request receiving module, configured to receive a first access request from a second device; wherein the first access request includes a storage address of the interface protocol;

[0019] A file search module, used to search for a protocol file corresponding to the interface protocol according to a storage address of the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol;

[0020] The file sending module is used to send the protocol file corresponding to the interface protocol to the second device.

[0021] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the interface protocol management method as described above.

[0022] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the interface protocol management method as described above.

[0023] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the interface protocol management method as described above.

[0024] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0025] Compared to the related art that requires storing the interface protocol in the database of the cloud service according to the format requirements of the cloud service, the solution provided by the present application supports customized format conversion of the interface protocol, and supports the staff to set the format conversion method of the interface protocol according to the actual use of the interface protocol. In this way, it helps to make the protocol file corresponding to the interface protocol obtained by format conversion meet the actual use requirements. Compared to directly saving the interface protocol, the format conversion of the interface protocol in this method can select the content of the interface protocol. It ensures that the protocol file corresponding to the interface protocol can not only meet the staff's use requirements for the interface protocol, but also help reduce the useless information carried in the protocol file corresponding to the interface protocol, and help reduce the redundancy of the content of the protocol file corresponding to the interface protocol.

[0026] Moreover, the present application manages the protocol files corresponding to the interface protocol by using a public access platform, so that when the device obtains the protocol files corresponding to the interface protocol, it is not restricted by the intranet environment requirements and network authentication, which helps to improve the convenience of obtaining the protocol files corresponding to the interface protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of a solution implementation environment provided by an exemplary embodiment of the present application;

[0028] Figure 2 It is a schematic diagram of an inventive concept provided by an exemplary embodiment of the present application;

[0029] Figure 3 is a flow chart of a method for managing an interface protocol provided by an exemplary embodiment of the present application;

[0030] Figure 4 is a schematic diagram of a protocol file provided by an exemplary embodiment of the present application;

[0031] Figure 5is a schematic diagram of a protocol file update process provided by an exemplary embodiment of the present application;

[0032] Figure 6 is a schematic diagram of a protocol file editing interface provided by an exemplary embodiment of the present application;

[0033] Figure 7 is a flow chart of a method for managing an interface protocol provided by another exemplary embodiment of the present application;

[0034] Figure 8 is an interaction diagram of a method for managing an interface protocol provided by an exemplary embodiment of the present application;

[0035] Fig. 9 is a schematic diagram of a method for managing an interface protocol provided by an exemplary embodiment of the present application;

[0036] Fig.10 is a block diagram of an interface protocol management device provided by an exemplary embodiment of the present application;

[0037] Fig.11 is a block diagram of an interface protocol management device provided by another exemplary embodiment of the present application;

[0038] Fig.12 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0040] First, the terms involved in this application are introduced and explained.

[0041] Intelligent Traffic System (ITS): It is the effective and comprehensive application of advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthening the connection between vehicles, roads and users, thus forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy.

[0042] Interface protocol: refers to the rules and standards followed when software systems interact with each other. Interface protocols include data format, data transmission method, communication protocol and other elements.

[0043] Interface protocol platform: refers to a third-party cloud platform used to manage interface protocols (corresponding to the cloud service in the claims). The interface protocol platform has requirements for the format of the interface protocol. Before uploading the interface protocol to the interface protocol platform, the device needs to adjust the interface protocol to a format that meets the requirements of the interface protocol platform. The interface protocol platform has identity restrictions on device access. The interface protocol platform will only provide the interface protocol to the device if the device identity meets the conditions.

[0044] Exemplarily, the interface protocol platform verifies whether the device identity meets the conditions through the network environment. For example, when a device accesses the interface protocol platform, the interface protocol platform authenticates the device's access network. The interface protocol platform will only display the interface protocol to the device if the device's access network is an organization's intranet.

[0045] Public Access Platform: refers to a free, open source, distributed source code management (version control) system.

[0046] Interface simulation (mock): used to simulate the interface to return information to the requester.

[0047] Figure 1 1 is a schematic diagram of a solution implementation environment provided by an exemplary embodiment of the present application. The solution implementation environment may include: a first device 10, a second device 20 and a public access platform 30.

[0048] The first device 10 may be an electronic device such as a personal computer, a tablet computer, a mobile phone, a wearable device, a smart home appliance, a vehicle terminal, a virtual reality, an augmented reality, an aircraft, etc. Exemplarily, the first device 10 is a device used by a backend staff, who is responsible for managing the interface protocol through the first device 10.

[0049] A client of a target application is running on the first device 10. The target application is used to implement the management function of the interface protocol. For example, the target application is used to generate a protocol file corresponding to the interface protocol. In addition, the target application can also be a news application, a shopping application, a social application, an interactive entertainment application, a browser application, a content sharing application, a virtual reality application, an augmented reality application, etc., which is not limited in the embodiments of the present application. In addition, for different applications, the corresponding functions will also be different, which can be pre-configured according to actual needs, which is not limited in the embodiments of the present application.

[0050] The second device 2 may be an electronic device such as a personal computer, a tablet computer, a mobile phone, a wearable device, a smart home appliance, a vehicle-mounted terminal, a virtual reality, an augmented reality, an aircraft, etc. A client of a target application is running on the second device 20. The target application is used to implement the management function of the interface protocol. In addition, the target application can also obtain the protocol file of the interface protocol from the public access platform 30 when the interface protocol needs to be obtained.

[0051] Exemplarily, the first device 10 is a device used by any developer. The developer includes but is not limited to at least one of the following: backend staff, frontend staff, and technical cooperation personnel. The second device 20 and the first device 10 can be the same device or two different devices, which is not limited in this application.

[0052] The public access platform 30 is used to provide background services for the client of the target application in the access device (the access device includes at least one of the following: the first device 10, the second device 20). The public access platform 30 is used to store and maintain the protocol file corresponding to at least one interface protocol. Exemplarily, the protocol file corresponding to the interface protocol is stored in the public access platform 30 in the form of a file.

[0053] The public access platform 30 is supported and operated by a server, which may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, but is not limited to these.

[0054] The public access platform 30 has at least data receiving, storage and computing functions. There is a communication connection between the public access platform 30 and the first device 10, and there is a communication connection between the public access platform 30 and the second device 20. So that the public access platform 30 receives at least one protocol file corresponding to the interface protocol sent by the first device 10, and the public access platform 30 provides the second device 20 with the protocol file corresponding to the interface protocol and the updated protocol file.

[0055] During the development process, front-end staff and back-end staff need to communicate based on the interface protocol. In related technologies, in order to improve communication efficiency, the interface protocol needs to be stored on the interface protocol platform (corresponding to the cloud service in the claims). Staff use devices to access the interface protocol platform through the company's intranet, and view and obtain the interface protocol from the interface protocol platform.

[0056] Since the interface protocol platform is usually a third-party platform, the interface protocol platform has format requirements for the storage format of the interface protocol. Before submitting the interface protocol to the interface protocol platform, the staff needs to convert the interface protocol to obtain an interface protocol that meets the format requirements. After receiving the interface protocol, the interface protocol platform stores the interface protocol in the database of the interface protocol platform according to the relationship between key-value pairs.

[0057] The access to the interface protocol platform is limited by the network environment. In short, the device can only access the interface protocol platform using the company or organization intranet. For the same device, the interface protocol platform can be accessed using the intranet, but not using the extranet. In the scenario where multiple staff members are engaged in cooperative development, the interface protocol platform's restrictions on the network environment result in the inability of devices that cannot use the intranet (such as devices used by other staff members outside a company) to access the interface protocol platform. In other words, other staff members cannot view and obtain the interface protocol through the interface protocol platform. This means that during the cooperative development process, other staff members need to frequently communicate with staff members within the company about the interface protocol, and the interface protocol is less convenient to obtain. Moreover, when the interface protocol is updated, other staff members cannot be notified of the change in the interface protocol in a timely manner, resulting in inconsistencies in the interface protocol versions owned by multiple staff members during the development process, which can easily cause misunderstandings and slow down development efficiency.

[0058] Figure 2 It is a schematic diagram of the inventive concept provided by an exemplary embodiment of the present application.

[0059] In the solution provided by the present application, the interface protocol is converted into a protocol file corresponding to the interface protocol according to development needs, and the protocol file corresponding to the interface protocol is stored by the public access platform. The public access platform can provide the protocol file corresponding to the interface protocol to each access user equally, so that the device can obtain, use, and store the protocol file corresponding to the interface protocol. Therefore, the problem in the related art that the device can only access the interface protocol platform through the intranet due to the network environment and authentication restrictions of the interface protocol platform is solved, which helps to improve the convenience of obtaining the interface protocol.

[0060] Figure 3 is a flowchart of an interface protocol management method provided by an exemplary embodiment of the present application. For example, the execution subject of the method may be Figure 1 The first device 10 in the embodiment of the present invention is used as the execution subject to introduce the management method of the interface protocol. Figure 3 As shown, the method may include the following steps (310-330):

[0061] Step 310, obtaining at least one interface protocol in a first format; wherein the first format corresponds to the format requirements of the cloud service storage interface protocol.

[0062] In some embodiments, the first device is used to complete the deployment of the interface protocol so that the interface protocol can be easily obtained through this solution. Optionally, the first device is a device used by back-end staff. In one example, the back-end staff pre-deploys the protocol file corresponding to the interface protocol on the public access platform through the first device, so that during the development and testing process, any device obtains the protocol file corresponding to the interface protocol through the public access platform. Of course, the first device can be any device, and this application does not limit the first device. Please refer to the following examples for the content of generating the protocol file corresponding to the interface protocol.

[0063] In some embodiments, the interface protocol refers to the rules followed in the process of data interaction between software systems. Optionally, the interface protocol specifies input parameters and output parameters, and the interface protocol is used to feedback the output parameters when the input parameters meet the conditions. Among them, the input parameter refers to the parameter that needs to be provided when calling the interface protocol, referred to as the input parameter. The output parameter refers to the parameter that needs to be fed back based on the interface protocol when the output parameter meets the regulations, referred to as the output parameter.

[0064] In some embodiments, cloud service refers to a third-party interface protocol platform for storing interface protocols. As can be seen from the above content, cloud services are subject to network environment and authentication restrictions. Devices can only access cloud services using the intranet, and devices cannot access cloud services using the extranet. The intranet can be understood as the network used within the company. In contrast, the extranet refers to other communication networks other than the intranet.

[0065] Optionally, the first format refers to the format requirement when the cloud platform stores the interface protocol. The interface protocol in the first format refers to an interface protocol that meets the format requirements of the cloud service. Exemplarily, the cloud platform stores the interface protocol in the first format in a database of the cloud platform, and when the device uses the intranet to access the cloud platform, the cloud platform provides the interface protocol to the device according to the device's access request. Exemplarily, the interface protocol in the first format includes: the entire content of the interface protocol and a format field for meeting the first format requirements. The format field includes at least one functional character for implementing the first format.

[0066] The interface protocol stored in the cloud platform can only be provided to devices that access the cloud platform through the intranet, which shows that the interface protocol is not easy to obtain. In the management method of the interface protocol, the interface protocol is obtained from the cloud service in step 310, and the following steps 320 and 330 are performed. The interface protocol stored in the cloud service is migrated to the public access platform for management to solve the problems existing in the related art. For the specific content of step 320 and step 330, please refer to the following embodiment.

[0067] In some embodiments, the first device obtains at least one interface protocol in a first format, including: the first device determines an interface protocol set; wherein the interface protocol set includes at least one interface protocol; the first device uses an intranet to access a cloud platform; the first device generates an interface protocol request based on the interface protocol set; wherein the interface protocol request is used to request the cloud service to obtain the above-mentioned at least one interface protocol; the first device receives at least one interface protocol in the first format sent by the cloud service.

[0068] Optionally, the interface protocol set includes all interface protocols, or the interface protocol set includes interface protocols required to be used in the development and testing process. Exemplarily, the interface protocol set is indicated by a staff member. It should be noted that the types and quantities of the interface protocols included in the interface protocol set are set according to actual needs, and this application does not limit them here.

[0069] Optionally, the interface protocol request includes at least one protocol identifier corresponding to each interface protocol, and the protocol identifier is used to characterize the interface protocol. The protocol identifier includes but is not limited to: a protocol name, a serial number, and the like.

[0070] Step 320, format conversion is performed on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol.

[0071] In some embodiments, the protocol content with usage requirements refers to the content in the interface protocol that needs to be used in subsequent development and testing processes. After acquiring the interface protocol, the first device performs format conversion on the interface protocol in the first format to obtain a protocol file corresponding to the interface protocol.

[0072] Optionally, the role of format conversion includes at least one of the following: converting the data format of the interface protocol and filtering the content of the interface protocol. The data format includes but is not limited to at least one of the following: json (JavaScript Object Notation) format and xml (eXtensible Markup Language) format. Optionally, the data format of the protocol file corresponding to the interface protocol is different from the first format.

[0073] Optionally, the protocol file corresponding to the interface protocol includes at least one parameter and attribute information of the interface protocol. The attribute information of the interface protocol is used to describe the interface protocol. The parameter is used to indicate data involved in the interaction process based on the interface protocol. Exemplarily, the parameter includes: input parameter and output parameter.

[0074] Exemplarily, the parameters included in the interface protocol are the same as the parameters included in the protocol file, that is, the input parameters in the protocol file are the same as the input parameters in the interface protocol, and the output parameters in the protocol file are the same as the output parameters in the interface protocol.

[0075] Exemplarily, the parameters included in the interface protocol are different from the parameters included in the protocol file. For example, the parameters included in the interface protocol are more than the parameters included in the protocol file. That is, in the process of format conversion of the interface protocol, the first device ignores some parameters in the interface protocol and stores another part of the parameters in the interface protocol in the protocol file. It should be noted that the format conversion method is determined according to the usage requirements of the interface protocol. For example, the back-end developer determines the format conversion method for the protocol file according to the actual development function needs.

[0076] In some embodiments, the first device performs format conversion on at least one interface protocol in the first format to obtain protocol files corresponding to each interface protocol.

[0077] Optionally, the data formats of different protocol files are the same. For example, the data formats of each protocol file are in json format. Optionally, the data formats of the protocol files are not completely the same. For example, the protocol file corresponding to interface protocol 1 is in json format, and the protocol file corresponding to interface protocol 2 is in xml format.

[0078] Step 330: store the protocol files corresponding to the various interface protocols in a public access platform. The public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

[0079] In some embodiments, the public access platform is a platform that is designated to allow any device to access, that is, the public access platform can provide a protocol file corresponding to the interface protocol to each device equally. Optionally, the first device has a first account, and the first device accesses the public access platform through the first account. Alternatively, the first device accesses the public access platform as a visitor.

[0080] Optionally, the first device creates a first project on the public access platform, and uses the protocol files corresponding to the at least one interface protocol as the project content of the first project. Exemplarily, after generating the protocol files corresponding to the respective interface protocols, the first device sends the protocol files corresponding to the at least one interface protocol to the public access platform; the public access platform stores the protocol files corresponding to the at least one interface protocol as the project content of the first project.

[0081] In some embodiments, in order to improve the security of the protocol file corresponding to the interface protocol, after the format conversion obtains the protocol file corresponding to the interface protocol, the first device locally stores the protocol file corresponding to the interface protocol. In other words, the first device backs up the protocol file corresponding to the interface protocol. In this way, in the event that the public access platform crashes, the protocol file corresponding to the interface protocol can be used normally.

[0082] In one example, the first device obtains at least one protocol file in a first format from a cloud service; the first device performs format conversion on at least one protocol file in the first format to obtain protocol files corresponding to each protocol file party; the first device stores the protocol files corresponding to each protocol file party to a public access platform. Since the public access platform has the network environment characteristic of not limiting the access device, any device can obtain the protocol file corresponding to the interface protocol from the public access platform. This method breaks the barrier for external network devices to obtain interface protocols caused by the restrictions of the cloud service on the network environment.

[0083] Optionally, the second device accesses the public access platform, and obtains the protocol file corresponding to the interface protocol from the public access platform according to the storage address of the interface protocol. Before developing an application or performing a test, the first device performs the above steps 310-330, and then the second device obtains the protocol file corresponding to the interface protocol from the public access platform, and stores the protocol file corresponding to the interface protocol in the second device. In the process of developing an application or performing a test, both the first device and the second device can conveniently obtain and use the protocol file corresponding to the interface protocol locally, which helps to improve the efficiency of obtaining the protocol file corresponding to the interface protocol.

[0084] Exemplarily, after acquiring the protocol file corresponding to the interface protocol, the second device stores the protocol file corresponding to the interface protocol. In this way, the first device, the second device, and the public access platform all store the protocol file corresponding to the interface protocol. When the first device and the second device need to use the protocol file corresponding to the interface protocol later, the protocol file corresponding to the interface protocol stored locally on the device is directly used.

[0085] Optionally, the storage address of a certain interface protocol is the same in the first device, the second device, and the public access platform. That is, when the second device obtains the protocol file corresponding to the interface protocol from the public access platform, the protocol file corresponding to the interface protocol can be obtained from any of the first device, the second device, and the public access platform by means of the storage address of the interface protocol. Please refer to the following embodiment for the method of determining the storage address of the interface protocol.

[0086] In summary, compared to the related art that requires storing the interface protocol in the database of the cloud service according to the format requirements of the cloud service, the solution provided by the present application supports customized format conversion of the interface protocol, and supports the staff to set the format conversion method of the interface protocol according to the actual use of the interface protocol. In this way, it helps to make the protocol file corresponding to the interface protocol obtained by format conversion meet the actual use requirements. Compared to directly saving the interface protocol, the format conversion of the interface protocol in this method can select the content of the interface protocol. It ensures that the protocol file corresponding to the interface protocol can not only meet the staff's use requirements for the interface protocol, but also help reduce the useless information carried in the protocol file corresponding to the interface protocol, and help reduce the redundancy of the content of the protocol file corresponding to the interface protocol.

[0087] Moreover, the present application manages the protocol files corresponding to the interface protocol by using a public access platform, so that when the device obtains the protocol files corresponding to the interface protocol, it is not restricted by the intranet environment requirements and network authentication, which helps to improve the convenience of obtaining the protocol files corresponding to the interface protocol.

[0088] The composition of the protocol file corresponding to the interface protocol is introduced and explained through several embodiments below.

[0089] In some embodiments, the protocol file corresponding to the interface protocol includes at least one of the following: interface protocol attributes, input parameter groups, and output parameter groups; wherein, the interface protocol attributes are used to describe the interface protocol, the input parameter group is used to indicate at least one parameter required to call the interface protocol, and the output parameter group is used to indicate at least one parameter provided by the interface protocol.

[0090] In some embodiments, the interface protocol attributes are used to characterize information related to the interface protocol, that is, the interface protocol attributes are used to describe the interface protocol and indicate the identity of the interface protocol.

[0091] Optionally: the interface protocol attributes include at least one of the following: project name, protocol path, protocol type, description information, data type. Among them, the project name is used to characterize the project to which the interface protocol belongs, and the project name is used to classify and manage at least one interface protocol. Exemplarily, the project names of different interface protocols can be the same or different. The protocol path is used to characterize the acquisition path of the interface protocol. The protocol type is also called the protocol method, which is used to characterize the communication method corresponding to the interface protocol. Optionally, the protocol type includes at least one of the following: Get, used to make a request to a specific resource (request the specified page information and return the entity body); Post, used to submit data to the specified resource for processing the request (submit a form, upload a file); Upload (Put), used to upload its latest content to the specified resource location. The description information is used to add custom description information for the interface protocol. The data type is used to characterize the data type that is allowed to communicate using the interface protocol.

[0092] In some embodiments, the input parameter group includes at least one input parameter, and the input parameter refers to the parameter that needs to be provided when the requesting device calls the interface protocol. In some embodiments, the output parameter group includes at least one output parameter, and the output parameter refers to the parameter that needs to be fed back to the requesting device when the input parameter group meets the requirements of the interface protocol.

[0093] Figure 4 Schematic diagram of a protocol file provided by an exemplary embodiment of the present application. Figure 4 As shown, the protocol file consists of interface protocol attributes, input parameter groups, and output parameter groups.

[0094] In the process of generating the protocol file corresponding to the interface protocol, the format conversion method of the interface protocol is set by the staff according to actual needs. In this way, the protocol file corresponding to the interface protocol can meet the use requirements in the subsequent development and testing process.

[0095] The format conversion process is described below through several embodiments.

[0096] In some embodiments, step 320, converting the format of the interface protocol to obtain a protocol file corresponding to the interface protocol, may include the following sub-steps.

[0097] In sub-step 322, the first device parses the interface protocol to obtain the protocol content of the interface protocol.

[0098] In some embodiments, the interface protocol is parsed to obtain the protocol content from the interface protocol in the first format. Parsing can be understood as extracting the protocol content with actual meaning from the interface protocol in the first format; the extracted protocol content does not include format information. For example, the interface protocol in the first format includes the following content: "name:abaabc <title> ",in,"< / title> ”, “ <title> " is the format requirement content of the first format, then after parsing, the obtained protocol content includes: "name:abaabc".< / title>

[0099] In some embodiments, a script for parsing the interface protocol is provided in the terminal device. Optionally, the script is written by a staff member according to the first format, and the script is used to remove identifiers related to the first format in the interface protocol to obtain the protocol content of the interface protocol.

[0100] Optionally, the protocol content of the interface protocol obtained in sub-step 322 includes all valid content in the interface protocol. That is, the protocol content of the interface protocol obtained in sub-step 322 includes all parameters in the interface protocol.

[0101] In sub-step 324, the first device obtains at least one parameter identifier and a parameter value corresponding to the parameter identifier from the protocol content according to the usage requirement information; wherein the usage requirement information is used to indicate parameters with usage requirements in the interface protocol, and the parameter identifier is used to identify the parameter type of the parameter value.

[0102] In some embodiments, the usage requirement information is used to indicate the parameters that need to be extracted from the interface protocol. In other words, the usage requirement information is used to indicate the parameters included in the protocol file corresponding to the interface protocol. In some embodiments, the usage requirement information is preset, and different interface protocols correspond to different usage requirement information.

[0103] Optionally, the usage requirement information includes at least one target parameter identifier; the target parameter identifier is used to indicate that the protocol file corresponding to the interface protocol needs to include a parameter value corresponding to the target parameter identifier. Exemplarily, the first device obtains at least one parameter identifier from the protocol content and the parameter value corresponding to the parameter identifier according to the usage requirement information, including: the first device searches for the target parameter identifier from the protocol content of the interface protocol obtained in sub-step 322 to obtain the target parameter identifier and the parameter value corresponding to the target parameter identifier; the first device uses at least one target parameter identifier and the parameter value corresponding to the target parameter identifier as at least one parameter identifier and the parameter value corresponding to each of them.

[0104] Optionally, the target parameter identifier in the usage requirement information is correlated with the parameter identifier determined from the protocol content of the interface protocol. For example, the target parameter identifier in the usage requirement information is the same as the parameter identifier determined from the protocol content of the interface protocol, or the target parameter identifier in the usage requirement information has the same field as the parameter identifier determined from the protocol content of the interface protocol.

[0105] Sub-step 326, using a first file format to represent the parameter identifier, and using a second file format to represent the parameter value; wherein the first file format is different from the second file format.

[0106] In some embodiments, the first file format and the second file format are related according to a format conversion method for converting the interface protocol. For example, if the format conversion method requires that the data format of the protocol file corresponding to the interface protocol is in json format, then the first file format is the format used to represent parameter identifiers in json, and the second file format is the format used to represent parameter values ​​in json.

[0107] Sub-step 328, combining at least one parameter identifier with a parameter value corresponding to the parameter identifier to obtain a protocol file corresponding to the interface protocol.

[0108] The above method supports the generation of protocol files corresponding to the interface protocol according to actual usage requirements. On the one hand, in the interface protocol management method provided in the present application, it supports customizing protocol files corresponding to the interface protocol. This method facilitates the unification of the method for parsing protocol files by multiple parties during the development of programs and functions. On the other hand, in the process of generating protocol files corresponding to the interface protocol, the staff can set the usage requirement information as needed and streamline the useless parameters in the interface protocol. This method helps to reduce the size of the protocol file, reduce the transmission resources consumed by the device in the process of obtaining the protocol file corresponding to the interface protocol from the public access platform during subsequent use, and save the storage space occupied by the device storing the protocol file corresponding to the interface protocol.

[0109] The following describes the storage methods of the protocol files corresponding to the interface protocols through several embodiments.

[0110] In some embodiments, step 330, storing the protocol files corresponding to each interface protocol in the public access platform, may include the following sub-steps.

[0111] In sub-step 332, the first device determines the protocol type and protocol path of the interface protocol; wherein the protocol type is used to characterize the method of action of the interface protocol, and the protocol path is used to characterize the classification level of the interface protocol.

[0112] For the specific contents of the protocol type and protocol path, please refer to the above embodiment, which will not be described here. Optionally, the first device parses the interface protocol in the first format to obtain all the contents included in the interface protocol; the second device searches for the protocol type and protocol path from all the contents of the interface protocol.

[0113] In sub-step 334, the first device generates a storage address of the interface protocol according to the protocol type and the protocol path.

[0114] In some embodiments, the first device concatenates the protocol type and the protocol path to generate a storage address of the interface protocol. Exemplarily, the protocol path in the storage address is located to the left of the protocol type. For example, if the protocol path of an interface protocol is ABC and the protocol type of the interface protocol is get, then the storage address of the interface protocol is: "ABC / get".

[0115] Optionally, the storage address of the interface protocol also includes the protocol version of the interface protocol, and the protocol version is used to characterize the update iteration of the interface protocol. Exemplarily, the first device concatenates the protocol type, protocol path, and protocol version to obtain the storage address of the interface protocol. For example, the protocol path of an interface protocol is ABC, the protocol type of the interface protocol is get, and the protocol version of the interface protocol is 1.1.0, then the storage address of the interface protocol is: "ABC / get / 1.1.0".

[0116] Compared with using one storage address to store different protocol versions of the same interface protocol, by setting different storage addresses for different protocol versions of the same interface protocol, interface protocols of different protocol versions are managed, making it convenient to directly obtain the corresponding version of the interface protocol according to the storage address.

[0117] In sub-step 336, the first device creates a storage address of the interface protocol on the public access platform.

[0118] As can be seen from the above content, the first device creates a first project on the public access platform and stores the protocol files corresponding to at least one interface protocol in the first project. Optionally, the first device creates a file directory hierarchy in the first project according to the protocol path and protocol type of a certain interface protocol; the first device uses the complete file directory hierarchy as the storage address of the interface protocol.

[0119] In sub-step 338, the first device stores the protocol file corresponding to the interface protocol to the storage address of the interface protocol.

[0120] Optionally, for any one of the at least one interface protocol, the first device opens a file directory hierarchy corresponding to the protocol interface in the public access platform, and uploads a protocol file corresponding to the interface protocol to the public access platform.

[0121] Optionally, for any one of the at least one interface protocols, the first device sends a protocol file corresponding to the interface protocol and a protocol address of the interface protocol to the public access platform, and the public access platform stores the protocol file corresponding to the interface protocol in the protocol address of the interface protocol for preservation.

[0122] By creating a storage address for the interface protocol in the public access platform, the protocol file corresponding to the interface protocol is stored in the storage address, which makes it convenient for the device to access the public access platform in any network environment, thereby obtaining the protocol file. The storage address of the interface protocol is generated according to the interface protocol attribute, which makes it convenient for any device to infer the storage address and quickly obtain the protocol file corresponding to the interface protocol from the public access platform according to the storage address.

[0123] The following describes a method for updating a protocol file corresponding to an interface protocol through several embodiments.

[0124] In some embodiments, the interface protocol management method further includes the following steps.

[0125] The first device obtains the protocol file corresponding to the interface protocol according to the storage address of the interface protocol; the first device updates the protocol file corresponding to the interface protocol to obtain an updated protocol file; the first device stores the updated protocol file to the public access platform, and the updated protocol file and the protocol file corresponding to the interface protocol are stored in different storage addresses.

[0126] After the protocol file corresponding to the interface protocol is stored in the public access platform, the protocol file corresponding to the interface protocol is updated to adapt to the changed usage requirements. In this case, the first device is used to update the protocol file corresponding to the interface protocol, obtain the updated protocol file, and then synchronize the updated protocol file to the public access platform.

[0127] As can be seen from the above, the public access platform can provide protocol files corresponding to the interface protocol to devices in any network environment. In order to avoid malicious devices from changing the protocol files corresponding to the interface protocol, which may cause problems with the storage security of the protocol files corresponding to the interface protocol in the public access platform. It is necessary to enhance the stability and security of the protocol files corresponding to the interface protocol stored in the public access platform and allow a small number of reliable devices to edit the protocol files corresponding to the interface protocol.

[0128] Optionally, the protocol file corresponding to at least one interface protocol is stored in a first item of the public access platform, and the first item corresponds to an edit list. The edit list includes at least one of the following: device information with permission to edit the protocol file corresponding to the interface protocol, and account information with permission to edit the protocol file corresponding to the interface protocol; the device information is used to uniquely identify the device, and the account information is used to indicate an account registered in the public access platform.

[0129] Exemplarily, the edit list includes device information, and when the first device accesses the public access platform, the public access platform determines whether the first device has the authority to edit the protocol file corresponding to the interface protocol based on whether the device information of the first device is included in the edit list. If the device information of the first device is included in the edit list, it means that it is determined that the first device has the authority to edit the protocol file corresponding to the interface protocol; if the device information of the first device is not included in the edit list, it means that it is determined that the first device does not have the authority to edit the protocol file corresponding to the interface protocol.

[0130] Exemplarily, the edit list includes account information, and when the first device accesses the public access platform, the public access platform determines whether the first device has the authority to edit the protocol file corresponding to the interface protocol based on whether the login account of the first device is included in the edit list. If the login account of the first device is included in the edit list, it means that it is determined that the first device has the authority to edit the protocol file corresponding to the interface protocol; if the login account of the first device is not included in the edit list, it means that it is determined that the first device does not have the authority to edit the protocol file corresponding to the interface protocol.

[0131] In the case where the first device has the authority to edit the protocol file corresponding to the interface protocol, the first device can execute the process of updating the protocol file corresponding to the interface protocol.

[0132] Optionally, the first device obtains the protocol file corresponding to the interface protocol according to the storage address of the interface protocol, including: the first device obtains the protocol file corresponding to the interface protocol from the local storage space of the first device according to the storage address of the interface protocol. This method helps to improve the efficiency of the first device in obtaining the protocol file corresponding to the interface protocol.

[0133] Optionally, the first device obtains the protocol file corresponding to the interface protocol according to the storage address of the interface protocol, including: the first device sends the storage address of the interface protocol to the public access platform; so that the public access platform can find the protocol file corresponding to the interface protocol according to the storage address of the interface protocol; the first device receives the protocol file corresponding to the interface protocol sent by the public access platform. Since the public access platform supports editing files corresponding to the interface protocol by multiple devices and accounts included in the editing list, before the first device edits the protocol file corresponding to a certain interface protocol, other devices may have updated the protocol file corresponding to the interface protocol at least once. That is, the version of the protocol file of the interface protocol stored in the first device is not the latest version.

[0134] In this case, the first device obtains the protocol file corresponding to the interface protocol from the public access platform through the above operation to obtain the latest version of the protocol file. This helps to reduce the workload of the first device in editing the protocol file corresponding to the interface protocol, and helps to improve the efficiency of the staff in editing the protocol file corresponding to the interface protocol using the first device.

[0135] Figure 5 Schematic diagram of a protocol file update process provided by an exemplary embodiment of the present application. The present application provides the following two examples to illustrate the process of a first device updating a protocol file corresponding to an interface protocol.

[0136] Example 1: The first device updates a protocol file corresponding to an interface protocol in a public access platform.

[0137] In some embodiments, the first device obtains the protocol file corresponding to the interface protocol according to the storage address of the interface protocol, including: the first device displays the user interface of the public access platform; the first device sends the storage address of the interface protocol to the public access platform; the first device receives the protocol file corresponding to the interface protocol sent by the public access platform; the second device displays the protocol file corresponding to the interface protocol in the user interface of the public access platform; the first device obtains modification information in response to the operation of editing the protocol file corresponding to the interface protocol in the user interface; the first device sends the modification information to the public access platform, so that the public access platform obtains the updated protocol file according to the content to be updated and the protocol file corresponding to the interface protocol.

[0138] For example, the data format of the protocol file corresponding to the interface protocol is in json format, and the first device displays the protocol file in json format in the user interface of the public access platform; the first device obtains modification information in response to the operation of editing the protocol file; the first device sends the modification information to the interface protocol platform, and the public access platform replaces the protocol file corresponding to the interface protocol according to the modification information to obtain an updated protocol file; the public access platform stores the updated protocol file.

[0139] Through this method, the device directly edits the protocol file of the interface protocol, which helps to improve the efficiency of updating the protocol file corresponding to the interface protocol. In this method, the device only needs to send the modification information to the public access platform, and the amount of data to be transmitted between the device and the public access platform is small, which helps to save transmission resources.

[0140] Example 2: After the first device obtains the protocol file corresponding to the interface protocol, it sends the complete updated protocol file to the public access platform for storage.

[0141] Since the protocol files corresponding to the interface protocol (such as Figure 4 ) has poor readability. In order to improve the readability of the protocol file corresponding to the interface protocol and facilitate the staff to identify the content that needs to be modified in the protocol content, the first device parses the protocol file corresponding to the interface protocol to obtain the protocol content; the first device performs readable processing on the protocol content.

[0142] In some embodiments, the first device updates the protocol file corresponding to the interface protocol to obtain an updated protocol file, which may include the following steps: the first device parses the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol; the first device displays a protocol file editing interface, in which the protocol content is displayed; the first device responds to the operation of editing the protocol content displayed in the protocol file editing interface, and displays the data to be updated in the protocol file editing interface; the first device generates an updated protocol file based on the data to be updated and the protocol content.

[0143] In some embodiments, the protocol file editing interface includes at least one of the following: an attribute display area, an input parameter display area, and an output parameter display area. The attribute display area includes the protocol file attributes, the input parameter display area includes the input parameter group in the input parameter group, and the output parameter display area includes the output parameter group in the output parameter group.

[0144] Optionally, the protocol file editing interface also includes at least one interactive control, and the first device displays the data to be updated in the protocol file editing interface in response to the operation on the interactive control. Exemplarily, the types of interactive controls include at least one of the following: add control, delete control, and adjust control. Among them, the add control is used to add new parameters to the protocol content, for example. Add a new input parameter in the input parameter group. The delete control is used to delete parameters from the protocol content. For example, delete an output parameter in the output parameter group. The adjustment control is used to adjust the interface protocol attributes in the protocol content. For example, adjust the protocol type in the interface protocol attributes.

[0145] Figure 6 FIG. 1 is a schematic diagram of a protocol file editing interface provided by an exemplary embodiment of the present application. Figure 6 The first device displays a protocol file editing interface, and the backend staff can adjust the protocol content in the protocol file editing interface to generate an updated protocol file.

[0146] The following is an example of how the first device manages the interface protocol. The example may include the following steps:

[0147] Step A10: The first device obtains at least one interface protocol in a first format. Optionally, the first device obtains at least one interface protocol in a first format from a cloud service.

[0148] Step A20, the first device parses the interface protocol to obtain the protocol content of the interface protocol; the first device obtains at least one parameter identifier and a parameter value corresponding to the parameter identifier from the protocol content according to the usage requirement information;

[0149] Step A30: The first device uses a first file format to represent a parameter identifier and a second file format to represent a parameter value; the first device obtains a protocol file corresponding to the interface protocol according to a combination of at least one parameter identifier and a parameter value corresponding to the parameter identifier.

[0150] Step A40: The first device determines the protocol type and protocol path of the interface protocol.

[0151] Step A50, the first device generates a storage address of the interface protocol according to the protocol type and the protocol path; the first device creates the storage address of the interface protocol on the public access platform, and stores the protocol file corresponding to the interface protocol to the storage address of the interface protocol.

[0152] Step A60: The first device obtains a protocol file corresponding to the interface protocol from the public access platform according to the storage address of the interface protocol.

[0153] In the case where the protocol file corresponding to the interface protocol needs to be updated: Step A70, the first device parses the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol; displays the protocol file editing interface, in which the protocol content is displayed; in response to operations on the protocol content displayed in the protocol file editing interface, displays data to be updated in the protocol file editing interface; generates an updated protocol file based on the data to be updated and the protocol content.

[0154] Alternatively, the protocol content of the interface protocol used in step A70 is stored in the local storage space of the first device, or the protocol content of the interface protocol used in step A70 is obtained by the first device from a public access platform via a storage address corresponding to the interface protocol.

[0155] Exemplarily, when a protocol file corresponding to the interface protocol is stored in the local storage space of the first device, the first device preferentially uses the protocol file corresponding to the interface protocol stored in the local storage space. When a protocol file corresponding to the interface protocol is not stored in the local storage space of the first device, the first device obtains the protocol file corresponding to the interface protocol from the public access platform.

[0156] Exemplarily, when the protocol file corresponding to the interface protocol stored in the local storage space of the first device is consistent with the protocol file corresponding to the latest version of the interface protocol, the first device preferentially uses the protocol file corresponding to the interface protocol stored in the local storage space. When the protocol file corresponding to the interface protocol stored in the local storage space of the first device is inconsistent with the protocol file corresponding to the latest version of the interface protocol, the first device obtains the protocol file corresponding to the interface protocol from the public access platform.

[0157] For the specific content of this embodiment, please refer to the above embodiment, which will not be repeated here.

[0158] Figure 7 is a flowchart of a method for managing an interface protocol provided by another exemplary embodiment of the present application. For example, the execution subject of the method may be Figure 1 The public access platform 30 in the interface protocol is used to manage the protocol files corresponding to the interface protocol and provide the protocol files to the devices accessing the public access platform in the form of an open source platform. The following describes the management method of the interface protocol using the public access platform as the execution subject. Figure 7 As shown, the method may include the following steps (710-730):

[0159] Step 710: Receive a first access request from a second device; wherein the first access request includes a storage address of an interface protocol.

[0160] In some embodiments, the second device is the same device as the first device in the above embodiment, or the second device is two different devices. Optionally, the first device and the second device are determined according to the staff using the device, wherein the first device refers to the device used by the back-end staff, which is mainly used to store the protocol files corresponding to the interface protocol in the public access platform, and update and maintain the protocol files corresponding to the interface protocol. The second device refers to the device used by the front-end staff, which is mainly used to obtain the protocol files corresponding to the interface protocol from the public access platform.

[0161] It should be noted that the second device may be a device in any network environment, and the present application does not limit the type of the second device.

[0162] In some embodiments, the first access request is used to obtain a protocol file corresponding to the interface protocol from the public access platform. Optionally, the first access request includes: a storage address of the interface protocol and device information of the second device. The device information of the second device is used to uniquely identify the identity of the second device. Exemplarily, the public access platform establishes communication with the second device according to the device information of the second device.

[0163] Exemplarily, the second device obtains the protocol path and protocol type of the interface protocol in response to an operation of requesting a protocol file of the interface protocol; the second device generates a storage address of the interface protocol based on the protocol path and protocol type of the interface protocol; the second device generates a first access request based on the storage address of the interface protocol and the device identifier of the second device; and the second device sends the first access request to the public access platform.

[0164] Step 720, searching for a protocol file corresponding to the interface protocol according to the storage address of the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol.

[0165] After receiving the first access request, the public access platform obtains the storage address of the interface protocol from the first access request, and searches for the protocol file corresponding to the interface protocol in its storage space according to the storage address of the interface protocol. For the specific content of the protocol file corresponding to the interface protocol, please refer to the embodiment of the first device side, which will not be repeated here.

[0166] Step 730: Send a protocol file corresponding to the interface protocol to the second device.

[0167] In some embodiments, the public access platform sends a protocol file corresponding to the interface protocol to the second device based on the device information of the second device.

[0168] In this example, the second device may be any device, that is, any user can obtain the protocol file corresponding to the interface protocol from the public access platform through the storage address of the interface protocol.

[0169] In summary, this application reduces the difficulty of obtaining protocol files by storing the protocol files corresponding to the interface protocol on a public access platform. When obtaining the protocol files corresponding to the interface protocol, relevant staff do not need to be restricted by the intranet environment requirements and network authentication, which helps to reduce the difficulty of obtaining the protocol files corresponding to the interface protocol and improve the convenience of obtaining and using the interface protocol.

[0170] The interaction of the virtual test interface public access platform is introduced and explained through several embodiments below.

[0171] In some embodiments, the method of the interface protocol also includes: a public access platform receives a second access request from a virtual test interface; wherein the second access request includes a storage address of the interface protocol, the virtual test interface is used to simulate and return test results related to the interface protocol, and the second access request is sent by the virtual test interface triggered by the second device; the public access platform searches for the protocol file corresponding to the interface protocol according to the storage address of the interface protocol; the public access platform sends the protocol file corresponding to the interface protocol to the virtual test interface, so that when the second device sends a simulated service request to the virtual test interface, the virtual test interface parses the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol, simulates and generates simulated output parameters according to the protocol content of the interface protocol, uses the simulated output parameters as test results, and feeds back the test results to the second device.

[0172] In some embodiments, the virtual test interface is used to assist in completing the test process related to the interface protocol. Optionally, when the front-end interface is developed or a function is tested, the second device returns the simulated output parameters through the virtual test interface. Exemplarily, the second device generates a simulation parameter request in response to the test operation of the first function; wherein the simulation parameter request is used to request the virtual test interface to obtain the virtual output parameters of the protocol interface. The simulation parameter request includes at least one input parameter, the storage address of the interface protocol, and the device information of the second device.

[0173] Optionally, after receiving the simulation parameter request, the virtual test interface triggers sending a second access request to the public access platform. Exemplarily, the virtual test interface generates the second access request according to the simulation parameter request; the virtual test interface sends the second access request to the public access platform. The public access platform searches for and feeds back a protocol file corresponding to the interface protocol to the virtual test interface according to the storage address of the interface protocol included in the second access request.

[0174] Optionally, before receiving the simulation parameter request, the virtual test interface sends a second access request to the public access platform in advance. That is, the virtual test interface obtains at least one protocol file corresponding to the interface protocol from the public access platform in advance, and the virtual test interface stores at least one protocol file corresponding to the interface protocol. After receiving the simulation parameter request sent by the second device, the virtual test interface generates simulation output parameters based on the protocol file corresponding to the interface protocol stored locally; the virtual test interface sends the simulation output parameters to the second device.

[0175] In some embodiments, after obtaining the protocol file corresponding to the interface protocol, the virtual test interface parses the protocol file corresponding to the interface protocol to obtain the protocol content. The protocol content includes an input parameter group and an output parameter group. For a specific introduction to the content included in the protocol file, please refer to the above embodiment, which will not be repeated here. Exemplarily, the virtual test interface can use a script to parse the protocol file corresponding to the interface protocol. The script used by the virtual test interface is used to parse the protocol content from the protocol file corresponding to the interface protocol. The script types used by the virtual test interface include but are not limited to node scripts. Optionally, the protocol content of the interface protocol is stored in the virtual test interface instead of the protocol file corresponding to the interface protocol. This method reduces the number of times the virtual test interface parses the protocol file.

[0176] In some embodiments, the virtual test interface verifies whether at least one input parameter included in the simulation parameter request satisfies the requirement that the protocol content includes an input parameter group. Optionally, if the parameter identifier and the parameter value corresponding to the parameter identifier included in the simulation parameter request are consistent with the parameter identifier and the parameter value corresponding to the parameter identifier included in the input parameter group of the protocol content, it is determined that at least one input parameter included in the simulation parameter request satisfies the requirement that the protocol content includes an input parameter group.

[0177] Exemplarily, if at least one input parameter included in the simulation parameter request meets the requirement that the protocol content includes an input parameter group, the virtual test interface generates a simulation output parameter according to the output parameter group in the protocol content; the virtual test interface feeds back the simulation output parameter to the second device. Exemplarily, if at least one input parameter included in the simulation parameter request does not meet the requirement that the protocol content includes an input parameter group, the virtual test interface does not generate the simulation output parameter according to the output parameter group in the protocol content. In this case, the virtual test interface may generate an error prompt and send the error prompt to the second device. The error prompt is used to prompt the second device that the interface protocol call fails.

[0178] By storing the protocol files corresponding to the interface protocol in the public access platform, it is possible for the virtual test interface to successfully obtain the protocol files corresponding to the interface protocol. In this way, the virtual test interface can smoothly provide simulation (mock) services, which helps to improve the development efficiency of programs and functions.

[0179] The following describes the interaction process after the protocol file is updated through several embodiments.

[0180] In some embodiments, the method of the interface protocol also includes: a public access platform receives an updated protocol file sent by the first device; wherein the updated protocol file is used to update the protocol file corresponding to the interface protocol, and the first device has the authority to edit the protocol file corresponding to the interface protocol; the public access platform stores the updated protocol file according to the storage address of the interface protocol; the public access platform sends an update notification to the virtual test interface; wherein the update notification is used to notify the virtual test interface that the protocol file of the interface protocol has been updated, so that the virtual test interface obtains the updated protocol file from the public access platform based on the update notification, and the virtual test interface is used to simulate and return test results related to the interface protocol.

[0181] As can be seen from the above embodiments, as the usage requirements change, the first device will maintain the protocol file of the interface protocol stored in the public access platform, and store the updated protocol file in the public access platform. In some embodiments, after the protocol file of the interface protocol is updated, the public access platform notifies the virtual test interface of the protocol file update event. For example, an automatic notification plug-in (such as a webhook) is set in the public access platform, and after the public access platform receives the updated protocol file sent by the first device, the automatic notification plug-in generates an update notification.

[0182] Figure 8 It is an interaction diagram of a method for managing an interface protocol provided by an exemplary embodiment of the present application.

[0183] The first device obtains at least one interface protocol in a first format from the cloud service, and performs format conversion to obtain a protocol file corresponding to at least one interface protocol. The first device stores at least one protocol file in a public access platform, such as GIT (a distributed file management system). The first device can directly update the protocol file corresponding to the interface protocol in the display interface of the public access platform or the client visualization tool. Any device can obtain the protocol file corresponding to the interface protocol from the public access platform and view the protocol file corresponding to the interface protocol.

[0184] The front-end staff can use the second device to call the virtual test interface, so that the virtual test interface obtains the protocol file corresponding to the interface protocol from the public access platform, and generates simulation output parameters according to the protocol file corresponding to the interface protocol.

[0185] Fig. 9 It is a schematic diagram of a method for managing an interface protocol provided by an exemplary embodiment of the present application.

[0186] The first device sends the updated protocol file to the public access platform, and the public access platform receives the updated protocol file sent by the first device and stores the updated protocol file according to the storage address of the interface protocol. The public access platform sends an update notification to the virtual test interface so that the virtual test interface obtains the updated protocol file from the public access platform and parses the updated protocol file to obtain the protocol content. When the second device requests the virtual test interface to feedback the simulation parameters, the virtual test platform generates the simulation output parameters according to the protocol content and sends the simulation output parameters to the second device.

[0187] Through the solution provided by this application, the interface protocol is serialized to obtain the protocol file corresponding to the interface protocol, and the protocol file corresponding to the interface protocol is stored in a public access platform (GIT, SVN (Apache Subversion, Apache version control system), etc.). During the development process, the device can easily obtain the protocol file corresponding to the interface protocol from the public access platform or the local device. The communication between the front-end and the back-end about the interface protocol during the development and testing process is reduced, and the process of obtaining the protocol file is not restricted by the network environment. In addition, this method can help each device obtain the updated protocol file and ensure the consistency of the interface protocols used in different devices.

[0188] By setting an independent storage address for each version of the interface protocol, it is convenient to quickly search and locate the protocol file of the target version, and it is also convenient to view the change history of the protocol file.

[0189] Compared with third-party cloud services, public access platforms have advantages in stability, security, etc., which helps reduce platform service problems that lead to the inability to view and edit interface protocols. It also helps avoid data leakage.

[0190] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0191] Fig.10A block diagram of an interface protocol management device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of an interface protocol management device through software, hardware, or a combination of both. The device 1000 may include: a protocol acquisition module 1010, a format conversion module 1020, and a file storage module 1030.

[0192] The protocol acquisition module 1010 is used to acquire at least one interface protocol in a first format; wherein the first format corresponds to the format requirements of the cloud service storage interface protocol.

[0193] The format conversion module 1020 is used to perform format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol.

[0194] The file storage module 1030 is used to store the protocol files corresponding to each of the interface protocols in a public access platform. The public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

[0195] In some embodiments, the format conversion module 1020 is used to parse the interface protocol to obtain the protocol content of the interface protocol; according to the usage requirement information, obtain at least one parameter identifier and a parameter value corresponding to the parameter identifier from the protocol content; wherein the usage requirement information is used to indicate the parameters with usage requirements in the interface protocol, and the parameter identifier is used to identify the parameter type of the parameter value; the parameter identifier is represented by a first file format, and the parameter value is represented by a second file format; wherein the first file format is different from the second file format; at least one of the parameter identifiers is combined with the parameter value corresponding to the parameter identifier to obtain a protocol file corresponding to the interface protocol.

[0196] In some embodiments, the file storage module is used to: determine the protocol type and protocol path of the interface protocol; wherein the protocol type is used to characterize the method of action of the interface protocol, and the protocol path is used to characterize the classification level of the interface protocol; generate a storage address of the interface protocol based on the protocol type and the protocol path; create a storage address of the interface protocol on the public access platform; and store the protocol file corresponding to the interface protocol to the storage address of the interface protocol.

[0197] In some embodiments, the device 1000 also includes: a file acquisition module (not shown in the drawings), which is used to obtain the protocol file corresponding to the interface protocol according to the storage address of the interface protocol; a file update module (not shown in the drawings) updates the protocol file corresponding to the interface protocol to obtain an updated protocol file; and stores the updated protocol file to the public access platform, and the updated protocol file and the protocol file corresponding to the interface protocol are stored in different storage addresses.

[0198] In some embodiments, the file update module is used to parse the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol; display a protocol file editing interface, in which the protocol content is displayed; in response to operations on the protocol content displayed in the protocol file editing interface, display data to be updated in the protocol file editing interface; and generate the updated protocol file based on the data to be updated and the protocol content.

[0199] In some embodiments, the protocol file corresponding to the interface protocol includes at least one of the following: interface protocol attributes, input parameter groups, and output parameter groups; wherein the interface protocol attributes are used to describe the interface protocol, the input parameter group is used to indicate at least one parameter required to call the interface protocol, and the output parameter group is used to indicate at least one parameter provided by the interface protocol.

[0200] Fig.11 A block diagram of an interface protocol management device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of the interface protocol management device through software, hardware or a combination of both. The device 1100 may include: a request receiving module 1110, a file search module 1120 and a file sending module 1130.

[0201] The request receiving module 1110 is used to receive a first access request from a second device; wherein the first access request includes a storage address of the interface protocol.

[0202] The file search module 1120 is used to search for the protocol file corresponding to the interface protocol according to the storage address of the interface protocol; wherein the protocol file corresponding to the interface protocol includes the protocol content with usage requirements in the interface protocol.

[0203] The file sending module 1130 is configured to send a protocol file corresponding to the interface protocol to the second device.

[0204] In some embodiments, the request receiving module 1110 is also used to receive a second access request from the virtual test interface; wherein the second access request includes the storage address of the interface protocol, the virtual test interface is used to simulate and return a test result related to the interface protocol, and the second access request is triggered by the second device to send the virtual test interface; the file search module 1120 is also used to search for a protocol file corresponding to the interface protocol according to the storage address of the interface protocol; the file sending module 1130 is used to send a protocol file corresponding to the interface protocol to the virtual test interface, so that when the second device sends a simulated service request to the virtual test interface, the virtual test interface parses the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol, simulates and generates simulated output parameters according to the protocol content of the interface protocol, uses the simulated output parameters as the test results, and feeds back the test results to the second device.

[0205] In some embodiments, the device 1100 also includes: a file receiving module (not shown in the drawings), used to receive an updated protocol file sent by the first device; wherein the updated protocol file is used to update the protocol file corresponding to the interface protocol, and the first device has the authority to edit the protocol file corresponding to the interface protocol; a file storage module (not shown in the drawings), used to store the updated protocol file according to the storage address of the interface protocol; a notification sending module (not shown in the drawings), used to send an update notification to the virtual test interface; wherein the update notification is used to notify the virtual test interface that the protocol file of the interface protocol has been updated, so that the virtual test interface obtains the updated protocol file from the public access platform based on the update notification, and the virtual test interface is used to simulate and return test results related to the interface protocol.

[0206] It should be noted that the device provided in the above embodiment, when realizing its function, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment belongs to the same concept as the method embodiment. The specific implementation process is detailed in the method embodiment, which will not be repeated here. Please refer to the description of the method side embodiment for the beneficial effects of the device provided in the above embodiment, which will not be repeated here.

[0207] Fig.12 The structure block diagram of a computer device provided by an exemplary embodiment of the present application is shown. The management device 1200 of the interface protocol can be the computer device introduced above.

[0208] Typically, the computer device 1200 includes a processor 1201 and a memory 1202 .

[0209] The processor 1201 may include one or more processing cores, such as a 4-core processor, a 12-core processor, and the like. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0210] The memory 1202 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices, flash memory storage devices.

[0211] In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 stores at least one program, which is loaded and executed by the processor 1201 to implement the interface protocol management method provided by the above-mentioned method embodiments.

[0212] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the interface protocol management method provided in the above-mentioned method embodiments.

[0213] The computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technology, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above-mentioned ones.

[0214] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the interface protocol management method provided in the above-mentioned method embodiments.

[0215] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0216] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for managing an interface protocol, characterized in that: The method is performed by a first device, and includes: Obtain at least one interface protocol in a first format; wherein the first format corresponds to the format requirements of the cloud service storage interface protocol; Performing format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol; The protocol files corresponding to the respective interface protocols are stored in a public access platform, and the public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

2. The method according to claim 1, characterized in that The step of converting the format of the interface protocol to obtain a protocol file corresponding to the interface protocol includes: Parsing the interface protocol to obtain the protocol content of the interface protocol; According to the usage requirement information, at least one parameter identifier and a parameter value corresponding to the parameter identifier are obtained from the protocol content; wherein the usage requirement information is used to indicate a parameter with a usage requirement in the interface protocol, and the parameter identifier is used to identify a parameter type of the parameter value; The parameter identifier is represented by a first file format, and the parameter value is represented by a second file format; wherein the first file format is different from the second file format; At least one of the parameter identifiers is combined with a parameter value corresponding to the parameter identifier to obtain a protocol file corresponding to the interface protocol.

3. The method according to claim 1, characterized in that The storing of the protocol files corresponding to each of the interface protocols to the public access platform includes: Determine a protocol type and a protocol path of the interface protocol; wherein the protocol type is used to characterize the method of action of the interface protocol, and the protocol path is used to characterize the classification level of the interface protocol; Generate a storage address of the interface protocol according to the protocol type and the protocol path; Creating a storage address for the interface protocol on the public access platform; The protocol file corresponding to the interface protocol is stored in the storage address of the interface protocol.

4. The method according to claim 1, characterized in that: The method further comprises: According to the storage address of the interface protocol, obtaining the protocol file corresponding to the interface protocol; Updating the protocol file corresponding to the interface protocol to obtain an updated protocol file; The updated protocol file is stored in the public access platform, and the updated protocol file and the protocol file corresponding to the interface protocol are stored in different storage addresses.

5. The method according to claim 4, characterized in that The updating of the protocol file corresponding to the interface protocol to obtain an updated protocol file includes: Parsing the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol; Displaying a protocol file editing interface, wherein the protocol content is displayed in the protocol file editing interface; In response to an operation on the protocol content displayed in the protocol file editing interface, displaying data to be updated in the protocol file editing interface; The updated protocol file is generated according to the data to be updated and the protocol content.

6. The method according to any one of claims 1 to 5, characterized in that: The protocol file corresponding to the interface protocol includes at least one of the following: interface protocol attributes, input parameter group, and output parameter group; wherein the interface protocol attributes are used to describe the interface protocol, the input parameter group is used to indicate at least one parameter required to call the interface protocol, and the output parameter group is used to indicate at least one parameter provided by the interface protocol.

7. A method for managing an interface protocol, characterized in that: The method is performed by a public access platform, the public access platform is used to manage the protocol files corresponding to the interface protocol, and provide the protocol files to the devices accessing the public access platform in the form of an open source platform, the method includes: Receiving a first access request from a second device; wherein the first access request includes a storage address of the interface protocol; According to the storage address of the interface protocol, searching for the protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes the protocol content with usage requirements in the interface protocol; Send a protocol file corresponding to the interface protocol to the second device.

8. The method according to claim 7, characterized in that The method further comprises: Receive a second access request from the virtual test interface; wherein the second access request includes a storage address of the interface protocol, the virtual test interface is used to simulate and return a test result related to the interface protocol, and the second access request is triggered by the second device to send the virtual test interface; According to the storage address of the interface protocol, searching for the protocol file corresponding to the interface protocol; The protocol file corresponding to the interface protocol is sent to the virtual test interface so that the virtual test interface parses the protocol file corresponding to the interface protocol to obtain the protocol content of the interface protocol; when the second device sends a simulation service request to the virtual test interface, the virtual test interface simulates and generates simulation output parameters according to the protocol content of the interface protocol, uses the simulation output parameters as the test result, and feeds back the test result to the second device.

9. The method according to claim 7, characterized in that: The method further comprises: Receiving an updated protocol file sent by the first device; wherein the updated protocol file is used to update the protocol file corresponding to the interface protocol, and the first device has the authority to edit the protocol file corresponding to the interface protocol; According to the storage address of the interface protocol, storing the updated protocol file; An update notification is sent to the virtual test interface; wherein the update notification is used to notify the virtual test interface that the protocol file of the interface protocol has been updated, so that the virtual test interface obtains the updated protocol file from the public access platform based on the update notification, and the virtual test interface is used to simulate and return test results related to the interface protocol.

10. A management device for an interface protocol, characterized in that: The device comprises: A protocol acquisition module, used to acquire at least one interface protocol in a first format; wherein the first format corresponds to the format requirements of the cloud service storage interface protocol; A format conversion module, used to perform format conversion on the interface protocol to obtain a protocol file corresponding to the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol, and the format conversion is used to extract the protocol content with usage requirements from the interface protocol; The file storage module is used to store the protocol files corresponding to each of the interface protocols in a public access platform. The public access platform is used to manage the protocol files and provide the protocol files to devices accessing the public access platform in the form of an open source platform.

11. A management device for an interface protocol, characterized in that: The device comprises: A request receiving module, configured to receive a first access request from a second device; wherein the first access request includes a storage address of the interface protocol; A file search module, used to search for a protocol file corresponding to the interface protocol according to a storage address of the interface protocol; wherein the protocol file corresponding to the interface protocol includes protocol content with usage requirements in the interface protocol; The file sending module is used to send the protocol file corresponding to the interface protocol to the second device.

12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the interface protocol management method as described in any one of claims 1 to 6, or the interface protocol management method as described in any one of claims 7 to 9.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the interface protocol management method as described in any one of claims 1 to 6, or the interface protocol management method as described in any one of claims 7 to 9.