CN111741006B - Discrete acquisition gateway and implementation method thereof - Google Patents

Discrete acquisition gateway and implementation method thereof Download PDF

Info

Publication number
CN111741006B
CN111741006B CN202010620122.6A CN202010620122A CN111741006B CN 111741006 B CN111741006 B CN 111741006B CN 202010620122 A CN202010620122 A CN 202010620122A CN 111741006 B CN111741006 B CN 111741006B
Authority
CN
China
Prior art keywords
service data
data packet
communication protocol
component
gateway
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
CN202010620122.6A
Other languages
Chinese (zh)
Other versions
CN111741006A (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.)
Zhongchuan Sanyou Beijing Technology Co ltd
Original Assignee
Zhongchuan Sanyou Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongchuan Sanyou Beijing Technology Co ltd filed Critical Zhongchuan Sanyou Beijing Technology Co ltd
Priority to CN202010620122.6A priority Critical patent/CN111741006B/en
Publication of CN111741006A publication Critical patent/CN111741006A/en
Application granted granted Critical
Publication of CN111741006B publication Critical patent/CN111741006B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a discrete acquisition gateway and a realization method thereof, wherein the discrete acquisition gateway comprises: the first gateway component is used for establishing long connection with the charging piles, receiving service data packets and/or non-service data packets in a first communication protocol format sent by the charging piles and routing the service data packets and/or non-service data packets to the second gateway component; the second gateway component is used for processing the decrypted non-service data packet, maintaining the session and the heartbeat between the first gateway component and the plurality of charging piles, and sending the decrypted service data packet into a message queue; the protocol conversion component is used for converting the decrypted service data packet into a service data packet in a second communication protocol format; and the service processing component is used for establishing short connection with the protocol conversion component, processing and storing the service data packet in the second communication protocol format. The method and the device can realize complete decoupling of the service layer and the connection layer of the discrete acquisition gateway, and do not influence the connection state of the charging pile when a protocol built in the service layer is subsequently changed.

Description

