CN110891057B - Protocol conversion method, device, equipment and storage medium - Google Patents

Protocol conversion method, device, equipment and storage medium Download PDF

Info

Publication number
CN110891057B
CN110891057B CN201911155624.XA CN201911155624A CN110891057B CN 110891057 B CN110891057 B CN 110891057B CN 201911155624 A CN201911155624 A CN 201911155624A CN 110891057 B CN110891057 B CN 110891057B
Authority
CN
China
Prior art keywords
protocol
target
target protocol
current
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911155624.XA
Other languages
Chinese (zh)
Other versions
CN110891057A (en
Inventor
张银山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qidi Block Chain Technology Development Co ltd
Original Assignee
Beijing Qidi Block Chain Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qidi Block Chain Technology Development Co ltd filed Critical Beijing Qidi Block Chain Technology Development Co ltd
Priority to CN201911155624.XA priority Critical patent/CN110891057B/en
Publication of CN110891057A publication Critical patent/CN110891057A/en
Application granted granted Critical
Publication of CN110891057B publication Critical patent/CN110891057B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for protocol conversion. The method is executed by a client and comprises the following steps: generating a protocol conversion instruction for converting a current protocol into a target protocol according to user operation; acquiring target protocol configuration parameters; processing the current protocol code according to the target protocol configuration parameters to generate a target protocol code; and sending the target protocol code to a target protocol interface, converting a request of a user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface. The embodiment of the invention automatically generates the conversion code converted from the current protocol to the target protocol by acquiring the configuration parameters of the target protocol, realizes the automatic calling between different protocols, avoids errors caused by manually modifying the code and improves the efficiency of protocol conversion.

Description

Protocol conversion method, device, equipment and storage medium
Technical Field
The present invention relates to internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for protocol conversion.
Background
With the gradual expansion of the application range of people to the internet, the network protocols often need to be mutually called and converted to meet the individual user requirements of users.
In the prior art, the calling and accessing modes of each protocol only aim at certain two specific protocols, for example: when the conversion between HTTP (Hyper Text Transfer Protocol) and RPC (Remote Procedure Call Protocol) is implemented, a code for calling an HTTP interface and a code for calling an RPC interface need to be written in advance. When the HTTP or RPC protocol is called, the call is implemented by the code.
However, when the invoked HTTP and RPC protocols are updated or changed, the codes need to be modified accordingly, the code maintenance cost is high, and close communication between workers is required. When different protocols are called, related codes need to be changed to realize protocol conversion, manpower and time are wasted, code errors are easy to occur, and the protocol conversion efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for protocol conversion, which generate a protocol conversion code by acquiring configuration parameters of a target protocol and improve the protocol conversion efficiency.
In a first aspect, an embodiment of the present invention provides a protocol conversion method, which is executed by a client, and the method includes:
generating a protocol conversion instruction for converting a current protocol into a target protocol according to user operation;
acquiring target protocol configuration parameters;
processing the current protocol code according to the target protocol configuration parameter to generate a protocol conversion code;
and sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
Optionally, the obtaining of the target protocol configuration parameter includes:
acquiring the target protocol configuration parameter from preset candidate protocol configuration parameters;
wherein the candidate protocols include at least one of: hypertext transfer protocol, remote procedure call protocol, file transfer protocol, and transfer control protocol.
Optionally, processing the current protocol code according to the target protocol configuration parameter to generate a protocol conversion code, including:
analyzing the current protocol code to obtain a target protocol configuration parameter position;
adding the target protocol configuration parameter to the position of the target protocol configuration parameter to generate a protocol conversion code converted from the current protocol to the target protocol;
wherein the target protocol configuration parameter comprises at least one of: the interface calling address of the target protocol, the request mode of the target protocol for the user operation request and the request parameters of the target protocol.
Optionally, sending the protocol conversion code to a target protocol interface includes:
and sending the protocol conversion code to a third-party server, and sending the protocol conversion code to the target protocol interface by the third-party server.
Optionally, before processing the current protocol code according to the target protocol configuration parameter, the method further includes:
and if the current configuration parameters of the target protocol are inconsistent with the latest configuration parameters of the target protocol, updating the current configuration parameters of the target protocol.
Optionally, the updating the current configuration parameter of the target protocol includes:
and comparing the current configuration parameters of the target protocol with the latest configuration parameters, and replacing inconsistent parts in the comparison result.
In a second aspect, an embodiment of the present invention further provides a protocol conversion apparatus, configured on a client, where the apparatus includes:
the instruction generating module is used for generating a protocol conversion instruction for converting the current protocol into the target protocol according to the user operation;
the parameter acquisition module is used for acquiring target protocol configuration parameters;
the code generation module is used for processing the current protocol code according to the target protocol configuration parameter and generating a protocol conversion code;
and the page jump module is used for sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the protocol conversion method according to any embodiment of the present invention when executing the program.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a protocol conversion method according to any of the embodiments of the present invention.
The embodiment of the invention responds to the protocol conversion instruction of the user by the client, acquires the configuration parameters of the target protocol and generates the protocol conversion code which can be converted into the target protocol so as to realize the automatic conversion from the current protocol to any target protocol, thereby solving the problem that the specific protocol can only be converted by modifying the code by the staff in the prior art, saving the labor and time, reducing the difficulty degree of code maintenance and improving the protocol conversion efficiency.
Drawings
Fig. 1 is a flowchart illustrating a protocol conversion method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a protocol conversion method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a protocol conversion apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a protocol conversion method according to an embodiment of the present invention, where the method is applicable to protocol conversion, and the method can be executed by a protocol conversion device configured on a client. As shown in fig. 1, the method specifically includes the following steps:
and step 110, generating a protocol conversion instruction for converting the current protocol into the target protocol according to the user operation.
The method comprises the steps that a user operates a current protocol on a client, if data information carried in the current protocol needs to be configured and output according to the data information in the current protocol and the inherent frame format of a target protocol in the operation process, namely conversion calling between different protocols is carried out, a protocol conversion instruction for converting the current protocol into the target protocol is sent to the client by the user. For example, the user wants to output the data in the RPC in the HTTP format, that is, the user issues a protocol conversion instruction to the client to convert the current protocol to the RPC into the target protocol HTTP.
And step 120, acquiring target protocol configuration parameters.
The client receives a protocol conversion instruction which is sent by a user and used for converting a current protocol into a target protocol, and acquires configuration parameters of the target protocol from a database, wherein the database is preset with candidate protocol configuration parameters.
Optionally, obtaining a target protocol configuration parameter from preset candidate protocol configuration parameters; wherein the candidate protocols include at least one of: hypertext transfer protocol, remote procedure call protocol, file transfer protocol, and transfer control protocol.
Specifically, the candidate protocol may include a hypertext transfer protocol, a remote procedure call protocol, a file transfer protocol, a transmission control protocol, and the like, and the candidate protocol configuration parameter may include an interface call address of the candidate protocol, a request mode of the candidate protocol for the user operation request, and a request parameter of the candidate protocol. The client determines the type of the target protocol, and then searches the corresponding configuration parameters according to the type of the target protocol. For example, the current protocol used by the user is RPC, the target protocol is HTTP, the user wants to perform login operation through HTTP, the login mode of the current protocol RPC is face login, and the login mode of HTTP is fingerprint login. After determining that the target protocol is the HTTP, the client acquires configuration parameters of the HTTP, where the configuration parameters may include a call address for logging in through the HTTP, a login manner of the HTTP, and fingerprint information of the user during login. The login mode is fingerprint login, and the fingerprint information when the user logs in is fingerprint login data preset by the user. By acquiring the target protocol configuration parameters from the preset candidate protocol configuration parameters, the extension of the protocol conversion type is realized, the error of working personnel in searching the configuration parameters of different protocols is avoided, the labor and the time are effectively saved, and the protocol conversion efficiency is improved.
And step 130, processing the current protocol code according to the target protocol configuration parameter to generate a protocol conversion code.
The client processes the current protocol code according to the acquired configuration parameters of the target protocol, adds the configuration parameters of the target protocol into the current protocol code, generates a protocol conversion code, and enables the protocol conversion code to realize the function of converting the current protocol into the target protocol.
Optionally, analyzing the current protocol code to obtain the position of the configuration parameter of the target protocol; adding the target protocol configuration parameters to the target protocol configuration parameter positions to generate protocol conversion codes converted from the current protocol to the target protocol; wherein the target protocol configuration parameter comprises at least one of: the interface calling address of the target protocol, the request mode of the target protocol for the user operation request and the request parameters of the target protocol.
Specifically, the client needs to add the configuration parameters of the target protocol to the vacant position of the configuration parameters of the target protocol in the current code. The client analyzes the current protocol code to obtain the components in the current protocol code, wherein the current protocol code may include a current protocol part and a target protocol part. And then searching the position of the target protocol configuration parameter from the component of the current protocol code, adding the target protocol configuration parameter to the position of the target protocol configuration parameter, and generating a complete protocol conversion code for converting the current protocol to the target protocol. And the current protocol code operates after generating a complete protocol conversion code, and does not operate if the protocol conversion is not needed. The target protocol configuration parameters may include an interface call address of the target protocol, a request mode of the target protocol for a user operation request, request parameters of the target protocol, and the like, where the request parameters of the target protocol may be determined according to a specific operation of a user. For example, if a user needs protocol conversion during login operation, the request parameter of the target protocol may be a preset personal parameter for login verification of the user, and the preset personal parameter may be a user face, a user fingerprint, a digital password, and the like; if the user needs protocol conversion when performing the amount transaction, the request parameter of the target protocol may be a preset personal parameter of the verification mode when the user performs the amount transaction, a transaction amount and other parameters.
By adding the target protocol configuration parameters into the current protocol code, the automatic generation of the protocol conversion code and the quick conversion of different protocols are realized. The method reduces the process of manually writing the codes by workers, avoids errors in the code writing process, and improves the efficiency of code writing and protocol conversion.
Step 140, sending the protocol conversion code to the target protocol interface, for converting the request of the user under the current protocol into the request identified by the target protocol, and jumping to the page associated with the target protocol through the target protocol interface.
The client transmits a data packet of the protocol conversion code to a target protocol interface, the target protocol interface converts an operation request of a user under the current protocol into an operation request which can be identified by the target protocol according to the protocol conversion code, so that the operation request of the user is operated, a result of the operation request of the user is converted into a data format which can be received by the current protocol according to the protocol conversion code and is returned to the client, the client jumps the page of the current protocol to a page associated with the target protocol, and the operation result of the target protocol is displayed on the jumped page of the current protocol. For example, a user logs in the HTTP on a page of the RPC, the client sends a protocol conversion code to an interface of the HTTP, the user logs in the HTTP, and returns a result after logging in to the RPC, and the RPC jumps the page to a page where the login is successful or failed according to the login result of the HTTP, thereby completing the user login operation under the protocol conversion condition. The user only needs to normally input the login request and the verification parameters in the login process, and a code compiling process of protocol conversion is not needed, so that the user operation is facilitated.
Optionally, the protocol conversion code is sent to a third-party server, and the third-party server sends the protocol conversion code to the target protocol interface.
Specifically, a third-party server may be added between the client and the target protocol interface, and the third-party server receives the protocol conversion code data packet sent by the client and sends the protocol conversion code to the corresponding target protocol interface. When at least two current protocols are subjected to protocol conversion, the protocol conversion codes can be cached and distributed in the third-party server, and the third-party server can be used as a load balancing server to realize data distribution during multi-protocol conversion, so that traffic congestion caused by overlarge traffic flow is avoided, and the efficiency of protocol conversion is improved.
According to the technical scheme of the embodiment, the target protocol to be converted is determined by receiving user operation, and the configuration parameters of the target protocol are acquired according to the type of the target protocol. And processing the current protocol code by adopting the configuration parameters of the target protocol to generate a protocol conversion code, and sending the protocol conversion code to the target protocol interface to realize the protocol conversion process. The problem of among the prior art, can only convert single agreement and need staff's manual coding is solved, realized the extension to the protocol conversion type, reduce the difficult degree of code maintenance, reduce the operation process of protocol conversion, practice thrift manpower and time, improve the efficiency of protocol conversion.
Example two
Fig. 2 is a flowchart illustrating a protocol conversion method according to a second embodiment of the present invention, which is further optimized based on the second embodiment. As shown in fig. 2, the method specifically includes the following steps:
step 210, according to the user operation, generating a protocol conversion instruction for converting the current protocol into the target protocol.
Step 220, obtaining the configuration parameters of the target protocol, and if the current configuration parameters of the target protocol are not consistent with the latest configuration parameters of the target protocol, updating the current configuration parameters of the target protocol.
And the client acquires the target protocol configuration parameters matched with the target protocol type from the candidate protocol configuration parameters according to the target protocol type in the protocol conversion instruction. And adding the target protocol configuration parameters into the current code to generate a protocol conversion code so as to complete protocol conversion. If the target protocol configuration parameter in the protocol conversion code is wrong, the protocol conversion code may not call the target protocol interface, resulting in a failure of protocol conversion. Therefore, before processing the current protocol code, the client may first detect the current configuration parameter of the target protocol, and ensure that the current configuration parameter of the target protocol is the latest configuration parameter. The client can also detect the configuration parameters of the candidate protocols at regular time and update the configuration parameters of the candidate protocols, so that the client omits the process of detecting the current configuration parameters of the target protocol when generating protocol conversion codes, and the protocol conversion efficiency is improved.
Optionally, the current configuration parameter of the target protocol is compared with the latest configuration parameter, and the inconsistent part in the comparison result is replaced.
Specifically, the user may send the latest configuration parameters of the target protocol or the candidate protocol to the client, or call a reload function in the client to implement hot update, and reload the latest configuration parameters of the target protocol or the candidate protocol that has been created in the client. The client can compare the current configuration parameters of the target protocol or the candidate protocol with the latest configuration parameters, find the part with inconsistent comparison results for replacement, realize incremental downloading, avoid the problem of large replacement amount caused by integral replacement of the configuration parameters, and reduce errors generated in the replacement process.
And step 230, processing the current protocol code according to the target protocol configuration parameters to generate a protocol conversion code.
Step 240, sending the protocol conversion code to the target protocol interface, for converting the request of the user under the current protocol into the request identified by the target protocol, and jumping to the page associated with the target protocol through the target protocol interface.
The embodiment of the invention determines the target protocol type required by a user by the client, searches the matched target protocol configuration parameter from the candidate protocol configuration parameters, processes the current protocol code according to the target protocol configuration parameter to generate the protocol conversion code, and sends the protocol conversion code to the target protocol interface to complete the protocol conversion. And the candidate configuration parameters and the target configuration parameters are updated according to the requirements of the user, so that the accuracy of the candidate configuration parameters and the target configuration parameters is ensured, incremental downloading of the configuration parameters can be performed in the updating process, the flow of data transmission is saved, errors in the data transmission process are reduced, the labor and the time are saved, and the success rate of protocol conversion is improved.
EXAMPLE III
Fig. 3 is a block diagram of a protocol conversion apparatus according to a third embodiment of the present invention, which is capable of executing a protocol conversion method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 3, the apparatus specifically includes:
an instruction generating module 301, configured to generate a protocol conversion instruction for converting a current protocol into a target protocol according to a user operation;
a parameter obtaining module 302, configured to obtain target protocol configuration parameters;
a code generation module 303, configured to process a current protocol code according to a target protocol configuration parameter, and generate a protocol conversion code;
and the page jump module 304 is configured to send the protocol conversion code to the target protocol interface, convert the request of the user under the current protocol into a request identified by the target protocol, and jump to a page associated with the target protocol through the target protocol interface.
Optionally, the parameter obtaining module 302 is specifically configured to:
acquiring target protocol configuration parameters from preset candidate protocol configuration parameters;
wherein the candidate protocols include at least one of: hypertext transfer protocol, remote procedure call protocol, file transfer protocol, and transfer control protocol.
Optionally, the code generating module 303 is specifically configured to:
analyzing the current protocol code to obtain the position of the configuration parameter of the target protocol;
adding the target protocol configuration parameters to the target protocol configuration parameter positions to generate protocol conversion codes converted from the current protocol to the target protocol;
wherein the target protocol configuration parameter comprises at least one of: the interface calling address of the target protocol, the request mode of the target protocol for the user operation request and the request parameters of the target protocol.
Optionally, the page jump module 304 is specifically configured to:
and sending the protocol conversion code to a third-party server, and sending the protocol conversion code to a target protocol interface by the third-party server.
Optionally, the apparatus further comprises:
and the parameter updating module is used for updating the current configuration parameters of the target protocol if the current configuration parameters of the target protocol are inconsistent with the latest configuration parameters of the target protocol.
Optionally, the parameter updating module is specifically configured to:
and comparing the current configuration parameters of the target protocol with the latest configuration parameters, and replacing inconsistent parts in the comparison result.
The embodiment of the invention receives user operation through the client, determines the target protocol to be converted, and acquires the configuration parameters corresponding to the target protocol according to the type of the target protocol. And processing the current protocol code by adopting the configuration parameters of the target protocol to generate a protocol conversion code, and sending the protocol conversion code to the target protocol interface to realize the protocol conversion process. Aiming at the problems that only a single protocol can be converted and a worker needs to manually code in the prior art, configuration parameters of multiple protocols are preset in a client, so that the extension of protocol conversion types is realized, the difficulty degree of code maintenance is reduced by automatically generating protocol conversion codes, the operation process of protocol conversion is reduced, manpower and time are saved, and the efficiency of protocol conversion is improved.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 400 suitable for use in implementing embodiments of the present invention. The computer device 400 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in fig. 4, computer device 400 is in the form of a general purpose computing device. The components of computer device 400 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 400 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 400 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The computer device 400 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The computer device 400 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the computer device 400, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 400 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Moreover, computer device 400 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 412. As shown, network adapter 412 communicates with the other modules of computer device 400 over bus 403. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by executing programs stored in the system memory 402, for example, to implement a protocol conversion method provided by an embodiment of the present invention, including:
generating a protocol conversion instruction for converting a current protocol into a target protocol according to user operation;
acquiring target protocol configuration parameters;
processing the current protocol code according to the target protocol configuration parameters to generate a protocol conversion code;
and sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for implementing a protocol conversion method provided in the fifth embodiment of the present invention includes:
generating a protocol conversion instruction for converting a current protocol into a target protocol according to user operation;
acquiring target protocol configuration parameters;
processing the current protocol code according to the target protocol configuration parameters to generate a protocol conversion code;
and sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A protocol conversion method, performed by a client, comprising:
generating a protocol conversion instruction for converting a current protocol into a target protocol according to user operation;
acquiring target protocol configuration parameters;
analyzing the current protocol code to obtain a target protocol configuration parameter position;
adding the target protocol configuration parameter to the position of the target protocol configuration parameter to generate a protocol conversion code converted from the current protocol to the target protocol;
and sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
2. The method of claim 1, wherein obtaining target protocol configuration parameters comprises:
acquiring the target protocol configuration parameter from preset candidate protocol configuration parameters;
wherein the candidate protocols include at least one of: hypertext transfer protocol, remote procedure call protocol, file transfer protocol, and transfer control protocol.
3. The method of claim 1, wherein the target protocol configuration parameter comprises at least one of: the interface calling address of the target protocol, the request mode of the target protocol for the user operation request and the request parameters of the target protocol.
4. The method of claim 1, wherein said sending the protocol translation code to a target protocol interface comprises:
and sending the protocol conversion code to a third-party server, and sending the protocol conversion code to the target protocol interface by the third-party server.
5. The method of claim 1, further comprising, prior to processing a current protocol code according to the target protocol configuration parameters:
and if the current configuration parameters of the target protocol are inconsistent with the latest configuration parameters of the target protocol, updating the current configuration parameters of the target protocol.
6. The method of claim 5, wherein the updating the current configuration parameters of the target protocol comprises:
and comparing the current configuration parameters of the target protocol with the latest configuration parameters, and replacing inconsistent parts in the comparison result.
7. A protocol conversion apparatus, configured on a client, comprising:
the instruction generating module is used for generating a protocol conversion instruction for converting the current protocol into the target protocol according to the user operation;
the parameter acquisition module is used for acquiring target protocol configuration parameters;
the code generation module is used for analyzing the current protocol code to obtain the position of the configuration parameter of the target protocol; adding the target protocol configuration parameter to the position of the target protocol configuration parameter to generate a protocol conversion code converted from the current protocol to the target protocol;
and the page jump module is used for sending the protocol conversion code to a target protocol interface, converting the request of the user under the current protocol into a request identified by the target protocol, and jumping to a page associated with the target protocol through the target protocol interface.
8. The apparatus of claim 7, wherein the parameter obtaining module is specifically configured to:
acquiring the target protocol configuration parameter from preset candidate protocol configuration parameters;
wherein the candidate protocols include at least one of: hypertext transfer protocol, remote procedure call protocol, file transfer protocol, and transfer control protocol.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the protocol conversion method according to any one of claims 1 to 6 when executing the program.
10. A storage medium containing computer-executable instructions for performing the protocol conversion method of any one of claims 1-6 when executed by a computer processor.
CN201911155624.XA 2019-11-22 2019-11-22 Protocol conversion method, device, equipment and storage medium Active CN110891057B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911155624.XA CN110891057B (en) 2019-11-22 2019-11-22 Protocol conversion method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911155624.XA CN110891057B (en) 2019-11-22 2019-11-22 Protocol conversion method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110891057A CN110891057A (en) 2020-03-17
CN110891057B true CN110891057B (en) 2021-12-28

Family

ID=69748454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911155624.XA Active CN110891057B (en) 2019-11-22 2019-11-22 Protocol conversion method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110891057B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432000A (en) * 2020-03-24 2020-07-17 中国建设银行股份有限公司 Control method, device, equipment and storage medium of Internet of things equipment
CN111597059A (en) * 2020-04-18 2020-08-28 北京奇保信安科技有限公司 Interface calling request processing method and device and electronic equipment
CN113242241A (en) * 2021-05-11 2021-08-10 浙江鸿程计算机系统有限公司 Method for converting SAP RFC protocol into HTTP protocol
CN113382062A (en) * 2021-06-08 2021-09-10 北京天空卫士网络安全技术有限公司 Data transmission method, device and system
CN113364890B (en) * 2021-06-30 2022-10-28 北京奇艺世纪科技有限公司 Data processing method, device, network equipment and medium
CN113448689A (en) * 2021-07-09 2021-09-28 中国银行股份有限公司 Dubbo protocol conversion device and method in operation period
CN114499930A (en) * 2021-12-13 2022-05-13 奇安信科技集团股份有限公司 Method and device for processing multi-protocol single sign-on request
CN114615346A (en) * 2022-03-08 2022-06-10 上海金仕达软件科技有限公司 Protocol conversion method and device
CN114594714B (en) * 2022-03-23 2024-04-12 苏州佳祺仕科技股份有限公司 Equipment control method, device, equipment and storage medium
CN114978786B (en) * 2022-05-30 2023-08-22 广州宸祺出行科技有限公司 Method and device for converting third party interface into system standard interface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2563431A1 (en) * 2004-04-09 2005-10-20 Huawei Technologies Co., Ltd. Asn.1 protocol processor and method for asn.1 protocol processing
CN101324918A (en) * 2008-07-25 2008-12-17 北京信城通数码科技有限公司 Method for host computer to perform dynamic switch for multi-vendor chip equipment data switching protocol
CN103428627A (en) * 2012-05-22 2013-12-04 中国移动通信集团江苏有限公司 Method for transferring data in internet of things, internet of things system and corresponding device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2563431A1 (en) * 2004-04-09 2005-10-20 Huawei Technologies Co., Ltd. Asn.1 protocol processor and method for asn.1 protocol processing
CN101324918A (en) * 2008-07-25 2008-12-17 北京信城通数码科技有限公司 Method for host computer to perform dynamic switch for multi-vendor chip equipment data switching protocol
CN103428627A (en) * 2012-05-22 2013-12-04 中国移动通信集团江苏有限公司 Method for transferring data in internet of things, internet of things system and corresponding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
可配置协议转换方法的设计与实现;聂晓旭;《计算机技术与发展》;20150213;全文 *

Also Published As

Publication number Publication date
CN110891057A (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN110891057B (en) Protocol conversion method, device, equipment and storage medium
US10275409B2 (en) Metadata manager for analytics system
CN112860798B (en) Data processing method and device, electronic equipment and storage medium
CN111432000A (en) Control method, device, equipment and storage medium of Internet of things equipment
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN111818145B (en) File transmission method, device, system, equipment and storage medium
CN111796978A (en) Interface detection method, device, system, equipment and storage medium
CN104298675A (en) Method and device for cache management
CN111339051B (en) Log processing method, system, device and storage medium
US9172395B2 (en) Generating an ICONV module in real time
EP3519964B1 (en) Electronic apparatus for recording debugging information and control method thereof
CN111711713B (en) Data access method, computer device and storage medium
CN113934554A (en) RPC cross-language communication method and device, storage medium and electronic equipment
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN114090514A (en) Log retrieval method and device for distributed system
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment
CN112364268A (en) Resource acquisition method and device, electronic equipment and storage medium
CN110908818A (en) Verification method, device, equipment and storage medium
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN112597220B (en) Data file reading method, device, electronic equipment and medium
CN112769975B (en) Data integration method and device, server and storage medium
CN112491940B (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN110099096B (en) Application program configuration method, device, computer equipment and storage medium
KR20230149235A (en) Method and apparatus for hybrid remote browser service
CN114296783A (en) Method and device for calling installation package, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant