CN110581847A - Input foreknowledge system - Google Patents

Input foreknowledge system Download PDF

Info

Publication number
CN110581847A
CN110581847A CN201910792924.2A CN201910792924A CN110581847A CN 110581847 A CN110581847 A CN 110581847A CN 201910792924 A CN201910792924 A CN 201910792924A CN 110581847 A CN110581847 A CN 110581847A
Authority
CN
China
Prior art keywords
terminal
data
information
encrypted data
server
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
CN201910792924.2A
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.)
Hangzhou Zhongyun Data Technology Co Ltd
Huzhou Big Data Operation Co Ltd
Hangzhou City Big Data Operation Co Ltd
Original Assignee
Hangzhou Zhongyun Data Technology Co Ltd
Huzhou Big Data Operation Co Ltd
Hangzhou City Big Data Operation 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 Hangzhou Zhongyun Data Technology Co Ltd, Huzhou Big Data Operation Co Ltd, Hangzhou City Big Data Operation Co Ltd filed Critical Hangzhou Zhongyun Data Technology Co Ltd
Priority to CN201910792924.2A priority Critical patent/CN110581847A/en
Publication of CN110581847A publication Critical patent/CN110581847A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04L63/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1466Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention is suitable for the technical field of data processing, and provides an input prediction system, which comprises a first terminal, a second terminal and a third terminal, wherein the first terminal is used for receiving a data transmission request of a user; encrypting data information to be transmitted through a public key to obtain encrypted data; sending the encrypted data to a server by using Netty as a basic communication framework through a Websocket protocol of TCP and HTTP; the server is used for creating a long connection relation between the first terminal and the second terminal; when the address information of the first terminal passes the verification, receiving encrypted data sent by the first terminal; when the address information of the second terminal passes the verification, the encrypted data is sent to the second terminal based on a Websocket protocol of TCP and HTTP; the second terminal is used for decrypting the encrypted data according to the private key; the data can be safely transmitted to the second terminal, the real-time performance is high, the server side resource is not consumed, and the input prediction is realized.

Description