Discrete acquisition gateway and implementation method thereof
Technical Field
The application relates to the technical field of gateways, in particular to a discrete acquisition gateway and an implementation method thereof.
Background
The stake of charging can be for electric automobile charges, and in recent years, along with electric automobile's rapid development, the stake agreement needs frequent revision and optimization. Because the service layer and the connection layer are coupled together in the current acquisition gateway, the coupling degree is very high, and the connection layer is interrupted when a protocol built in the service layer is changed every time, so that large-area disconnection of a charging pile is caused.
Disclosure of Invention
In view of this, an object of the present application is to provide a discrete acquisition gateway and an implementation method thereof, which can achieve the effects that a service layer and a connection layer of the discrete acquisition gateway are thoroughly decoupled, and a connection state of a charging pile is not affected when a protocol built in the service layer is subsequently changed.
In a first aspect, an embodiment of the present application provides a discrete acquisition gateway, including:
the first gateway component is used for establishing long connection of a first communication protocol with the plurality of charging piles, receiving service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routing the service data packets and/or non-service data packets to the second gateway component;
the second gateway component is used for decrypting the service data packet and/or the non-service data packet in the first communication protocol format, processing the decrypted non-service data packet, maintaining the session and heartbeat between the first gateway component and the plurality of charging piles, and sending the decrypted service data packet into a message queue;
the protocol conversion component is used for reading the decrypted service data packet from the message queue, converting the decrypted service data packet into a service data packet in a second communication protocol format, and forwarding the service data packet in the second communication protocol format to the service processing component;
and the service processing component is used for establishing short connection of a second communication protocol with the protocol conversion component, and processing and storing the service data packet in the second communication protocol format.
In a possible implementation manner, the service processing component is further configured to issue a stub command in a second communication protocol format to the protocol conversion component;
the protocol conversion component is further configured to convert the stub command in the second communication protocol format into an unencrypted stub command, and send the unencrypted stub command to the message queue;
the second gateway component is further configured to read the unencrypted stub command from the message queue, encrypt the unencrypted stub command to obtain a stub command in a first communication protocol format, and forward the stub command in the first communication protocol format to the first gateway component;
the first gateway component is further configured to issue the stub command in the first communication protocol format to a corresponding charging pile.
In a possible embodiment, the first gateway component is further configured to monitor at least one of a connection status of a long connection of the first communication protocol, a source of a dropped connection fault, a content of a last encrypted message, and details of a stub status.
In a possible implementation manner, the service processing component is specifically configured to: and performing heat treatment on the service data packet in the second communication protocol format by using heat treatment service and storing the service data packet, or uploading the service data packet in the second communication protocol format to a service background for processing and storing.
In one possible implementation, the service data packet includes: a data packet associated with a stub charging service, the non-service data packet comprising: data packets associated with the stub connection.
In a second aspect, an embodiment of the present application provides an implementation method of a discrete acquisition gateway, including:
the first gateway component establishes long connection with a first communication protocol of a plurality of charging piles, receives service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routes the service data packets and/or non-service data packets to the second gateway component;
the second gateway component decrypts the service data packet and/or the non-service data packet in the first communication protocol format, processes the decrypted non-service data packet, maintains the session and heartbeat between the first gateway component and the plurality of charging piles, and sends the decrypted service data packet into a message queue;
the protocol conversion component reads the decrypted service data packet from the message queue, converts the decrypted service data packet into a service data packet in a second communication protocol format, and forwards the service data packet in the second communication protocol format to the service processing component;
and the service processing component establishes short connection with a second communication protocol of the protocol conversion component, and processes and stores the service data packet in the second communication protocol format.
In a possible implementation, the implementation method further includes:
the service processing component issues a stub command in a second communication protocol format to the protocol conversion component;
the protocol conversion component converts the stub command in the second communication protocol format into an unencrypted stub command and sends the unencrypted stub command to the message queue;
the second gateway component reads the unencrypted stub command from the message queue, encrypts the unencrypted stub command to obtain the stub command in a first communication protocol format, and forwards the stub command in the first communication protocol format to the first gateway component;
and the first gateway component issues the pile command in the first communication protocol format to the corresponding charging pile.
In a possible implementation manner, the processing and storing, by the service processing component, the service data packet in the second communication protocol format includes:
and the service processing component carries out heat treatment on the service data packet in the second communication protocol format by using heat treatment service and stores the service data packet, or uploads the service data packet in the second communication protocol format to a service background for processing and storing.
In one possible implementation, the service data packet includes: a data packet associated with a stub charging service, the non-service data packet comprising: data packets associated with the stub connection.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the method according to any one of the possible embodiments of the second aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method according to any one of the possible implementation manners in the second aspect.
The embodiment of the application provides a discrete acquisition gateway, which comprises a first gateway component, a second gateway component, a protocol conversion component and a service processing component, wherein the first gateway component is connected with a plurality of charging piles in a long way, and the service processing component is connected with the protocol conversion component in a short way. And the first gateway component receives the service data packet and/or the non-service data packet in the first communication protocol format sent by the charging pile and routes the service data packet and/or the non-service data packet to the second gateway component. The second gateway component keeps the session and heartbeat between the first gateway component and the plurality of charging piles, namely the second gateway component externally maintains the long connection of the first communication protocol between the charging piles and the discrete acquisition gateway; the second gateway component sends the decrypted service data packet into the message queue, the protocol conversion component converts the decrypted service data packet into a service data packet in a second communication protocol format, the service processing component processes and stores the service data packet in the second communication protocol format, namely the second gateway component is internally butted with the service layer, so that complete decoupling of the service layer and the connection layer of the discrete acquisition gateway can be realized, and the connection state of the charging pile is not influenced when the protocol built in the service layer is subsequently changed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 illustrates a system architecture diagram of a discrete acquisition gateway provided in an embodiment of the present application;
fig. 2 shows a schematic structural diagram of a discrete acquisition gateway provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating an implementation method of a discrete acquisition gateway according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
In the traditional scheme, a service layer and a connecting layer in an acquisition gateway are coupled together, the coupling degree is very high, the connecting layer is interrupted when a protocol built in the service layer is changed every time, and therefore large-area disconnection of a charging pile is caused. Based on this, the embodiment of the present application provides a discrete acquisition gateway and an implementation method thereof, which are described below by way of an embodiment.
To facilitate understanding of the present embodiment, a detailed description is first given below of a discrete acquisition gateway disclosed in the present embodiment with reference to fig. 1 and fig. 2.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a discrete acquisition gateway according to an embodiment of the present application. As shown in fig. 2, the discrete acquisition gateway includes a first gateway component 10, a second gateway component 20, a protocol conversion component 30, and a traffic processing component 40.
Firstly, a process of forward transmission of a data packet from a charging pile to a cloud platform is described in detail with reference to fig. 1 and fig. 2.
The first gateway component 10 is used for establishing long connection of a first communication protocol with a plurality of charging piles, receiving service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routing the service data packets and/or non-service data packets to the second gateway component 20;
the second gateway component 20 is configured to decrypt the service data packet and/or the non-service data packet in the first communication protocol format, process the decrypted non-service data packet, maintain sessions and heartbeats between the first gateway component and the plurality of charging piles, and send the decrypted service data packet to a message queue;
the protocol conversion component 30 is configured to read the decrypted service data packet from the message queue, convert the decrypted service data packet into a service data packet in a second communication protocol format, and forward the service data packet in the second communication protocol format to the service processing component 40;
and the service processing component 40 is configured to establish a short connection of a second communication protocol with the protocol conversion component, and process and store the service data packet in the format of the second communication protocol.
The first gateway component 10, the second gateway component 20, the protocol conversion component 30, and the service processing component 40 and their operation processes will be described in detail below.
(1) First gateway component 10
The first gateway component 10 includes a plurality of first gateways distributed discretely, and the plurality of first gateways establish long connections of a first communication protocol with the plurality of charging piles, respectively. In this embodiment, the first gateway may be an API gateway, the first gateway component 10 may be a component including several API gateways, and the first communication protocol may be a TCP protocol. The API gateway uniformly accesses all the calls of the API to the API gateway layer, and the API gateway layer is responsible for accessing and outputting. The TCP protocol is a common long connection protocol, and is not described herein. The embodiment is not limited to this, and may also be a communication protocol of other types of gateways and long connections. A plurality of electric pile that fills can be for the electric pile that fills of different operators, can initiatively report data to the API gateway.
The first gateway component 10 receives the service data packet and/or the non-service data packet in the first communication protocol format sent by the charging pile and routes the service data packet and/or the non-service data packet to the second gateway component 20. The service data packet comprises: data packets related to the stake charging service, such as: the real-time state of charging, the amount of money of the electric card, an order for pile charging and the like. The non-service data packet comprises: data packets associated with the stub connection, such as: pile log-in requests, logoff requests, heartbeats, etc. In this embodiment, the API gateway receives the service data packet and/or the non-service data packet in the TCP protocol format sent by the charging pile and routes the service data packet and/or the non-service data packet to the second gateway component 20. It should be noted that in the specific implementation, the TCP packet may be routed to a service gateway or other platform for subsequent processing according to the user configuration information. Specifically, the pile message can be automatically routed to a new version platform or an old version platform according to the pile code to be switched, which is recorded in advance. The API gateway is used for realizing the technical monitoring of the reverse proxy of the long connection (TCP connection for short) of the charging pile TCP protocol and the TCP connection. In specific implementation, a Java technology stack and a Netty framework are adopted for implementation, an NIO technology is used in the whole process, a traditional thread model is not used, excellent performance under a high concurrency condition is guaranteed, ten thousand piles can be supported for concurrency, and distributed deployment is supported.
The embodiment also monitors the specific state of the stub connection, such as at least one of the stub state monitoring (offline/online), the source of the disconnection fault (stub side or platform side), the last encrypted message content, and the details of all the stub states connected to the API gateway, which can be queried in the page according to the stub codes. Specifically, a special monitoring page and a front end are provided, and the monitoring page and the front end are realized by a Python back end frame and Vue and are matched to be output to the operation and maintenance log.
(2) Second gateway component 20
The second gateway component 20 comprises a number of second gateways which establish long connections of the first communication protocol with a number of first gateways, respectively. In this embodiment, the second gateway may be a service gateway, and the second gateway component 20 may be a component including several service gateways.
In this embodiment, the service gateway establishes a long connection of a TCP protocol with the API gateway, and the service gateway first decrypts a service data packet and/or a non-service data packet in a TCP protocol format, where the non-service data packet may include a stub login request data packet, a stub offline request data packet, a heartbeat data packet, and so on; secondly, the decrypted non-service data packet is processed, and due to the fact that a login request data packet, a pile offline request data packet and a heartbeat data packet are processed, service processing of the charging pile can be monitored; keeping sessions and heartbeats between the API gateway and the plurality of charging piles again, namely, the service gateway externally maintains long connection of TCP protocols of the charging piles and the discrete acquisition gateway, specifically, by using a cache cluster, storing heartbeat sessions of all piles in a centralized manner, recording initial expiration time, when the piles send heartbeats again within the expiration time, the service gateway covers last-time recording and restarts recording the expiration time so as to keep a long connection state of the piles, judging that the piles are offline if the heartbeats are not received after the expiration time is exceeded, and actively disconnecting the long connection with the piles by the service gateway; and finally, the service gateway sends the decrypted service data packet into a message queue (such as a Kafka message queue) for service processing, namely the service gateway is butted with the service layer internally, so that the service layer and the connection layer of the discrete acquisition gateway can be thoroughly decoupled, and the connection state of the charging pile is not influenced when a protocol built in the service layer is subsequently changed.
(3) Protocol conversion component 30
The protocol conversion component 30 reads the decrypted service data packet from the message queue (at this time, the decrypted service data packet is plaintext data), converts the decrypted service data packet into a service data packet in a second communication protocol format, and forwards the service data packet in the second communication protocol format to the service processing component 40. In this embodiment, the second communication protocol may be an HTTP protocol, and the second communication protocol format may be an HTTP protocol format. The embodiment is not limited to this, and may also be a communication protocol of other short connections.
The protocol conversion component 30 is implemented by using a Java technology stack and a Spring Boot framework, and uses a new Webflux technology, wherein an NIO technology and a large amount of asynchronous operations are used, so that the performance under a high concurrency condition is ensured. In this embodiment, since the HTTP protocol is converted, new interfaces of the HTTP service need to be designed, and these service interfaces are implemented one by one. The HTTP conversion service can be changed at any time according to business needs, the connection condition of the charging pile cannot be influenced by every change, and the usability of the whole service cannot be influenced.
(4) Business processing component 40
The service processing component 40 establishes a short connection of the second communication protocol with the protocol conversion component 30. In this embodiment, the second communication protocol may be an HTTP protocol. The embodiment is not limited to this, and may also be a communication protocol of other types of short connections. The service processing component 40 processes and stores the service data packet in the second communication protocol format. In this embodiment, the service processing component 40 performs thermal processing on the service data packet in the HTTP protocol format by using a thermal processing service and stores the service data packet, or uploads the service data packet in the HTTP protocol format to a service background (for example, SaaS background) to be processed and stored (for example, stored in MySQL database).
Next, a process of transmitting a data packet from the charging pile to the cloud platform in the reverse direction will be described in detail with reference to fig. 1 and fig. 2.
A service processing component 40, configured to issue a stub command in a second communication protocol format to the protocol conversion component 30;
a protocol conversion component 30, configured to convert the stub command in the second communication protocol format into an unencrypted stub command, and send the unencrypted stub command into the message queue;
the second gateway component 20 is configured to read the unencrypted stub command from the message queue, encrypt the unencrypted stub command to obtain a stub command in a first communication protocol format, and forward the stub command in the first communication protocol format to the first gateway component 10;
and the first gateway component 10 is configured to issue the stub command in the first communication protocol format to a corresponding charging stub.
The first gateway component 10, the second gateway component 20, the protocol conversion component 30, and the service processing component 40 and their operation processes will be described in detail below.
(1) Business processing component 40
The service processing component 40 establishes a short connection of the second communication protocol with the protocol conversion component 30. In this embodiment, the second communication protocol may be an HTTP protocol. The embodiment is not limited to this, and may also be a communication protocol of other types of short connections. The business process component 40 issues stub commands in the second communication protocol format to the protocol conversion component 30. The stub command may be a restart command, a login response command, a heartbeat, and the like. In this embodiment, the transaction processing component 40 issues stub commands in HTTP protocol format to the protocol conversion component 30.
(2) Protocol conversion component 30
Protocol conversion component 30 converts the stub command in the second communication protocol format (e.g., HTTP protocol format) to an unencrypted stub command (i.e., plaintext data) and sends the unencrypted stub command to the message queue (e.g., Kafka message queue).
(3) Second gateway component 20
The second gateway component 20 comprises a number of second gateways which establish long connections of the first communication protocol with a number of first gateways, respectively. In this embodiment, the second gateway may be a service gateway, and the second gateway component 20 may be a component including several service gateways.
The second gateway component 20 reads the unencrypted stub command (i.e. the plaintext data) from the message queue, encrypts the unencrypted stub command to obtain the stub command in the first communication protocol format, and forwards the stub command in the first communication protocol format to the first gateway component 10. In this embodiment, the first communication protocol may be a TCP protocol, and the first communication protocol format may be a TCP protocol format. In this embodiment, the second gateway component 20 reads the unencrypted stub command (i.e. plaintext data) from the message queue, encrypts the unencrypted stub command to obtain a stub command in a TCP protocol format, and forwards the stub command in the TCP protocol format to the first gateway component 10.
(4) First gateway component 10
The first gateway component 10 includes a plurality of first gateways distributed discretely, and the plurality of first gateways establish long connections of a first communication protocol with the plurality of charging piles, respectively. In this embodiment, the first gateway may be an API gateway, the first gateway component 10 may be a component including several API gateways, and the first communication protocol may be a TCP protocol. The API gateway uniformly accesses all the calls of the API to the API gateway layer, and the API gateway layer is responsible for accessing and outputting. The TCP protocol is a common long connection protocol, and is not described herein. The embodiment is not limited to this, and may also be a communication protocol of other types of gateways and long connections. The charging piles can be charging piles of different operators and can receive issued pile commands.
The first gateway component 10 issues the stub command in the first communication protocol format to the corresponding charging stub. In this embodiment, the API gateway component issues the stub command in the TCP protocol format to the corresponding charging stub.
To sum up, the embodiment of the present application provides a discrete acquisition gateway, which includes a first gateway component, a second gateway component, a protocol conversion component, and a service processing component, where the first gateway component establishes a long connection of a first communication protocol with a plurality of charging piles, and the service processing component establishes a short connection of a second communication protocol with the protocol conversion component. And the first gateway component receives the service data packet and/or the non-service data packet in the first communication protocol format sent by the charging pile and routes the service data packet and/or the non-service data packet to the second gateway component. The second gateway component keeps the session and heartbeat between the first gateway component and the plurality of charging piles, namely the second gateway component externally maintains the long connection of the first communication protocol between the charging piles and the discrete acquisition gateway; the second gateway component sends the decrypted service data packet into the message queue, the protocol conversion component converts the decrypted service data packet into a service data packet in a second communication protocol format, the service processing component processes and stores the service data packet in the second communication protocol format, namely the second gateway component is internally butted with the service layer, so that complete decoupling of the service layer and the connection layer of the discrete acquisition gateway can be realized, and the connection state of the charging pile is not influenced when the protocol built in the service layer is subsequently changed.
Based on the same technical concept, embodiments of the present application further provide an implementation method of a discrete acquisition gateway, an electronic device, a computer storage medium, and the like, which may be specifically referred to in the following embodiments.
Referring to fig. 3, fig. 3 is a flowchart of an implementation method of a discrete acquisition gateway according to an embodiment of the present application. As shown in fig. 3, the method may include:
step S301, a first gateway component establishes long connection with a first communication protocol of a plurality of charging piles, receives service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routes the service data packets and/or non-service data packets to a second gateway component;
step S302, the second gateway component decrypts the service data packet and/or the non-service data packet in the first communication protocol format, processes the decrypted non-service data packet, maintains the session and heartbeat between the first gateway component and the plurality of charging piles, and sends the decrypted service data packet into a message queue;
step S303, the protocol conversion component reads the decrypted service data packet from the message queue, converts the decrypted service data packet into a service data packet in a second communication protocol format, and forwards the service data packet in the second communication protocol format to the service processing component;
step S304, the service processing component establishes a short connection with the second communication protocol of the protocol conversion component, and processes and stores the service data packet in the second communication protocol format.
In a possible implementation, the implementation method further includes:
the service processing component issues a stub command in a second communication protocol format to the protocol conversion component;
the protocol conversion component converts the stub command in the second communication protocol format into an unencrypted stub command and sends the unencrypted stub command to the message queue;
the second gateway component reads the unencrypted stub command from the message queue, encrypts the unencrypted stub command to obtain the stub command in a first communication protocol format, and forwards the stub command in the first communication protocol format to the first gateway component;
and the first gateway component issues the pile command in the first communication protocol format to the corresponding charging pile.
In a possible implementation, the step S304 includes: and the service processing component carries out heat treatment on the service data packet in the second communication protocol format by using heat treatment service and stores the service data packet, or uploads the service data packet in the second communication protocol format to a service background for processing and storing.
In one possible implementation, the service data packet includes: a data packet associated with a stub charging service, the non-service data packet comprising: data packets associated with the stub connection.
An embodiment of the present application discloses an electronic device, as shown in fig. 4, including: a processor 401, a memory 402, and a bus 403, the memory 402 storing machine-readable instructions executable by the processor 401, the processor 401 and the memory 402 communicating via the bus 403 when the electronic device is operating. The machine readable instructions, when executed by the processor 401, perform the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
The computer program product for implementing the method of the discrete acquisition gateway provided in the embodiment of the present application includes a computer-readable storage medium storing a nonvolatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and is not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A discrete acquisition gateway, comprising:
the first gateway component is used for establishing long connection of a first communication protocol with the plurality of charging piles, receiving service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routing the service data packets and/or non-service data packets to the second gateway component;
the second gateway component is used for decrypting the service data packet and/or the non-service data packet in the first communication protocol format, processing the decrypted non-service data packet, maintaining the session and heartbeat between the first gateway component and the plurality of charging piles, and sending the decrypted service data packet into a message queue;
the protocol conversion component is used for reading the decrypted service data packet from the message queue, converting the decrypted service data packet into a service data packet in a second communication protocol format, and forwarding the service data packet in the second communication protocol format to the service processing component;
and the service processing component is used for establishing short connection of a second communication protocol with the protocol conversion component, and processing and storing the service data packet in the second communication protocol format.
2. The discrete acquisition gateway of claim 1,
the service processing component is also used for issuing a stub command in a second communication protocol format to the protocol conversion component;
the protocol conversion component is further configured to convert the stub command in the second communication protocol format into an unencrypted stub command, and send the unencrypted stub command to the message queue;
the second gateway component is further configured to read the unencrypted stub command from the message queue, encrypt the unencrypted stub command to obtain a stub command in a first communication protocol format, and forward the stub command in the first communication protocol format to the first gateway component;
the first gateway component is further configured to issue the stub command in the first communication protocol format to a corresponding charging pile.
3. The discrete acquisition gateway of claim 1,
the first gateway component is further configured to monitor at least one of a connection status of a long connection of the first communication protocol, a source of a disconnection fault, a content of a last encrypted message, and details of a stub status.
4. The discrete acquisition gateway of claim 1, wherein the service processing component is specifically configured to: and performing heat treatment on the service data packet in the second communication protocol format by using heat treatment service and storing the service data packet, or uploading the service data packet in the second communication protocol format to a service background for processing and storing.
5. The discrete acquisition gateway of claim 1, wherein the traffic data packet comprises: a data packet associated with a stub charging service, the non-service data packet comprising: data packets associated with the stub connection.
6. A method for implementing a discrete acquisition gateway, comprising:
the first gateway component establishes long connection with a first communication protocol of a plurality of charging piles, receives service data packets and/or non-service data packets in the first communication protocol format sent by the charging piles and routes the service data packets and/or non-service data packets to the second gateway component;
the second gateway component decrypts the service data packet and/or the non-service data packet in the first communication protocol format, processes the decrypted non-service data packet, maintains the session and heartbeat between the first gateway component and the plurality of charging piles, and sends the decrypted service data packet into a message queue;
the protocol conversion component reads the decrypted service data packet from the message queue, converts the decrypted service data packet into a service data packet in a second communication protocol format, and forwards the service data packet in the second communication protocol format to the service processing component;
and the service processing component establishes short connection with a second communication protocol of the protocol conversion component, and processes and stores the service data packet in the second communication protocol format.
7. The method of claim 6, further comprising:
the service processing component issues a stub command in a second communication protocol format to the protocol conversion component;
the protocol conversion component converts the stub command in the second communication protocol format into an unencrypted stub command and sends the unencrypted stub command to the message queue;
the second gateway component reads the unencrypted stub command from the message queue, encrypts the unencrypted stub command to obtain the stub command in a first communication protocol format, and forwards the stub command in the first communication protocol format to the first gateway component;
and the first gateway component issues the pile command in the first communication protocol format to the corresponding charging pile.
8. The method of claim 6, wherein the processing and storing the service data packet in the second communication protocol format by the service processing component comprises:
and the service processing component carries out heat treatment on the service data packet in the second communication protocol format by using heat treatment service and stores the service data packet, or uploads the service data packet in the second communication protocol format to a service background for processing and storing.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method according to any one of claims 6 to 8.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 6 to 8.
CN202010620122.6A 2020-06-30 2020-06-30 Discrete acquisition gateway and implementation method thereof Active CN111741006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010620122.6A CN111741006B (en) 2020-06-30 2020-06-30 Discrete acquisition gateway and implementation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010620122.6A CN111741006B (en) 2020-06-30 2020-06-30 Discrete acquisition gateway and implementation method thereof

