CN114827114A - Method and system for realizing data twinning of engineering machinery Internet of vehicles platform - Google Patents

Method and system for realizing data twinning of engineering machinery Internet of vehicles platform Download PDF

Info

Publication number
CN114827114A
CN114827114A CN202210429366.5A CN202210429366A CN114827114A CN 114827114 A CN114827114 A CN 114827114A CN 202210429366 A CN202210429366 A CN 202210429366A CN 114827114 A CN114827114 A CN 114827114A
Authority
CN
China
Prior art keywords
data
server
topic
web
request
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.)
Pending
Application number
CN202210429366.5A
Other languages
Chinese (zh)
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.)
LOVOL Engineering Machinery Group Co Ltd
Original Assignee
LOVOL Engineering Machinery Group 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 LOVOL Engineering Machinery Group Co Ltd filed Critical LOVOL Engineering Machinery Group Co Ltd
Priority to CN202210429366.5A priority Critical patent/CN114827114A/en
Publication of CN114827114A publication Critical patent/CN114827114A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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/141Setup of application sessions
    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of vehicle networking data twinning, and discloses a method and a system for realizing data twinning of an engineering machinery vehicle networking platform, which are applied to the engineering machinery vehicle networking platform and comprise the following steps: a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka; the terminal initiates a connection request to establish Socket connection with the gateway, and encrypted data is sent to the analysis module through the gateway; sending a corresponding data request to an analysis module based on a Topic server; when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic; and the server returns the Topic obtained and analyzed data to the Web end. By the method for realizing the twin data of the Internet of vehicles platform, network resources are greatly saved, real-time change can be realized on a Web end page, the granularity can be customized, and the problem of network resource occupation is avoided.

Description