input foreknowledge system
Technical Field
the invention belongs to the technical field of data processing, and particularly relates to an input prediction system.
Background
The input forecasting technology is realized aiming at the communication scene of a consumer and a server, can be used at multiple ends in a cross-platform mode, has strong migration capability, and provides a service with better quality and quantity guarantee for the consumer who wants to know a product.
however, the current input prediction platform generally adopts HTTP transmission processing, which results in insecurity of data and poor real-time performance, that is, the content that the current consumer wants to say, or is very plain, or wants to delete at any time cannot be safely transmitted to the server in real time, and especially when the network is disturbed or delayed, hacking intrusion cannot be prevented from being performed to capture packets and analyze, which results in interception and leakage of information, and inevitable loss to both the consumer and the server will be caused.
Therefore, the existing input foreknowledge platform has no guarantee on data transmission safety, poor real-time performance and poor experience effect of consumers.
Disclosure of Invention
the embodiment of the invention aims to provide an input forecasting system, and aims to solve the problems that an existing input forecasting platform is not guaranteed in terms of data transmission safety, poor in instantaneity and poor in consumer experience effect.
the embodiment of the invention is realized in such a way that an input prediction system comprises a server, a first terminal and a second terminal, wherein the first terminal and the second terminal are communicated with the server;
The first terminal is used for receiving a data transmission request of a user, wherein the data transmission request carries data information to be transmitted and second terminal identification information; sending the second terminal identification information to a server; encrypting data information to be transmitted through a public key to obtain encrypted data; sending the encrypted data to a server side by taking Netty as a basic communication framework through a Websocket protocol of TCP and HTTP;
The server is used for receiving second terminal identification information sent by the first terminal; creating a long connection relation between the first terminal and the second terminal according to the second terminal identification information; when the address information of the first terminal passes the verification, receiving encrypted data sent by the first terminal; when the address information of the second terminal passes through verification, the encrypted data is sent to the second terminal based on a Websocket protocol of TCP and HTTP;
The second terminal is used for receiving the encrypted data sent by the server; and decrypting the encrypted data according to a private key.
The input foreknowledge system provided by the embodiment of the invention adopts a Websocket protocol of TCP and HTTP, takes netty as a basic communication framework, carries out encryption processing on data information to be transmitted by a first terminal through a public key, simultaneously verifies whether address information spoofing exists between the two sides by a server, and carries out handshake processing so as to forward the obtained encrypted data to a second terminal through the server, and decrypts the encrypted data by a private key by the second terminal; on the other hand, the data is safely transmitted to the second terminal, the real-time performance is high, hackers are effectively prevented from invading to capture packets and analyze the packets, and the damage and loss caused by stealing the data are avoided.
drawings
Fig. 1 is a schematic structural diagram of an input prediction system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a first terminal according to a first embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a second terminal according to a first embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an input prediction system according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of an input prediction system according to a third embodiment of the present invention;
Fig. 7 is a schematic structural diagram of an input prediction system according to a fourth embodiment of the present invention;
Fig. 8 is a schematic structural diagram of an input prediction system according to a fifth embodiment of the present invention.
Detailed Description
in order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
the terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, etc. may be used to describe various information in embodiments of the present invention, the information should not be limited by these terms. These terms are only used to distinguish one type of information from another.
the input foreknowledge system provided by the embodiment of the invention adopts a Websocket protocol of TCP and HTTP, takes netty as a basic communication framework, carries out encryption processing on data information to be transmitted by a first terminal through a public key, simultaneously verifies whether address information spoofing exists between the two sides by a server, and carries out handshake processing so as to forward the obtained encrypted data to a second terminal through the server, and decrypts the encrypted data by a private key by the second terminal; on the other hand, the data is safely transmitted to the second terminal, the real-time performance is high, hackers are effectively prevented from invading to capture packets and analyze the packets, and the damage and loss caused by stealing the data are avoided.
To further explain the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, features and effects according to the present invention will be given with reference to the accompanying drawings and preferred embodiments.
Fig. 1 is a schematic structural diagram of an input prediction system according to a first embodiment of the present invention, and for convenience of description, only the portions related to the first embodiment of the present invention are shown.
In the embodiment of the present invention, the input prediction system includes a server 101, and a first terminal 102 and a second terminal 103 that communicate with the server 101.
the first terminal 102 is configured to receive a data transmission request of a user, where the data transmission request carries information of data to be transmitted and second terminal identification information; sending the second terminal identification information to a server; encrypting data information to be transmitted through a public key to obtain encrypted data; and sending the encrypted data to a server by taking Netty as a basic communication framework through a Websocket protocol of TCP and HTTP.
In the embodiment of the present invention, TCP (Transmission Control Protocol) is a connection-oriented, reliable transport layer communication Protocol, and is defined by RFC793 of IETF. In the simplified OSI model of computer networks, which performs the functions specified by the transport layer four, the User Datagram Protocol (UDP) is another important transport protocol within the same layer. In the internet protocol suite (TCP), the TCP layer is an intermediate layer located above the IP layer and below the application layer. Reliable, pipe-like connections are often required between the application layers of different hosts, but the IP layer does not provide such a flow mechanism, but rather provides unreliable packet switching.
in the embodiment of the invention, the first terminal carries out HTTP request service end to obtain cookie through IP address plus channel (parameters like PC or h5 parameter, chat window Id, etc.), then carries out HTTP request or creates Websocket connection by carrying cookie, and carries out HTTP request by carrying cookie to obtain public key.
In the embodiment of the invention, the specific implementation process of encrypting the data information to be transmitted by the public key to obtain the encrypted data comprises the following steps:
Wherein the Key factory is used to convert keys (Key-type opaque encryption keys) into Key specifications (transparent representation of the underlying Key material); the KEY _ ALGORITHM identifies the RSA asymmetric encryption identification.
In the embodiment of the invention, the Netty is used as a basic communication framework, the encrypted data is sent to the server through a Websocket protocol of TCP and HTTP, specifically, the Netty is used as the basic communication framework, the authenticated HTTP requests the server to handshake, then TCP connection is established with the server through the Websocket protocol, and the first terminal and the server are kept in communication through heartbeat.
in the embodiment of the present invention, the data information to be transmitted refers to information obtained by processing data such as various letter and number symbol combinations, voices, graphics, and images in a computer system, and may be picture information, text information, audio information, video information, and voice information, which are not limited specifically.
In the embodiment of the present invention, the second terminal identification information refers to specific information that is specific to a second terminal, and the information must be specifically associated with a certain second terminal, that is, the terminal identification information of specific received data can be determined, and may be physical address information, an ID identification number, or a specific identification code that is set manually, and the information may be specifically set according to an actual situation, and is not limited herein.
In practical application, the first terminal is often in a role of a user (customer) end, and when a customer needs to consult product information with a service provider (customer service), data information to be transmitted is usually entered in a dialog box form, and the dialog box is designated and the second terminal is designated at the same time, so that the determination of the second terminal can be determined by selecting the dialog box with identification information besides the identification information such as the physical address information, the ID identification number or the manually set specific identification code of the second terminal, that is, the terminal where the customer service is located in the dialog box is the second terminal.
The server 101 is configured to receive second terminal identification information sent by the first terminal; creating a long connection relation between the first terminal and the second terminal according to the second terminal identification information; when the address information of the first terminal passes the verification, receiving encrypted data sent by the first terminal; and when the address information of the second terminal passes the verification, sending the encrypted data to the second terminal based on a Websocket protocol of TCP and HTTP.
In the embodiment of the invention, the WebSocket protocol needs to be connected through handshake, and similar to TCP, the WebSocket protocol also needs to be connected through handshake between a client and a server, and the WebSocket protocol can communicate with each other only after the connection is successful.
In the embodiment of the invention, the first terminal and the second terminal can consume a certain number of handles and memory resources after the connection is successfully established, and the server side consumes the first terminal resources instead of the server side resources as forwarding due to the interaction of the first terminal and the second terminal, thereby realizing input foreknowledge.
In the embodiment of the present invention, the process of the server verifying the address information of the first terminal and the second terminal respectively is specifically that first, parameters such as token generation and the like that the second terminal needs to log in and register are put into a cookie, and the first terminal needs to provide a specified IP and chat window ID (which is provided by the server) and generate a token and the like that are put into a cookie.
the authentication section is a responder for creating a Session by creating a uid (user ID), getting to the client IP, the tenant ID, and data including a random number. Token is acquired by the responder, and then key and vlue (Token) data of the responder and the cookie of the responder are stored in the http request by the cookie tool, wherein some parameters are checked and log is printed.
Authentication part code:
The analysis authentication means that a http request is passed, a header of http carries cookie information, data is taken through a key and a value of the cookie, the cookie is analyzed by using a JWT method, time and other authentication information, such as information of uid (user ID) and the like, are taken, and parameter verification is carried out.
Analyzing the authentication code:
The second terminal 103 is configured to receive encrypted data sent by the server; and decrypting the encrypted data according to a private key.
in the embodiment of the invention, the second terminal (login and registration) carries out http request to obtain the cookie, carries out http request or websocket connection creation by carrying the cookie, carries out http request by carrying the cookie, and obtains the private key.
Wherein the cookie has the token and parameters required by the second terminal. The server analyzes the cookie, and meanwhile, the cookie has effective time which is generally about 10 minutes. The desired JWT Token is obtained for verification.
In the embodiment of the present invention, the specific process of decrypting the encrypted data according to the private key is as follows: 1. firstly, the private key is verified by a method of encoding a key specification through PKCS 8; 2. the Key factory is used to convert keys (Key-type opaque encryption keys) into Key specifications (transparent representation of the underlying Key material); 3. the KEY _ ALGORITHM mark RSA asymmetric encryption mark; 4. obtaining a private key through a key factory; 5. DECRYPT _ MODE is used to initialize Cipher to a constant for decryption MODE; 6. in order to create a Cipher object, the application program calls the getInstance method of Cipher and transmits the name of the requested conversion to the Cipher; 7. dofinal's method handles decryption or encryption operations.
the decryption code is as follows:
In the embodiment of the invention, the server can actively push information to the first terminal, thereby solving the problem of synchronization delay caused by polling. The WebSocket only needs one HTTP handshake, and the server can keep communication with the first terminal until the connection is closed, so that the problem that the server needs to repeatedly analyze an HTTP protocol is solved, and the resource overhead is reduced. In addition, the StringBuffer adopted by Websocket receives parameters faster than a general HTTP request, receives and processes data.
The input foreknowledge system provided by the embodiment of the invention adopts a Websocket protocol of TCP and HTTP, takes netty as a basic communication framework, carries out encryption processing on data information to be transmitted by a first terminal through a public key, simultaneously verifies whether address information spoofing exists between the two sides by a server, and carries out handshake processing so as to forward the obtained encrypted data to a second terminal through the server, and decrypts the encrypted data by a private key by the second terminal; on the other hand, the data is safely transmitted to the second terminal, the real-time performance is high, hackers are effectively prevented from invading to capture packets and analyze the packets, and the damage and loss caused by stealing the data are avoided.
Fig. 2 is a schematic structural diagram of a first terminal according to a first embodiment of the present invention, and for convenience of description, only a portion related to the first terminal is shown.
In this embodiment of the present invention, the first terminal 102 specifically includes a first receiving unit 201, a first sending unit 202, an encrypting unit 203, and a second sending unit 204.
A first receiving unit 201, configured to receive a data transmission request of a user, where the data transmission request carries to-be-transmitted data information and second terminal identification information.
In the embodiment of the present invention, the data information to be transmitted refers to information obtained by processing data such as various letter and number symbol combinations, voices, graphics, and images in a computer system, and may be picture information, text information, audio information, video information, and voice information, which are not limited specifically.
In the embodiment of the present invention, the second terminal identification information refers to specific information that is specific to a second terminal, and the information must be specifically associated with a certain second terminal, that is, the terminal identification information of specific received data can be determined, and may be physical address information, an ID identification number, or a specific identification code that is set manually, and the information may be specifically set according to an actual situation, and is not limited herein.
In practical application, the first terminal is often in a role of a user (customer) end, and when a customer needs to consult product information with a service provider (customer service), data information to be transmitted is usually entered in a dialog box form, and the dialog box is designated and the second terminal is designated at the same time, so that the determination of the second terminal can be determined by selecting the dialog box with identification information besides the identification information such as the physical address information, the ID identification number or the manually set specific identification code of the second terminal, that is, the terminal where the customer service is located in the dialog box is the second terminal.
A first sending unit 202, configured to send the second terminal identification information to a server.
In the embodiment of the present invention, the purpose of sending the second terminal identification information to the server is to enable the server to determine the second terminal according to the second terminal identification information, so as to establish a long connection relationship between the first terminal and the second terminal.
and the encryption unit 203 is configured to encrypt the data information to be transmitted through a public key to obtain encrypted data.
In the embodiment of the invention, the encryption unit carries out HTTP request service end to obtain cookie through IP address plus channel (parameters like PC or h5 parameter, chat window Id, etc.), then carries out HTTP request or creates Websocket connection by carrying cookie, and carries out HTTP request by carrying cookie to obtain public key.
And the second sending unit 204 is configured to send the encrypted data to the server through a Websocket protocol of TCP and HTTP with Netty as a basic communication framework.
In the embodiment of the invention, the Netty is used as a basic communication framework, the encrypted data is sent to the server through a Websocket protocol of TCP and HTTP, specifically, the Netty is used as the basic communication framework, the authenticated HTTP requests the server to handshake, then TCP connection is established with the server through the Websocket protocol, and the first terminal and the server are kept in communication through heartbeat.
Fig. 3 is a schematic structural diagram of a server according to a first embodiment of the present invention, and for convenience of description, only the portions related to the first embodiment of the present invention are shown.
In this embodiment of the present invention, the server 101 specifically includes a second receiving unit 301, a connection establishing unit 302, a third receiving unit 303, and a third sending unit 304.
a second receiving unit 301, receiving the second terminal identification information sent by the first terminal.
In the embodiment of the present invention, the second terminal identification information refers to specific information that is specific to a second terminal, and the information must be specifically associated with a certain second terminal, that is, the terminal identification information of specific received data can be determined, and may be physical address information, an ID identification number, or a specific identification code that is set manually, and the information may be specifically set according to an actual situation, and is not limited herein.
The connection establishing unit 302 is configured to create a long connection relationship between the first terminal and the second terminal according to the second terminal identification information.
In the embodiment of the present invention, the long connection relationship means that after the handshake is successful, the connection may not be immediately disconnected, and data transmission and heartbeat interaction are performed on the connection until the first terminal (client), the second terminal (client) and any one of the servers are actively disconnected.
A third receiving unit 303, configured to receive the encrypted data sent by the first terminal when it is verified that the address information of the first terminal passes.
a third sending unit 304, configured to send the encrypted data to the second terminal based on a Websocket protocol of TCP and HTTP when it is verified that the address information of the second terminal passes.
In the embodiment of the present invention, the process of the server verifying the address information of the first terminal and the second terminal respectively is specifically that first, parameters such as token generation and the like that the second terminal needs to log in and register are put into a cookie, and the first terminal needs to provide a specified IP and chat window ID (which is provided by the server) and generate a token and the like that are put into a cookie.
fig. 4 is a schematic structural diagram of a server according to a first embodiment of the present invention, and for convenience of description, only the portions related to the first embodiment of the present invention are shown.
In this embodiment of the present invention, the second terminal 103 specifically includes a second receiving unit 401 and a decrypting unit 402.
A second receiving unit 401, configured to receive the encrypted data sent by the server.
A decryption unit 402, configured to decrypt the encrypted data according to a private key.
In the embodiment of the invention, the second terminal (login and registration) carries out http request to obtain the cookie, carries out http request or websocket connection creation by carrying the cookie, carries out http request by carrying the cookie, and obtains the private key.
wherein the cookie has the token and parameters required by the second terminal. The server analyzes the cookie, and meanwhile, the cookie has effective time which is generally about 10 minutes. The desired JWT Token is obtained for verification.
Fig. 5 is a schematic structural diagram of an input prediction system according to a second embodiment of the present invention, which is similar to the first embodiment except that for convenience of description, only the parts related to the second embodiment of the present invention are shown:
in this embodiment of the present invention, the first receiving unit 201 specifically includes a page output module 501 and an information receiving module 502.
and the page output module 501 is configured to output a second terminal identification information input page to the user in response to a data information entry operation to be transmitted of the user.
In the embodiment of the present invention, the second terminal identification information input page may be a text box, a selection box, or other forms, for example, when a transmission request of data (such as characters, video, audio, images, and the like) is received, the text box is provided to a user, so that specified second terminal identification information may be entered through the text box, or the selection box carrying a plurality of pieces of second terminal identification information is provided to the user, and the receiving device identification information on the selection box may be provided by a server or may be preset by the user.
An information receiving module 502, configured to receive at least one piece of second terminal identification information input by the user through the second terminal identification information input page.
In the embodiment of the present invention, the second terminal identification information is closely associated with the specific terminal, one piece of second terminal identification information corresponds to a unique terminal, and may be a physical address of the second terminal, where the physical address refers to an actual address corresponding to a storage unit in a network card physical address memory, such as "EC-A8-6B-D5-EA-C7"; an IP address such as "192.168.30.103"; or information such as a gateway address, a subnet mask, an ID account, etc., which is specifically determined according to the user requirement, and is not specifically limited herein.
The input forecasting system provided by the embodiment of the invention outputs the second terminal identification information input page to the user by responding to the data information input operation to be transmitted of the user; and receiving at least one second terminal identification information input by a user through the second terminal identification information input page, thereby greatly improving the pertinence and the flexible selectivity of the input prediction system and improving the safety of data transmission.
fig. 6 is a schematic structural diagram of an input prediction system according to a third embodiment of the present invention, which is similar to the first embodiment except that for convenience of description, only the parts related to the third embodiment of the present invention are shown:
in this embodiment of the present invention, the encryption unit 203 specifically includes a conversion module 601 and an encryption module 602.
The conversion module 601 is configured to perform compression processing on data information to be transmitted, and convert the data information into a byte data stream.
The encryption module 602 is configured to encrypt the byte data stream through a public key to obtain encrypted data.
The input prediction system provided by the embodiment of the invention performs compression processing on data information to be transmitted, converts the data information into byte data streams, and encrypts the byte data streams through a public key to obtain encrypted data; not only occupies less computer resources, but also provides safer service.
Fig. 7 is a schematic structural diagram of an input prediction system according to a fourth embodiment of the present invention, which is similar to the first embodiment except that for convenience of description, only the parts related to the first embodiment of the present invention are shown:
In this embodiment of the present invention, the third receiving unit 303 specifically includes a first protocol downgrading module 701 and a data receiving module 702.
the first protocol demotion module 701 is configured to support a Websocket protocol demotion process of TCP and HTTP when it is detected that there is a delay verification on the address information of the first terminal.
In the embodiment of the invention, if the network has delay verification and simultaneously supports protocol degradation processing, specifically, if a browser with poor WebSocket support is subjected to IE11 or the like or http handshake is unsuccessful, the first terminal performs degradation processing and requests in an http polling mode. The first terminal can adopt Sockjs and Sockjs to preferentially use native WebSocket, and if the first terminal is in a browser which does not support webSocket, the first terminal can automatically reduce the mode to a polling mode.
The method comprises the steps of obtaining an available transmission list, sending a request, obtaining certain information, such as whether a server supports a websocket, and calculating the coming and returning time of communication between a client and a server.
And establishing a real connection, traversing the transport supported by the transmission list queue once, and preferentially taking the transport at the head of the queue, or continuously taking the transport backwards as a degradation scheme.
A data receiving module 702, configured to receive encrypted data sent by the first terminal when it is verified that the address information of the first terminal passes.
The input prediction system provided by the embodiment of the invention has delay verification in a network and simultaneously supports protocol degradation processing, thereby effectively improving the data processing capability of input prediction.
Fig. 8 is a schematic structural diagram of an input prediction system according to a fifth embodiment of the present invention, which is similar to the first embodiment except that for convenience of description, only the parts related to the fifth embodiment of the present invention are shown:
In this embodiment of the present invention, the third sending unit 304 specifically includes a second protocol downgrading module 801 and a data sending module 802.
And a second protocol downgrading module 801, configured to support a Websocket protocol downgrading process of TCP and HTTP when detecting that there is a delay verification in address information of the second terminal.
in the embodiment of the invention, if the browser with poor WebSocket support is not successfully handshake-handled by IE11 or the like, the second terminal performs degradation processing and requests in an http polling mode. The second terminal can adopt Sockjs and Sockjs to preferentially use the native WebSocket, and if the second terminal is in a browser which does not support webSocket, the mode is automatically reduced to a polling mode.
the method comprises the steps of obtaining an available transmission list, sending a request, obtaining certain information, such as whether a server supports a websocket, and calculating the coming and returning time of communication between a client and a server.
And establishing a real connection, traversing the transport supported by the transmission list queue once, and preferentially taking the transport at the head of the queue, or continuously taking the transport backwards as a degradation scheme.
and a data sending module 802, configured to send the encrypted data to the second terminal based on a Websocket protocol of TCP and HTTP when it is verified that the address information of the second terminal passes.
the input prediction system provided by the embodiment of the invention has delay verification in a network and simultaneously supports protocol degradation processing, thereby effectively improving the data processing capability of input prediction.
It should be understood that, although the respective structures in the structural block diagrams of the embodiments of the present invention are shown in order as indicated by arrows, the structures are not necessarily executed in order as indicated by the arrows. The structures are not limited to be performed in a strict order unless explicitly stated herein, and may be performed in other decoupled orders. Moreover, at least a portion of the structures in various embodiments may include multiple sub-decoupling strands or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-structures or stages is not necessarily sequential, but may be performed in turn or alternating with other structures or at least a portion of the sub-structures or stages of other structures.
the technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. an input prediction system is characterized by comprising a server side, a first terminal and a second terminal, wherein the first terminal and the second terminal are communicated with the server side;
The first terminal is used for receiving a data transmission request of a user, wherein the data transmission request carries data information to be transmitted and second terminal identification information; sending the second terminal identification information to a server; encrypting data information to be transmitted through a public key to obtain encrypted data; sending the encrypted data to a server side by taking Netty as a basic communication framework through a Websocket protocol of TCP and HTTP;
The server is used for receiving second terminal identification information sent by the first terminal; creating a long connection relation between the first terminal and the second terminal according to the second terminal identification information; when the address information of the first terminal passes the verification, receiving encrypted data sent by the first terminal; when the address information of the second terminal passes through verification, the encrypted data is sent to the second terminal based on a Websocket protocol of TCP and HTTP;
The second terminal is used for receiving the encrypted data sent by the server; and decrypting the encrypted data according to a private key.
2. The input prediction system of claim 1, wherein the first terminal specifically comprises:
The first receiving unit is used for receiving a data transmission request of a user, wherein the data transmission request carries data information to be transmitted and second terminal identification information;
The first sending unit is used for sending the second terminal identification information to a server;
The encryption unit is used for encrypting the data information to be transmitted through a public key to obtain encrypted data; and
And the second sending unit is used for sending the encrypted data to the server by taking Netty as a basic communication framework through a Websocket protocol of TCP and HTTP.
3. The input prediction system according to claim 2, wherein the first receiving unit specifically comprises:
the page output module is used for responding to the input operation of the data information to be transmitted of the user and outputting a second terminal identification information input page to the user; and
And the information receiving module is used for receiving at least one piece of second terminal identification information input by the user through the second terminal identification information input page.
4. the input prediction system of claim 2, wherein the encryption unit specifically comprises:
The conversion module is used for compressing the data information to be transmitted and converting the data information into byte data streams; and
and the encryption module is used for encrypting the byte data stream through a public key to obtain encrypted data.
5. The input prediction system of claim 1, wherein the server specifically comprises:
A second receiving unit, configured to receive second terminal identification information sent by the first terminal;
the connection establishing unit is used for establishing a long connection relation between the first terminal and the second terminal according to the second terminal identification information;
A third receiving unit, configured to receive encrypted data sent by the first terminal when it is verified that the address information of the first terminal passes; and
And the third sending unit is used for sending the encrypted data to the second terminal based on a Websocket protocol of TCP and HTTP when the address information of the second terminal passes the verification.
6. The input prediction system according to claim 4, characterized in that the third receiving unit comprises:
The first protocol degradation module is used for supporting Websocket protocol degradation processing of TCP and HTTP when detecting that the address information of the first terminal has delay verification; and
And the data receiving module is used for receiving the encrypted data sent by the first terminal when the address information of the first terminal passes the verification.
7. The input prediction system according to claim 4, wherein the third sending unit specifically includes:
The second protocol degradation module is used for supporting the Websocket protocol degradation processing of the TCP and the HTTP when the address information of the second terminal is detected to have delay verification; and
And the data sending module is used for sending the encrypted data to the second terminal based on a Websocket protocol of TCP and HTTP when the address information of the second terminal passes the verification.
8. The input prediction system of claim 1, wherein the second terminal specifically comprises:
the second receiving unit is used for receiving the encrypted data sent by the server; and
And the decryption unit is used for decrypting the encrypted data according to the private key.
CN201910792924.2A 2019-08-26 2019-08-26 Input foreknowledge system Pending CN110581847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910792924.2A CN110581847A (en) 2019-08-26 2019-08-26 Input foreknowledge system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910792924.2A CN110581847A (en) 2019-08-26 2019-08-26 Input foreknowledge system