Publications (2)

Publication Number Publication Date
CN111741006A CN111741006A (en) 2020-10-02
CN111741006B true CN111741006B (en) 2022-04-19

Family

ID=72654039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010620122.6A Active CN111741006B (en) 2020-06-30 2020-06-30 Discrete acquisition gateway and implementation method thereof

Country Status (1)

Country Link
CN (1) CN111741006B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261037B (en) * 2020-10-20 2023-05-30 上海挚想科技有限公司 Decoupling transmission method and system for separating communication layer from service layer
CN113992733B (en) * 2021-10-26 2024-07-26 云知声(上海)智能科技有限公司 Method, device, electronic equipment and medium for accessing edge gateway into Internet of things equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1715647A1 (en) * 2005-04-18 2006-10-25 Research In Motion Limited System and Method for Generic Data Mapping Between Wireless Component Applications and Application Data Sources
CN103684944A (en) * 2012-09-10 2014-03-26 西门子信号有限公司 Embedded gateway, railway monitoring system adopting gateway, and railway monitoring method
CN107390650A (en) * 2016-11-18 2017-11-24 厦门嵘拓物联科技有限公司 A kind of data collecting system based on Internet of Things and the data compression method based on the system
CN108683636A (en) * 2018-04-16 2018-10-19 武汉中原弘仁新能源科技有限公司 A kind of charging pile means of communication and system
CN109150703A (en) * 2018-08-23 2019-01-04 北方工业大学 Intelligent cloud gateway for industrial Internet of things and communication method thereof
CN111163147A (en) * 2019-12-24 2020-05-15 深圳供电局有限公司 Gateway device, multi-protocol data transmission method and computer device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111200808B (en) * 2020-01-10 2023-05-16 杭州涂鸦信息技术有限公司 Dual-protocol gateway data transmission method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1715647A1 (en) * 2005-04-18 2006-10-25 Research In Motion Limited System and Method for Generic Data Mapping Between Wireless Component Applications and Application Data Sources
CN103684944A (en) * 2012-09-10 2014-03-26 西门子信号有限公司 Embedded gateway, railway monitoring system adopting gateway, and railway monitoring method
CN107390650A (en) * 2016-11-18 2017-11-24 厦门嵘拓物联科技有限公司 A kind of data collecting system based on Internet of Things and the data compression method based on the system
CN108683636A (en) * 2018-04-16 2018-10-19 武汉中原弘仁新能源科技有限公司 A kind of charging pile means of communication and system
CN109150703A (en) * 2018-08-23 2019-01-04 北方工业大学 Intelligent cloud gateway for industrial Internet of things and communication method thereof
CN111163147A (en) * 2019-12-24 2020-05-15 深圳供电局有限公司 Gateway device, multi-protocol data transmission method and computer device