Method and system for realizing data twinning of engineering machinery Internet of vehicles platform
Technical Field
The invention relates to the technical field of vehicle networking data twinning, in particular to a method and a system for realizing data twinning of an engineering machinery vehicle networking platform.
Background
At present, the economic development of China is realized, the number of automobiles is increased, and therefore the management of the automobiles is also more and more complicated. The internet of things is one of the internet of things, and generally, a user accesses a vehicle terminal into a network to collect and send vehicle operation data in order to facilitate vehicle management.
When the current engineering machinery Internet of vehicles industry carries out real-time data display, the HTTP request is used, and the webpage end sends the request regularly to acquire data in real time.
Therefore, how to provide a method for saving network resources while providing real-time data requests is a technical problem to be solved at present.
Disclosure of Invention
The embodiment of the invention provides a method and a system for realizing data twinning of an engineering machinery vehicle networking platform, which are used for solving the technical problems that the requirement on real-time performance cannot be met and a large amount of network resources are occupied when a webpage end sends a request regularly through an HTTP request to acquire data in real time in the prior art.
In some embodiments of the application, a Web Socket client is created on the Web side, a request is initiated to the server side through the Web Socket client, and after the request is allowed by the server side, the Web Socket client establishes Socket connection with the server side based on a three-way handshake mechanism. In the invention, the Socket connection is established between the Web end and the server end, so that the real-time performance of data can be effectively improved, the phenomenon of data delay is avoided, and the stable transmission of the data is ensured.
In some embodiments of the application, after a Web end and a server end successfully create a Socket connection, the server end creates and monitors a Topic at Kafka, each connection between the Web end and the server end is a Channel entity, the Channel is provided with a channelled primary key, and the server end stores the Channel entity and the channelled primary key in a connection pool and names the channelled primary key. In the invention, by creating the unique Topic, errors can be effectively avoided in the data transmission process, and one Topic corresponds to corresponding data, so that the data transmission efficiency can be effectively improved.
In some embodiments of the present application, a terminal initiates a connection request to establish Socket connection with a gateway, and sends encrypted data to an analysis module through the gateway; based on the Topic, the server side sends a corresponding data request to the analysis module; when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic; and the server returns the Topic obtained and analyzed data to the Web end. In the invention, the corresponding data analysis result is sent to the corresponding Topic, and the analysis data is sent to the Web end, so that the network resources can be effectively saved, the page of the Web end can be changed in real time, the granularity can be customized, and the problem of occupying the network resources is avoided.
In order to achieve the purpose, the invention provides a method for realizing data twin of an engineering machinery vehicle networking platform, which is applied to the engineering machinery vehicle networking platform, and comprises the following steps:
a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway, and encrypted data is sent to an analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic;
and the server returns the Topic obtained and analyzed data to the Web end.
In some embodiments of the present application, when a Web end initiates a connection request and establishes a Socket connection with a server end, the method specifically includes:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
In some embodiments of the present application, when creating and monitoring Topic by Kafka, the server specifically includes:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channeled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
In some embodiments of the present application, when sending the encrypted data to the parsing module through the gateway, the method specifically includes:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
In some embodiments of the present application, before the server returns Topic after acquiring the parsed data to the Web end, the method further includes:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
In some embodiments of the present application, a system for implementing data twinning of an engineering machinery internet of vehicles platform is disclosed, which is applied to the engineering machinery internet of vehicles platform, and the system includes:
the system comprises a creating module, a monitoring module and a sending module, wherein the creating module is used for initiating a connection request by a Web end to establish Socket connection with a server end, and simultaneously, the server end creates and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway;
the control module is used for sending the encrypted data to the analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
the processing module is used for analyzing the encrypted data and then sending the analyzed data to the Topic when the analysis module receives the data request;
and the server returns the Topic obtained and analyzed data to the Web end.
In some embodiments of the present application, when a Web end initiates a connection request and establishes a Socket connection with a server end, the method specifically includes:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
In some embodiments of the present application, when creating and monitoring Topic by Kafka, the server specifically includes:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channeled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
In some embodiments of the present application, when sending the encrypted data to the parsing module through the gateway, the method specifically includes:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
In some embodiments of the present application, before the server returns Topic after acquiring the parsed data to the Web end, the method further includes:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
The invention provides a method and a system for realizing data twinning of an engineering machinery vehicle networking platform, which have the following beneficial effects compared with the prior art:
the invention discloses a method and a system for realizing data twinning of an engineering machinery vehicle networking platform, which are applied to the engineering machinery vehicle networking platform and comprise the following steps: a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka; the terminal initiates a connection request to establish Socket connection with the gateway, and encrypted data is sent to the analysis module through the gateway; based on the Topic, the server side sends a corresponding data request to the analysis module; when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic; and the server returns the Topic obtained and analyzed data to the Web end. By the method for realizing the twin data of the Internet of vehicles platform, network resources are greatly saved, real-time change can be realized on a Web end page, the granularity can be customized, and the problem of network resource occupation is avoided.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a method for implementing data twinning of an engineering machinery Internet of vehicles platform according to an embodiment of the invention;
fig. 2 shows a schematic structural diagram of a data twin implementation system of a vehicle networking platform of a construction machine in an embodiment of the invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In the description of the present application, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present application and simplifying the description, but do not indicate or imply that the referred device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be construed as limiting the present application.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
Throughout the description of the present application, it is to be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
The following is a description of preferred embodiments of the present invention with reference to the accompanying drawings.
As shown in fig. 1, in an embodiment of the present invention, a method for implementing a data twin of an engineering machinery car networking platform is disclosed, which is applied to the engineering machinery car networking platform, and specifically includes:
a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway, and encrypted data is sent to an analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic;
and the server returns the Topic obtained and analyzed data to the Web end.
In some embodiments in the application, a request is initiated by a Web end to establish Socket connection with a server end, the server end dynamically creates a Topic in Kafka and names the Topic, the creation of the Topic is successful, the request is sent to an analysis module, the analysis module receives the request, obtains a corresponding Topic, sends a latest analysis result of the request to the corresponding Topic, the server end consumes corresponding data, and the encapsulated data is returned to a front-end page. According to the method and the device, the problems that in the prior art, the request initiated by the webpage end cannot meet the requirement of data real-time performance and occupies a large amount of network resources are effectively solved.
In some embodiments in the application, when a Web end initiates a connection request and establishes a Socket connection with a server end, the method specifically includes:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
In the application, when a Web terminal initiates a connection request, a background server terminal adopts a Netty framework, the Netty server terminal needs to be initialized, after the Netty server terminal is initialized and established, the server terminal is in a state of waiting for connection, a Web Socket client terminal is established at the Web terminal, then the Web Socket client terminal initiates a request to the server terminal, and after the request is allowed by the server terminal, the Web Socket client terminal establishes Socket connection with the server terminal based on a three-way handshake mechanism. The three-way handshake mechanism specifically includes: first handshake: when the connection is established, the client sends a SYN packet to the server, enters a SYN _ SENT state and waits for the server to confirm; second handshake: the server receives the SYN packet, must confirm the SYN of the client, and at the same time, it also sends a SYN packet, i.e. SYN + ACK packet, and at this time, the server enters into SYN _ RECV state. Third handshake: and the client receives the SYN + ACK packet of the server and sends an acknowledgement packet ACK to the server, and after the packet is sent, the client and the server are successfully connected to complete three-way handshake. The Socket connection is established between the Web end and the server end, so that the real-time performance of data can be effectively improved, the phenomenon of data delay is avoided, the stable transmission of the data is ensured, the safety performance of data transmission can be further improved by adopting the rule of three-way handshake, the efficient processing of the data is ensured, the efficiency of creating Topic is improved, the data is ensured to be processed in real time, and the problem of data delay is avoided.
In some embodiments in the application, when creating and monitoring Topic by Kafka, the server specifically includes:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channelled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
In the application, after the three-way handshake is successful, the Web end and the server end establish Socket connection, at the moment, each connection becomes a Channel, each Channel has a unique Channel main key, the server end stores the Channel and the Channel entity in a connection pool to prepare for later management and calling, and the server end uses AdminZkClient to create Topic and monitor. At this time, the channels and the channelds saved in the connection pool by the server are named in a mode of "function name-channeld", for example, "instrument- (32-bit random integer)", and at this time, the created name of Topic has uniqueness. In the application, by creating the Topic at the server and naming the created Topic, the situation of mismatching or mismatching can be effectively prevented during data transmission, the stability of data transmission is ensured, the data circulation mode is improved, and the management technology of dynamically creating the Topic and the Topic is realized.
In some embodiments of the present application, initiating a connection request at a terminal to establish Socket connection with a gateway, sending encrypted data to an analysis module through the gateway, and when sending the encrypted data to the analysis module through the gateway, specifically including:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the follow numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
In the application, after a Socket connection is successfully established between a terminal and a gateway, the terminal sends data to the gateway in real time, before the gateway transmits the data to an analysis module, the data to be transmitted in real time is encrypted, specifically, Base64 encoding is adopted for encryption during encryption, the data to be encrypted is obtained, Base64 encoding is adopted for the data to be encrypted to generate an encoding character string, a plurality of random numerical values are randomly generated, the random numerical values can be any numerical value between 4 and 60, no specific limitation is made again, 2 random numerical values can be generated, 3 random numerical values can also be generated, setting can be carried out according to actual needs, characters corresponding to the numerical values are obtained from a Base64 character string mapping table, the character string is formed, a first character corresponding to the first numerical value and a second numerical value corresponding to the second numerical value can be obtained here, or a third character corresponding to a third numerical value, and so on, without performing any example, the final encrypted data is generated according to the character string, and the gateway sends the encrypted data to the parsing module. In the application, the gateway carries out encryption processing on the data when transmitting the data to the analysis module, so that the safety of data transmission can be greatly improved, the data cannot be easily leaked in the transmission process, Socket connection is established between the terminal and the gateway, the data is transmitted in real time, the real-time performance of the data is further ensured, and the delayed transmission of the data is avoided.
In some embodiments of the present application, based on the Topic, the server sends a corresponding data request to the parsing module;
and when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic.
In the application, after the server successfully creates the Topic in Kafka, the server sends a corresponding data request to the parsing module, and when the parsing module receives the data request, the encrypted data transmitted by the gateway is parsed, and the parsed data is sent to the corresponding Topic, each Topic has corresponding data.
In some embodiments in this application, the returning, by the server, the Topic obtained after the obtaining of the parsed data to the Web end, and before returning, by the server, the Topic obtained after the obtaining of the parsed data to the Web end, further includes:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
In the application, when the Topic that acquires the data is returned to the Web end, the returned data needs to be encapsulated at the server end, specifically, the analytic data transmitted to the Topic is acquired, the acquired data is classified at the server end, the type of the data is determined, the corresponding encapsulation format is determined according to the type of the data, the data is converted into different data encapsulation packets according to the encapsulation format, and then the data encapsulation packets are encapsulated at the server end and returned to the Web end. In this application, carry out different data encapsulation according to the different grade type of data, the loss that can effectual less data encapsulates can hide each other between the data with data, can rationally control data effectively, has greatly promoted the security of data when transmitting.
As shown in fig. 2, in an embodiment of the present invention, a system for implementing a data twin of an engineering machinery car networking platform is disclosed, which is applied to the engineering machinery car networking platform, and specifically includes:
the system comprises a creating module, a monitoring module and a sending module, wherein the creating module is used for initiating a connection request by a Web end to establish Socket connection with a server end, and simultaneously, the server end creates and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway;
the control module is used for sending the encrypted data to the analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
and the processing module is used for analyzing the encrypted data and then sending the analyzed data to the Topic when the analysis module receives the data request.
In some embodiments in the application, a request is initiated by a Web end to establish Socket connection with a server end, the server end dynamically creates a Topic in Kafka and names the Topic, the creation of the Topic is successful, the request is sent to an analysis module, the analysis module receives the request, obtains a corresponding Topic, sends a latest analysis result of the request to the corresponding Topic, the server end consumes corresponding data, and the encapsulated data is returned to a front-end page. According to the method and the device, the problems that in the prior art, the request initiated by the webpage end cannot meet the requirement of data real-time performance and occupies a large amount of network resources are effectively solved.
In some embodiments in the application, when a Web end initiates a connection request to establish a Socket connection with a server end, the method specifically includes:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
In the application, when a Web terminal initiates a connection request, a background server terminal adopts a Netty framework, the Netty server terminal needs to be initialized, after the Netty server terminal is initialized and established, the server terminal is in a state of waiting for connection, a Web Socket client terminal is established at the Web terminal, then the Web Socket client terminal initiates a request to the server terminal, and after the request is allowed by the server terminal, the Web Socket client terminal establishes Socket connection with the server terminal based on a three-way handshake mechanism. The three-way handshake mechanism specifically includes: first handshake: when the connection is established, the client sends a SYN packet to the server, enters a SYN _ SENT state and waits for the server to confirm; second handshake: the server receives the SYN packet, must confirm the SYN of the client, and at the same time, it also sends a SYN packet, i.e. SYN + ACK packet, and at this time, the server enters into SYN _ RECV state. Third handshake: and the client receives the SYN + ACK packet of the server and sends an acknowledgement packet ACK to the server, and after the packet is sent, the client and the server are successfully connected to complete three-way handshake. The Socket connection is established between the Web end and the server end, so that the real-time performance of data can be effectively improved, the phenomenon of data delay is avoided, the stable transmission of the data is ensured, the safety performance of data transmission can be further improved by adopting the rule of three-way handshake, the efficient processing of the data is ensured, the efficiency of creating Topic is improved, the data is ensured to be processed in real time, and the problem of data delay is avoided.
In some embodiments in the application, when creating and monitoring Topic by Kafka, the server specifically includes:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channeled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
In the application, after the three-way handshake is successful, the Web end and the server end establish Socket connection, each connection becomes a Channel, each Channel has a unique Channel main key, the server end stores the Channel and the Channel entity in a connection pool to prepare for later management and calling, and the server end uses AdminZkClient to create and monitor Topic. At this time, the channels and the channelds saved in the connection pool by the server are named in a mode of "function name-channeld", for example, "instrument- (32-bit random integer)", and at this time, the created name of Topic has uniqueness. In the application, by creating the Topic at the server and naming the created Topic, a unique Topic can be created, so that errors can be effectively avoided in the data transmission process, one Topic corresponds to corresponding data, the data transmission efficiency can be effectively improved, the condition of mismatching or matching errors can be effectively prevented during data transmission, the data transmission stability is ensured, the data circulation mode is improved, and the dynamic creation of the Topic and the Topic management technology is realized.
In some embodiments of the present application, initiating a connection request at a terminal to establish Socket connection with a gateway, sending encrypted data to an analysis module through the gateway, and when sending the encrypted data to the analysis module through the gateway, specifically including:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
In the application, after a Socket connection is successfully established between a terminal and a gateway, the terminal sends data to the gateway in real time, before the gateway transmits the data to an analysis module, the data to be transmitted in real time is encrypted, specifically, Base64 encoding is adopted for encryption during encryption, the data to be encrypted is obtained, Base64 encoding is adopted for the data to be encrypted to generate an encoding character string, a plurality of random numerical values are randomly generated, the random numerical values can be any numerical value between 4 and 60, no specific limitation is made again, 2 random numerical values can be generated, 3 random numerical values can also be generated, setting can be carried out according to actual needs, characters corresponding to the numerical values are obtained from a Base64 character string mapping table, the character string is formed, a first character corresponding to the first numerical value and a second numerical value corresponding to the second numerical value can be obtained here, or a third character corresponding to a third numerical value, and so on, which are not illustrated herein, the gateway generates final encrypted data according to the character string, and sends the encrypted data to the parsing module. In the application, the gateway carries out encryption processing on the data when transmitting the data to the analysis module, so that the safety of data transmission can be greatly improved, the data cannot be easily leaked in the transmission process, Socket connection is established between the terminal and the gateway, the data is transmitted in real time, the real-time performance of the data is further ensured, and the delayed transmission of the data is avoided.
In some embodiments of the present application, based on the Topic, the server sends a corresponding data request to the parsing module;
and when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic.
In the application, after the server successfully creates the Topic in Kafka, the server sends a corresponding data request to the parsing module, and when the parsing module receives the data request, the encrypted data transmitted by the gateway is parsed, and the parsed data is sent to the corresponding Topic, each Topic has corresponding data.
In some embodiments in this application, the returning, by the server, the Topic obtained after the obtaining of the parsed data to the Web end, and before returning, by the server, the Topic obtained after the obtaining of the parsed data to the Web end, further includes:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
In the application, when the Topic that acquires the data is returned to the Web end, the returned data needs to be encapsulated at the server end, specifically, the analytic data transmitted to the Topic is acquired, the acquired data is classified at the server end, the type of the data is determined, the corresponding encapsulation format is determined according to the type of the data, the data is converted into different data encapsulation packets according to the encapsulation format, and then the data encapsulation packets are encapsulated at the server end and returned to the Web end. In this application, carry out different data encapsulation according to the different grade type of data, the loss that can effectual less data encapsulates can hide each other between the data with data, can rationally control data effectively, has greatly promoted the security of data when transmitting.
To sum up, the embodiment of the present invention provides a method and a system for implementing data twinning of an engineering machinery internet of vehicles platform, which is applied to the engineering machinery internet of vehicles platform, and includes: a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka; the terminal initiates a connection request to establish Socket connection with the gateway, and encrypted data is sent to the analysis module through the gateway; sending a corresponding data request to an analysis module based on a Topic server; when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic; and the server returns the Topic obtained and analyzed data to the Web end. By the method for realizing the twin data of the Internet of vehicles platform, network resources are greatly saved, real-time change can be realized on a Web end page, the granularity can be customized, and the problem of network resource occupation is avoided.
According to the first concept of the application, a Web Socket client is established on a Web end, a request is sent to a server end through the Web Socket client, and after the request is allowed by the server end, the Web Socket client establishes Socket connection with the server end on the basis of a three-way handshake mechanism. In the invention, the Socket connection is established between the Web end and the server end, so that the real-time performance of data can be effectively improved, the phenomenon of data delay is avoided, and the stable transmission of the data is ensured.
According to the second concept of the application, after the Web end and the server end successfully establish Socket connection, the server end establishes Topic at Kafka and monitors, each connection between the Web end and the server end is a Channel entity, the Channel is provided with a channelled main key, the server end stores the Channel entity and the channelled main key in a connection pool, and names the channelled main key. In the invention, by creating the Topic at the server and naming the created Topic, the data can be effectively ensured not to have errors in the transmission process by creating the unique Topic, one Topic corresponds to the corresponding data, the data transmission efficiency can be effectively improved, the data can be effectively ensured not to have errors in the transmission process by creating the unique Topic, one Topic corresponds to the corresponding data, and the data transmission efficiency can be effectively improved.
According to a third concept of the application, a terminal initiates a connection request to establish Socket connection with a gateway, and encrypted data is sent to an analysis module through the gateway; based on the Topic, the server side sends a corresponding data request to the analysis module; when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic; and the server returns the Topic obtained and analyzed data to the Web end. In the invention, the corresponding data analysis result is sent to the corresponding Topic, and the analysis data is sent to the Web end, so that the network resources can be effectively saved, the page of the Web end can be changed in real time, the granularity can be customized, and the problem of occupying the network resources is avoided.
In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
While the invention has been described with reference to an embodiment, various modifications may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In particular, the various features of the disclosed embodiments of the invention can be used in any combination with one another as long as there is no structural conflict, and nothing in this specification should be taken as a complete description of such combinations for the sake of brevity and resource savings. Therefore, it is intended that the invention not be limited to the particular embodiments disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.
Those of ordinary skill in the art will understand that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described above, or equivalents may be substituted for elements thereof. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for realizing data twinning of an engineering machinery vehicle networking platform is applied to the engineering machinery vehicle networking platform, and comprises the following steps:
a Web terminal initiates a connection request to establish Socket connection with a server terminal, and the server terminal establishes and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway, and encrypted data is sent to an analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
when receiving the data request, the analysis module analyzes the encrypted data and then sends the encrypted data to the Topic;
and the server returns the Topic obtained and analyzed data to the Web end.
2. The method for achieving the data twin of the engineering machinery internet of vehicles platform according to claim 1, wherein when a Web end initiates a connection request and establishes Socket connection with a server end, the method specifically comprises the following steps:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
3. The method for realizing data twinning of the engineering machinery vehicle networking platform according to claim 1, wherein when Kafka creates Topic and monitors, the server specifically comprises:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channeled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
4. The method for achieving the data twin of the engineering machinery internet of vehicles platform according to claim 1, wherein when the gateway sends the encrypted data to the analysis module, the method specifically comprises the following steps:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
5. The method for realizing data twinning of the engineering machinery internet of vehicles platform as claimed in claim 1, wherein before the server returns Topic after acquiring the parsed data to the Web, the method further comprises:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
6. The utility model provides an implementation system of data twin of engineering machine car networking platform which characterized in that, is applied to in the engineering machine car networking platform, the system includes:
the system comprises a creating module, a monitoring module and a sending module, wherein the creating module is used for initiating a connection request by a Web end to establish Socket connection with a server end, and simultaneously, the server end creates and monitors Topic in Kafka;
a terminal initiates a connection request to establish Socket connection with a gateway;
the control module is used for sending the encrypted data to the analysis module through the gateway;
based on the Topic, the server side sends a corresponding data request to the analysis module;
the processing module is used for analyzing the encrypted data and then sending the analyzed data to the Topic when the analysis module receives the data request;
and the server returns the Topic obtained and analyzed data to the Web end.
7. The system for realizing data twins of the engineering machinery vehicle networking platform according to claim 6, wherein when the Web terminal initiates the connection request and establishes Socket connection with the server terminal, the system specifically comprises:
establishing a Web Socket client at the Web end;
and initiating a request to the server through the Web Socket client, wherein after the request is allowed by the server, the Web Socket client establishes Socket connection with the server based on a three-way handshake mechanism.
8. The system for realizing data twinning of the engineering machinery vehicle networking platform as claimed in claim 6, wherein when Kafka creates Topic and listens, the server specifically comprises:
acquiring Socket connection established between a Web end and a server end;
the Socket connection is a Channel entity, and the Channel is provided with a channeled main key;
and the server stores the Channel entity and the channeled key in a connection pool and names the channeled key.
9. The system for realizing data twinning of the engineering machinery vehicle networking platform according to claim 6, wherein when the gateway sends the encrypted data to the analysis module, the system specifically comprises:
acquiring data to be encrypted;
carrying out Base64 coding on the encrypted data to produce a coded character string, and randomly generating a plurality of random numerical values;
acquiring characters corresponding to the follow numerical values from a Base64 character string mapping table, and forming a character string;
and generating final encrypted data according to the character string, and sending the encrypted data to the analysis module by the gateway.
10. The system for implementing data twinning of engineering machinery vehicle networking platform according to claim 6, further comprising, before the server returns Topic after acquiring the parsed data to the Web end:
determining parsed data transmitted to the Topic;
the server classifies according to the analysis data and determines the data type of the analysis data;
determining a packaging format corresponding to the analysis data according to the data type, and converting the analysis data into a corresponding data packaging packet according to the packaging format;
and the server encapsulates the data encapsulation packet and returns the encapsulated data encapsulation packet to the Web end.
CN202210429366.5A 2022-04-22 2022-04-22 Method and system for realizing data twinning of engineering machinery Internet of vehicles platform Pending CN114827114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210429366.5A CN114827114A (en) 2022-04-22 2022-04-22 Method and system for realizing data twinning of engineering machinery Internet of vehicles platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210429366.5A CN114827114A (en) 2022-04-22 2022-04-22 Method and system for realizing data twinning of engineering machinery Internet of vehicles platform