Publications (1)

Publication Number Publication Date
CN110581847A true CN110581847A (en) 2019-12-17

Family

ID=68812170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910792924.2A Pending CN110581847A (en) 2019-08-26 2019-08-26 Input foreknowledge system

Country Status (1)

Country Link
CN (1) CN110581847A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866770A (en) * 2020-07-21 2020-10-30 上海聚均科技有限公司 Capital monitoring method based on short message
CN113329064A (en) * 2021-05-13 2021-08-31 河南中州智慧水利研究院有限公司 Communication method of Internet of things interaction protocol based on water conservancy data acquisition and control
CN115776413A (en) * 2023-02-09 2023-03-10 航天宏图信息技术股份有限公司 Data transmission method and system based on iris encryption

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079840A (en) * 2007-02-12 2007-11-28 腾讯科技(深圳)有限公司 A data transmission system and method
CN103139051A (en) * 2013-03-22 2013-06-05 南京信通科技有限责任公司 Instant messaging communication method based on Websocket protocol
CN104580167A (en) * 2014-12-22 2015-04-29 腾讯科技(深圳)有限公司 Data transmission method, device and system
CN104980397A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Instant messaging method, system and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079840A (en) * 2007-02-12 2007-11-28 腾讯科技(深圳)有限公司 A data transmission system and method
CN103139051A (en) * 2013-03-22 2013-06-05 南京信通科技有限责任公司 Instant messaging communication method based on Websocket protocol
CN104980397A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Instant messaging method, system and terminal
CN104580167A (en) * 2014-12-22 2015-04-29 腾讯科技(深圳)有限公司 Data transmission method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866770A (en) * 2020-07-21 2020-10-30 上海聚均科技有限公司 Capital monitoring method based on short message
CN113329064A (en) * 2021-05-13 2021-08-31 河南中州智慧水利研究院有限公司 Communication method of Internet of things interaction protocol based on water conservancy data acquisition and control
CN115776413A (en) * 2023-02-09 2023-03-10 航天宏图信息技术股份有限公司 Data transmission method and system based on iris encryption