Also Published As

Publication number Publication date
CN111741006A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
EP3275162B1 (en) Systems and techniques for web communication
EP3288269B1 (en) Method and system for cloud storage of video, and method and system for previewing cloud-stored video
CN112187491B (en) Management method, device and equipment of server
US8769039B2 (en) Method and apparatus of performing remote computer file exchange
CN111741006B (en) Discrete acquisition gateway and implementation method thereof
US10841106B1 (en) Combined authentication and encryption
CN111628976A (en) Message processing method, device, equipment and medium
US20210281401A1 (en) Methods, systems, and computer readable media for utilizing predetermined encryption keys in a test simulation environment
JP2017169190A (en) System and method for secure communications between computer test tool and cloud-based server
CN112261062A (en) Internet of things security access method, gateway and system supporting multi-protocol conversion
CN111405039A (en) Data transparent transmission method, device and system, client and server
US8656013B2 (en) Real-time data monitoring based on data push
CN113472634B (en) Instant messaging method, device and system, storage medium and electronic device
CN114244556A (en) Protocol proxy method and device
EP3171565B1 (en) Methods, devices and system for netconf hello packets interaction
CN109787963A (en) Business handling method, apparatus, computer equipment and storage medium
US11196686B2 (en) Chatbot context setting using packet capture
CN114679265B (en) Flow acquisition method, device, electronic equipment and storage medium
CN109714337A (en) A kind of data encryption and transmission method and equipment
CN106961475A (en) A kind of remote disk sharing method and shared system based on NBD
EP3211861B1 (en) Electric power system
CN107342887B (en) Network equipment management method and cloud server
CN117596076B (en) Session data transmission method, system, device, equipment and storage medium
JP6471459B2 (en) COMMUNICATION DEVICE, LOG PROCESSING PROGRAM, COMMUNICATION SYSTEM, AND LOG PROCESSING METHOD
US20110009072A1 (en) Transmission apparatus, reception apparatus, transmission method, reception method, and program

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Discrete Acquisition Gateway and Its Implementation Method

Effective date of registration: 20230728

Granted publication date: 20220419

Pledgee: China Construction Bank Corporation Beijing Railway Professional Branch

Pledgor: ZHONGCHUAN SANYOU (BEIJING) TECHNOLOGY CO.,LTD.

Registration number: Y2023980050281