Publications (1)

Publication Number Publication Date
CN114827114A true CN114827114A (en) 2022-07-29

Family

ID=82504634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210429366.5A Pending CN114827114A (en) 2022-04-22 2022-04-22 Method and system for realizing data twinning of engineering machinery Internet of vehicles platform

Country Status (1)

Country Link
CN (1) CN114827114A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767790A (en) * 2015-02-14 2015-07-08 成都我来啦网格信息技术有限公司 Management method based on intelligent locker user behavior data
CN106375083A (en) * 2016-09-30 2017-02-01 广东网金控股股份有限公司 Encryption-decryption method based on Base64 and device thereof
CN106656751A (en) * 2016-12-05 2017-05-10 北京中交兴路信息科技有限公司 Data communication method and device
WO2019028673A1 (en) * 2017-08-08 2019-02-14 深圳先进技术研究院 B/s architecture-based data communication system and method, web server, and monitoring system
CN109743369A (en) * 2018-12-24 2019-05-10 武汉长江通信智联技术有限公司 A kind of processing unit, the method and system of the real time data based on car networking
CN111949302A (en) * 2020-09-18 2020-11-17 苏州浪潮智能科技有限公司 Method, system and equipment for updating instantaneity of industrial computer management system
CN112187811A (en) * 2020-09-30 2021-01-05 湖南快乐阳光互动娱乐传媒有限公司 App login method and system
CN113347270A (en) * 2021-06-25 2021-09-03 中国银行股份有限公司 Method and device for preventing horizontal unauthorized network transmission file
CN114095537A (en) * 2021-11-18 2022-02-25 重庆邮电大学 Netty-based mass data access method and system in application of Internet of things

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767790A (en) * 2015-02-14 2015-07-08 成都我来啦网格信息技术有限公司 Management method based on intelligent locker user behavior data
CN106375083A (en) * 2016-09-30 2017-02-01 广东网金控股股份有限公司 Encryption-decryption method based on Base64 and device thereof
CN106656751A (en) * 2016-12-05 2017-05-10 北京中交兴路信息科技有限公司 Data communication method and device
WO2019028673A1 (en) * 2017-08-08 2019-02-14 深圳先进技术研究院 B/s architecture-based data communication system and method, web server, and monitoring system
CN109743369A (en) * 2018-12-24 2019-05-10 武汉长江通信智联技术有限公司 A kind of processing unit, the method and system of the real time data based on car networking
CN111949302A (en) * 2020-09-18 2020-11-17 苏州浪潮智能科技有限公司 Method, system and equipment for updating instantaneity of industrial computer management system
CN112187811A (en) * 2020-09-30 2021-01-05 湖南快乐阳光互动娱乐传媒有限公司 App login method and system
CN113347270A (en) * 2021-06-25 2021-09-03 中国银行股份有限公司 Method and device for preventing horizontal unauthorized network transmission file
CN114095537A (en) * 2021-11-18 2022-02-25 重庆邮电大学 Netty-based mass data access method and system in application of Internet of things

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
张博;: "基于Storm的车辆实时展示系统", 电脑知识与技术, no. 31 *
张春风;申飞;张俊;陈杰;刘静;: "基于Storm的车联网数据实时分析系统", 计算机系统应用, no. 03 *
王鹃,张焕国: "主流操作系统安全实验教程", 30 November 2016, 武汉大学出版社, pages: 22 - 24 *
胡俊辉: "基于Netty的电力巡检系统消息平台设计与实现", 中国优秀硕士学位论文全文数据库(电子期刊), no. 4, pages 1 - 70 *
贾凡;熊刚;朱凤华;田滨;韩双双;陈世超;: "基于MQTT的工业物联网通信系统研究与实现", 智能科学与技术学报, no. 03 *
陈纯纯;: "基于Netty+WebSocket的社区增值服务平台的推送设计", 物联网技术, no. 12 *