Similar Documents

Publication Publication Date Title
US11108570B2 (en) Method and apparatus for multimedia communication, and storage medium
US9705852B2 (en) Proxy SSL authentication in split SSL for client-side proxy agent resources with content insertion
CN113067828B (en) Message processing method, device, server, computer equipment and storage medium
US8984268B2 (en) Encrypted record transmission
CN101299753B (en) Web service security control mechanism based on proxy server
US20130312054A1 (en) Transport Layer Security Traffic Control Using Service Name Identification
CN110581847A (en) Input foreknowledge system
CN103428221A (en) Safety logging method, system and device of mobile application
WO2019178942A1 (en) Method and system for performing ssl handshake
CN103391292A (en) Mobile-application-oriented safe login method, system and device
US11349820B2 (en) Selective encryption of tunneled encrypted traffic
US20170171286A1 (en) Methods and devices for validating a video connection or other types of communication sessions over a computer network
CN103108037A (en) Communication method, Web server and Web communication system
CN107124385B (en) Mirror flow-based SSL/TLS protocol plaintext data acquisition method
CN106603388B (en) Mail sending, viewing and viewing control method and equipment thereof
Laaroussi et al. A performance analysis of the security communication in CoAP and MQTT
JP2006221450A (en) Load distribution device, load distribution method and load distribution program
US20160366191A1 (en) Single Proxies in Secure Communication Using Service Function Chaining
US10218682B1 (en) Secure network protocol cryptographic processing
CN104506530B (en) A kind of network data processing method and device, data transmission method for uplink and device
CN112165494A (en) Message analysis method and device, electronic equipment and storage medium
CN112217862A (en) Data communication method, device, terminal equipment and storage medium
WO2015104567A1 (en) Secure communication between a server and a client web browser
CN116405536A (en) Data processing method and device
CN110351086A (en) Encryption information processing and transmission method and system in a kind of group, robot

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191217

RJ01 Rejection of invention patent application after publication