Similar Documents

Publication Publication Date Title
EP3893436B1 (en) Coap-based opc ua message transmission method, and server
CN110022289B (en) Data transmission method, device and system
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN106034084B (en) Data transmission method and device
CN109889454A (en) A kind of the message driving means and method of micro services framework
CN103401946B (en) HTTP uploads accelerated method and system
CN1484926A (en) A method of invoking privacy
CN103108037B (en) A kind of communication means, Web server and Web communication system
EP2627056A1 (en) Method, gateway, proxy and system for implementing mobile internet services
CN104994079A (en) Access request processing method, access request processing device and acceleration server
EP3011698A1 (en) Cross-layer and cross-application acknowledgment for data transmission
CN110769009B (en) User identity authentication method and system
EP2913977A2 (en) Resource information acquisition method, system and device for internet of things terminal device
CN102143177A (en) Portal authentication method, Portal authentication device,Portal authentication equipment and Portal authentication system
WO2011150758A1 (en) Method and device for reporting and obtaining the capability of the machine type communication apparatus
WO2010133097A1 (en) Data sharing method, server and data sharing system for widget system
CN102868613A (en) Method and device for transmission of generic routing encapsulation tunnel packet
EP3836619B1 (en) Direct connection communication method, access control and mobility management function entity and terminal
CN113259418A (en) Method, apparatus and computer-readable storage medium for transmitting data
CN114827114A (en) Method and system for realizing data twinning of engineering machinery Internet of vehicles platform
CN110958291B (en) Industrial vehicle data transmission system and method
CN113132477A (en) Real-time transmission interaction method and system for browser terminal and equipment
CN112653716B (en) Service binding method and device
CN108924773B (en) Message processing method and device
CN111431894A (en) Method for implementing general service protocol in transparent access frame

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
CB02 Change of applicant information

Address after: 266500 No. 75 East Huanghe Road, Huangdao District, Qingdao City, Shandong Province

Applicant after: Lovol Heavy Industry Group Co.,Ltd.

Address before: 266500 No. 75 East Huanghe Road, Huangdao District, Qingdao City, Shandong Province

Applicant before: LOVOL Engineering Machinery Group Co.,Ltd.

CB02 Change of applicant information