Data transmission method and apparatus, device, and storage medium

By using the transport layer security protocol handshake process and message queue middleware processing between the M2M platform and M2M devices, the communication function and business function are decoupled, which solves the problem of insufficient deployment flexibility caused by the tight binding of communication function and business function, and improves deployment flexibility and applicability to business scenarios.

CN117750359BActive Publication Date: 2026-11-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311801552.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2026-11-27
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

The existing M2M platform and M2M devices have tightly integrated communication and business functions, which means that business functions need to be deployed simultaneously when deploying communication functions, and the deployment flexibility needs to be improved.

Method used

By executing a preset handshake process based on the transport layer security protocol, receiving the hypertext transfer protocol request from the terminal device, creating a communication process, and decrypting the encrypted business data, the data is sent to the business processing device for processing through a message queue middleware, thereby decoupling the communication function from the business function.

Benefits of technology

It decouples communication functions from business functions, improves deployment flexibility, and expands the applicability of business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117750359B_ABST
    Figure CN117750359B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, device and equipment and a storage medium. The method comprises the following steps: performing a preset handshake process with a terminal device based on a transport layer security protocol; receiving a hypertext transfer protocol request sent by the terminal device; creating a corresponding communication process according to the hypertext transfer protocol request; receiving service encrypted data transmitted by the terminal device based on the communication process, decrypting the service encrypted data, and generating corresponding service data; and sending the service data to a service processing device through a message queue middleware for corresponding processing. The data transmission method improves the deployment flexibility. Meanwhile, based on the independence of the communication function, the method can be applied to a wider range of service scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) communication technology, and in particular to a data transmission method, apparatus, device, and storage medium. Background Technology

[0002] M2M (Machine to Machine) refers to the transmission of data from one terminal to another, that is, communication between machines. M2M applications mainly consist of two parts: M2M devices and M2M systems. M2M systems include M2M industry applications and M2M platforms. The M2M platform is the central hub for data uploaded from terminals and monitors the distributed M2M devices. M2M devices communicate with the M2M platform via mobile communication networks. There are many types of M2M devices, such as smartwatches and mobile phones.

[0003] Current M2M platforms and M2M devices communicate with cards by integrating communication functions into business services, while adhering to international standards. Data is obtained through business modules to achieve communication with the card. This communication method is tightly bound to business functions, resulting in a high degree of coupling between communication and business functions. Consequently, business functions need to be deployed simultaneously when deploying communication functions, thus requiring improved deployment flexibility. Summary of the Invention

[0004] This application provides a data transmission method, apparatus, device, and storage medium to address the problem that current communication methods are tightly bound to business functions, resulting in a high degree of coupling between communication and business functions. This leads to the need to deploy business functions simultaneously when deploying communication functions, thus requiring improved deployment flexibility.

[0005] The first aspect of this application provides a data transmission method, including:

[0006] The pre-defined handshake process between the terminal device and the execution of the transport layer security protocol is based on the execution of the terminal device.

[0007] Receive Hypertext Transfer Protocol requests sent by terminal devices;

[0008] Request the creation of a corresponding communication process according to the Hypertext Transfer Protocol;

[0009] Based on the communication process, the terminal device receives encrypted service data, decrypts the encrypted service data, and generates corresponding service data.

[0010] The business data is sent to the business processing device for corresponding processing via message queue middleware.

[0011] Furthermore, in the method described above, the pre-defined handshake process with the terminal device based on the transport layer security protocol includes:

[0012] The terminal device receives a Transport Layer Security Protocol (TLS) request; the TLS request includes: first random data, a list of available cipher suites, and a unique identifier of the communication card in the terminal device.

[0013] A corresponding server message is generated according to the transport layer security protocol request, and the server message is sent to the terminal device; the server message includes: second random data, the cipher suite used, and a public key; the cipher suite used corresponds to the list of available cipher suites;

[0014] The terminal device receives key exchange information; the key exchange information includes an encrypted pre-master key; the pre-master key is generated by the terminal device based on the first random data and the second random data; the pre-master key is encrypted based on the public key.

[0015] The key exchange information is decrypted to obtain the pre-master key, and the pre-master key is verified.

[0016] If the verification result is successful, a handshake end message is sent to the terminal device.

[0017] Further, in the method described above, the step of generating the corresponding server message according to the transport layer security protocol request includes:

[0018] The unique identifier is verified;

[0019] If the verification result is successful, the cipher suite to be used is determined based on the list of available cipher suites;

[0020] The preset public key, the second random data, and the adopted cipher suite are determined as the server message.

[0021] Furthermore, in the method described above, the step of decrypting the encrypted business data to generate corresponding business data includes:

[0022] The encrypted business data is decrypted using the private key corresponding to the public key to generate the corresponding business data;

[0023] Determine whether the business data contains a cascading information identifier;

[0024] If it is determined that no cascading information identifier is included, then the step of sending the business data to the business processing device through the message queue middleware for corresponding processing is performed.

[0025] Furthermore, in the method described above, if it is determined that a cascading information identifier is included, the method further includes:

[0026] Based on the aforementioned communication process, continue to receive other encrypted data transmitted by the terminal device;

[0027] The other encrypted data is decrypted to generate corresponding decrypted data; the decrypted data includes a cascading information identifier.

[0028] Based on the cascading information identifiers contained in the decrypted data and the cascading information identifiers contained in the business data, the business data and decrypted data are recombined to generate the corresponding target data;

[0029] The step of sending the business data to the business processing device for corresponding processing via message queue middleware includes:

[0030] The target data is sent to the business processing device for corresponding processing via message queue middleware.

[0031] Furthermore, in the method described above, after sending the business data to the business processing device for corresponding processing via message queue middleware, the method further includes:

[0032] Receive the data sent by the service processing device via the message queue middleware; the data sent includes the unique identifier of the communication card in the terminal device;

[0033] The data to be sent is encrypted to generate encrypted data to be sent.

[0034] The corresponding communication process is determined based on the unique identifier;

[0035] Based on the communication process, the encrypted data is sent to the terminal device.

[0036] Furthermore, in the method described above, the method further includes:

[0037] Receive a communication process shutdown instruction sent by the service processing device via a message queue middleware; the communication process shutdown instruction includes a unique identifier of the communication card in the terminal device;

[0038] The communication process corresponding to the unique identifier is closed according to the communication process closure instruction.

[0039] A second aspect of this application provides a data transmission apparatus, comprising:

[0040] The handshake module is used to execute a preset handshake process with the terminal device based on the transport layer security protocol.

[0041] The receiving module is used to receive Hypertext Transfer Protocol requests sent by the terminal device;

[0042] A creation module is used to create a corresponding communication process according to the hypertext transfer protocol request.

[0043] The decryption module is used to receive encrypted service data transmitted by the terminal device based on the communication process, and to decrypt the encrypted service data to generate corresponding service data.

[0044] The sending module is used to send the business data to the business processing device for corresponding processing through the message queue middleware.

[0045] Furthermore, in the apparatus described above, the handshake module is specifically used for:

[0046] The system receives a Transport Layer Security (TLS) request from a terminal device. The TLS request includes: first random data, a list of available cipher suites, and a unique identifier for the communication card in the terminal device. A corresponding server message is generated based on the TLS request, and the server message is sent to the terminal device. The server message includes: second random data, a selected cipher suite, and a public key. The selected cipher suite corresponds to the list of available cipher suites. The system also receives key exchange information from the terminal device. The key exchange information includes an encrypted pre-master key. The pre-master key is generated by the terminal device based on the first and second random data and encrypted using the public key. The system decrypts the key exchange information to obtain the pre-master key and verifies it. If the verification is successful, a handshake termination message is sent to the terminal device.

[0047] Furthermore, in the apparatus described above, when the handshake module requests the generation of a corresponding server message according to the transport layer security protocol, it is specifically used for:

[0048] The unique identifier is verified; if the verification result is successful, the adopted cipher suite is determined based on the list of available cipher suites; the preset public key, the second random data, and the adopted cipher suite are determined as the server message.

[0049] Furthermore, in the apparatus described above, when the decryption module decrypts the encrypted business data and generates corresponding business data, it is specifically used for:

[0050] The encrypted business data is decrypted using the private key corresponding to the public key to generate corresponding business data; it is then determined whether the business data contains a cascading information identifier; if it is determined that the cascading information identifier is not contained, the step of sending the business data to the business processing device through the message queue middleware for corresponding processing is executed.

[0051] Furthermore, in the apparatus described above, if it is determined that a cascading information identifier is included, the decryption module is further configured to:

[0052] Based on the communication process, continue to receive other encrypted data transmitted by the terminal device; decrypt the other encrypted data to generate corresponding decrypted data; the decrypted data includes a concatenation information identifier; reassemble the business data and decrypted data according to the concatenation information identifier contained in the decrypted data and the concatenation information identifier contained in the business data to generate corresponding target data;

[0053] The sending module is specifically used for:

[0054] The target data is sent to the business processing device for corresponding processing via message queue middleware.

[0055] Furthermore, the apparatus as described above further includes:

[0056] The delivery module is used to receive delivery data sent by the service processing device via a message queue middleware; the delivery data includes a unique identifier of the communication card in the terminal device; encrypt the delivery data to generate encrypted delivery data; determine the corresponding communication process based on the unique identifier; and send the encrypted delivery data to the terminal device based on the communication process.

[0057] Furthermore, the apparatus as described above further includes:

[0058] The process shutdown module is used to receive a communication process shutdown instruction sent by the service processing device via a message queue middleware; the communication process shutdown instruction includes a unique identifier of the communication card in the terminal device; and shuts down the communication process corresponding to the unique identifier according to the communication process shutdown instruction.

[0059] A third aspect of this application provides an electronic device, including: a memory and a processor;

[0060] The memory stores computer-executed instructions;

[0061] The processor executes computer execution instructions stored in the memory to implement the data transfer method as described in any of the first aspects.

[0062] A fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data transmission method described in any of the first aspects.

[0063] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the data transmission method described in any of the first aspects.

[0064] This application provides a data transmission method, apparatus, device, and storage medium. The method includes: executing a preset handshake process with a terminal device based on a transport layer security protocol; receiving a Hypertext Transfer Protocol (HTTP) request sent by the terminal device; creating a corresponding communication process according to the HTTP request; receiving encrypted service data transmitted by the terminal device based on the communication process, decrypting the encrypted service data to generate corresponding service data; and sending the service data to a service processing device for corresponding processing via a message queue middleware. This data transmission method establishes a communication connection with the terminal device based on a preset handshake process. Simultaneously, it creates a corresponding communication process based on the HTTP request sent by the terminal device to receive encrypted service data transmitted by the terminal device through the communication process. After decrypting the encrypted service data, the decrypted service data is sent to the service processing device for corresponding processing via a message queue middleware. This decouples communication functions from service functions, making the deployment of communication functions and service functions independent, thereby improving deployment flexibility. Furthermore, the independence of the communication function allows for a wider range of applicable business scenarios. Attached Figure Description

[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0066] Figure 1 This is a scenario diagram illustrating how the data transmission method of the embodiments of this application can be implemented;

[0067] Figure 2 Flowchart of the data transmission method provided in this application Figure 1 ;

[0068] Figure 3 Flowchart of the data transmission method provided in this application Figure 2 ;

[0069] Figure 4 A schematic diagram of the data transmission device provided in this application;

[0070] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0073] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solutions of this application comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0074] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0075] The technical solutions of this application will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0076] To clearly understand the technical solution of this application, the existing solutions will first be described in detail. Currently, card communication between M2M platforms and M2M devices generally integrates communication functions into service functions. In practical applications, the M2M platform communicates with the card of the M2M device through a service module. Due to the binding nature of communication functions and service functions, during deployment, the content of the service module needs to be determined first, and then the service module (which integrates communication functions) needs to be deployed. Therefore, in the current communication method, the service functions also need to be deployed simultaneously when deploying communication functions, and the deployment flexibility needs to be improved.

[0077] Therefore, in the existing communication methods, which are closely tied to business functions and have a high degree of coupling between them, the business functions also need to be deployed simultaneously when deploying the communication functions, resulting in a lack of deployment flexibility. The inventors discovered in their research that the communication functions can be decoupled from the business functions, with a separately deployed communication module communicating with the terminal device. This makes the communication functions independent of the business functions, improving deployment flexibility and also enhancing the applicability of the communication functions to various business scenarios.

[0078] Specifically, a pre-defined handshake process with the terminal device is executed based on the transport layer security protocol. The system receives a Hypertext Transfer Protocol (HTTP) request from the terminal device. A corresponding communication process is created based on the HTTP request. The system receives encrypted service data transmitted by the terminal device based on the communication process, decrypts the encrypted service data, and generates corresponding service data. The service data is then sent to the service processing device for processing via a message queue middleware.

[0079] The data transmission method of this application establishes a communication connection with the terminal device based on a preset handshake process. Simultaneously, a corresponding communication process is created based on the Hypertext Transfer Protocol (HTTP) request sent by the terminal device to receive encrypted business data transmitted by the terminal device. After decrypting the encrypted business data, a message queue middleware is used to send the decrypted business data to the business processing device for corresponding processing. This decouples the communication function from the business function, making the deployment of the communication function and the deployment of the business function independent, thereby improving deployment flexibility. Furthermore, the independence of the communication function allows for a wider range of applicable business scenarios.

[0080] Based on the above-mentioned inventive discovery, the inventor has proposed the technical solution of this application.

[0081] The application scenarios of the data transmission method provided in the embodiments of this application are described below. For example... Figure 1 As shown, 1 represents an electronic device, 2 represents a terminal device, 3 represents a message queue middleware, and 4 represents a business processing device. The network architecture of the application scenario corresponding to the data transmission method provided in this embodiment includes: electronic device 1, terminal device 2, message queue middleware 3, and business processing device 4. Electronic device 1 can be a server, and terminal device 2 can be a smartwatch, mobile phone, vehicle terminal, etc.

[0082] For example, when data transmission is required, electronic device 1 establishes communication with terminal device 2, specifically: ① A preset handshake process with the terminal device is executed based on the transport layer security protocol. After the handshake process is completed, terminal device 2 and electronic device 1 begin to transmit business data. At this time, electronic device 1 performs the following processing:

[0083] ② Receive Hypertext Transfer Protocol requests sent by terminal devices.

[0084] ③ Request the creation of the corresponding communication process according to the Hypertext Transfer Protocol.

[0085] ④ Receive encrypted service data transmitted by the terminal device based on the communication process, decrypt the encrypted service data, and generate corresponding service data.

[0086] ⑤ Send business data to message queue middleware 3.

[0087] Meanwhile, after receiving the business data, message queue middleware 3 sends the business data to business processing device 4, which then performs the corresponding business processing. After processing, business processing device 4 can transmit the data to be sent to terminal device 2 via electronic device 1.

[0088] The embodiments of this application are described below with reference to the accompanying drawings.

[0089] Figure 2 Flowchart of the data transmission method provided in this application Figure 1 ,like Figure 2 As shown, in this embodiment, the execution subject of this application embodiment is a data transmission device, which can be integrated into an electronic device. The data transmission method provided in this embodiment includes the following steps:

[0090] Step S101: Perform a preset handshake process with the terminal device based on the transport layer security protocol.

[0091] In this embodiment, Transport Layer Security Protocol (TLS) is an encryption protocol designed to provide secure communication over computer networks. Communication between the terminal device and the device is built based on TLS.

[0092] The default handshake process can be different from or the same as the current handshake process between the M2M platform and M2M devices. For example, the handshake process can be initiated directly by sending the public key instead of sending the M2M platform's certificate.

[0093] Step S102: Receive the Hypertext Transfer Protocol request sent by the terminal device.

[0094] In this embodiment, the data is transmitted based on the Hypertext Transfer Protocol (HTTP).

[0095] Step S103: Request the creation of a corresponding communication process according to the Hypertext Transfer Protocol.

[0096] In this embodiment, the communication process corresponds to each terminal device. When the terminal device sends a Hypertext Transfer Protocol request or performs a handshake process, the unique identifier of the terminal device can be obtained, and a corresponding communication process can be created based on the unique identifier of the terminal device.

[0097] Step S104: Receive encrypted service data transmitted by the terminal device based on the communication process, decrypt the encrypted service data, and generate corresponding service data.

[0098] After the handshake process is completed, the electronic device and the terminal device exchange password information. After receiving the encrypted business data, the corresponding data can be decrypted according to the decryption key.

[0099] Step S105: Send the business data to the business processing device for corresponding processing through the message queue middleware.

[0100] This application provides a data transmission method, which includes: executing a preset handshake process with a terminal device based on a transport layer security protocol; receiving a Hypertext Transfer Protocol (HTTP) request sent by the terminal device; creating a corresponding communication process according to the HTTP request; receiving encrypted service data transmitted by the terminal device based on the communication process, decrypting the encrypted service data, and generating corresponding service data; and sending the service data to a service processing device for corresponding processing via a message queue middleware.

[0101] The data transmission method of this application establishes a communication connection with the terminal device based on a preset handshake process. Simultaneously, a corresponding communication process is created based on the Hypertext Transfer Protocol (HTTP) request sent by the terminal device to receive encrypted business data transmitted by the terminal device. After decrypting the encrypted business data, a message queue middleware is used to send the decrypted business data to the business processing device for corresponding processing. This decouples the communication function from the business function, making the deployment of the communication function and the deployment of the business function independent, thereby improving deployment flexibility. Furthermore, the independence of the communication function allows for a wider range of applicable business scenarios.

[0102] Figure 3 Flowchart of the data transmission method provided in this application Figure 2 ,like Figure 3 As shown, the data transmission method provided in this embodiment is a further refinement of the data transmission method provided in the previous embodiment of this application. The data transmission method provided in this embodiment includes the following steps.

[0103] Step S201: Receive a transport layer security protocol request sent by the terminal device. The transport layer security protocol request includes: first random data, a list of available cipher suites, and a unique identifier of the communication card in the terminal device.

[0104] In this embodiment, the first random data is a 4-byte number, consisting of the date and time of the terminal device plus a 28-byte randomly generated number. The available cipher suite list refers to the list of cipher suites available on the terminal device, which may include protocol versions, key exchange algorithms, encryption algorithms, hash functions, etc.

[0105] When a transport layer security protocol request is received, the data contained in the transport layer security protocol request can be stored in a preset database, which can be a Redis (short for Remote Dictionary Server) database.

[0106] The Transport Layer Security (TLS) request can also be referred to as the Client Hello message in the handshake process. The Client Hello message may also include the version number corresponding to the highest version supported by the terminal device, compression algorithms, etc.

[0107] The electronic identity (eID) of the communication card in the terminal device is unique and corresponds to the card. It can be used to determine the communication process corresponding to the terminal device and to verify the identity of the terminal device.

[0108] In this embodiment, before S201, the service processing device can also send relevant messages about the service to be processed to the terminal device through the device of this embodiment, so that the terminal device can actively initiate a handshake process with the electronic device and subsequent communication process.

[0109] Step S202: Generate a corresponding server message according to the transport layer security protocol request, and send the server message to the terminal device. The server message includes: second random data, the cipher suite used, and the public key. The cipher suite used corresponds to a list of available cipher suites.

[0110] In this embodiment, the second random data has a similar structure to the first random data. The server message can be called a Server hello message. After sending the server message to the terminal device, a ServerHelloDone message can also be sent to indicate that the message sending is complete, so that the terminal device knows that the message sending is complete.

[0111] Optionally, in this embodiment, generating the corresponding server message in S202 can specifically be as follows:

[0112] Verify the unique identifier.

[0113] If the verification result is successful, the cipher suite to be used is determined based on the list of available cipher suites.

[0114] The preset public key, the second random data, and the cipher suite used are identified as the server message.

[0115] In this embodiment, the cipher suite to be used, such as a specific encryption algorithm, can be determined from the list of available cipher suites.

[0116] Step S203: Receive key exchange information sent by the terminal device. The key exchange information includes an encrypted pre-master key. The pre-master key is generated by the terminal device based on the first random data and the second random data. The pre-master key is encrypted using a public key.

[0117] In this embodiment, the key exchange information can also be referred to as clientKeyExchange. Simultaneously, a ClientChangeCipherSpe message indicating that all subsequent messages will be encrypted using the negotiated key and algorithm can be sent, along with a clientFinshedSend message indicating message delivery completion.

[0118] Step S204: Decrypt the key exchange information to obtain the pre-master key, and verify the pre-master key.

[0119] In this embodiment, since the electronic device contains first random data and second random data, the decrypted pre-master key can be verified.

[0120] In step S205, if the verification result is successful, a handshake end message is sent to the terminal device.

[0121] In this embodiment, if the verification is successful, a serverChangeCipherSpec message indicating agreement to use the negotiated key and algorithm for encryption, as well as a handshake end message serverFinshedSend, can be sent.

[0122] In this embodiment, the preset handshake process is as follows:

[0123] Client Hello, Server Hello, ServerHelloDone, clientKeyExchange,

[0124] ClientChangeCipherSpec, clientFinshedSend, serverChangeCipherSpec, and serverFinshedSend. Compared to the commonly used handshake process, the certificate verification process has been removed. This is to address the issue of insufficient card memory leading to the inability to authenticate certificates.

[0125] Step S206: Receive the Hypertext Transfer Protocol request sent by the terminal device.

[0126] In this embodiment, the implementation of S206 is similar to that of S102, and will not be described again here.

[0127] Step S207: Request the creation of a corresponding communication process according to the Hypertext Transfer Protocol.

[0128] In this embodiment, the implementation of S207 is similar to that of S103, and will not be described again here.

[0129] Step S208: Receive encrypted service data transmitted by the terminal device based on the communication process, decrypt the encrypted service data, and generate corresponding service data.

[0130] Optionally, in this embodiment, the process of decrypting the encrypted business data and generating the corresponding business data in S208 can be specifically as follows:

[0131] The encrypted business data is decrypted using the private key corresponding to the public key, and the corresponding business data is generated.

[0132] Determine whether the business data contains cascading information identifiers.

[0133] If it is determined that no cascading information identifier is included, then execute S209.

[0134] Optionally, in this embodiment, if it is determined that a cascading information identifier is included, the following steps may also be included:

[0135] The communication process continues to receive other encrypted data transmitted by the terminal device.

[0136] Decrypt other encrypted data to generate corresponding decrypted data. The decrypted data includes a cascading information identifier.

[0137] Based on the cascading information identifiers contained in the decrypted data and the cascading information identifiers contained in the business data, the business data and decrypted data are recombined to generate the corresponding target data.

[0138] At this point, S209 can be replaced with:

[0139] The target data is sent to the business processing device for corresponding processing via message queue middleware.

[0140] In this embodiment, to ensure data integrity, when a cascading message initiated by a terminal device is determined to be cascading information, the information is reassembled multiple times before being sent to the service processing device.

[0141] Step S209: Send the business data to the business processing device for corresponding processing through the message queue middleware.

[0142] Optionally, in this embodiment, after S209, the following steps are also included:

[0143] Receive data sent by the service processing device via message queue middleware. The data sent includes the unique identifier of the communication card in the terminal device.

[0144] The data to be sent is encrypted to generate encrypted data for distribution.

[0145] The corresponding communication process is determined based on a unique identifier.

[0146] Based on the communication process, encrypted data will be sent to the terminal device.

[0147] In this embodiment, considering the decoupling of communication and business functions, the instructions and channel control issued by the business processing device are connected to the communication module through a message queue middleware. Since each request from the terminal device creates a new process connection for communication, using a unique identifier as the query keyword ensures the accuracy of the card communication data. Simultaneously, a communication timeout can be set during the interaction; if the timeout occurs, the process channel is actively closed and feedback is sent to the business processing device.

[0148] Optionally, this embodiment may also include a channel closing process, as detailed below:

[0149] The receiving service processing device sends a communication process shutdown instruction via message queue middleware. The communication process shutdown instruction includes a unique identifier for the communication card in the terminal device.

[0150] The communication process corresponding to the unique identifier is closed according to the communication process closure instruction.

[0151] In this embodiment, when the service processing device is ready to close communication with the terminal device, it can directly issue a communication process closure instruction, thereby closing the channel process corresponding to the unique identifier. Simultaneously, the issued instruction can also be other operation instructions, such as data querying or data downloading.

[0152] This embodiment implements a standalone card communication device that conforms to the M2M communication specification. It can be applied to any M2M platform that meets the specification. The platform only needs to have business capabilities, and it can achieve card communication through this device. This greatly reduces the coupling between platform communication and business, and is more conducive to platform construction and development.

[0153] Figure 4 A schematic diagram of the data transmission device provided in this application is shown below. Figure 4 As shown, in this embodiment, the data transmission device 300 can be installed in an electronic device, and the data transmission device 300 includes:

[0154] The handshake module 301 is used to execute a preset handshake process with the terminal device based on the transport layer security protocol.

[0155] The receiving module 302 is used to receive Hypertext Transfer Protocol requests sent by the terminal device.

[0156] Create module 303 to create the corresponding communication process according to the Hypertext Transfer Protocol request.

[0157] The decryption module 304 is used to receive encrypted service data transmitted by the terminal device based on the communication process, decrypt the encrypted service data, and generate corresponding service data.

[0158] The sending module 305 is used to send business data to the business processing device for corresponding processing through the message queue middleware.

[0159] The data transmission device provided in this embodiment can perform... Figure 2 The technical solution of the method embodiment shown has the same implementation principle and technical effect as... Figure 2 The methods and embodiments shown are similar and will not be described in detail here.

[0160] The data transmission device provided in this application is a further refinement of the data transmission device provided in the previous embodiment. The data transmission device 300 includes:

[0161] Optionally, in this embodiment, the handshake module 301 is specifically used for:

[0162] The system receives a Transport Layer Security (TLS) request from a terminal device. The TLS request includes: first random data, a list of available cipher suites, and a unique identifier for the communication card in the terminal device. A corresponding server message is generated based on the TLS request and sent to the terminal device. The server message includes: second random data, the adopted cipher suite, and a public key. The adopted cipher suite corresponds to the list of available cipher suites. The system also receives key exchange information from the terminal device. The key exchange information includes an encrypted pre-master key. The pre-master key is generated by the terminal device based on the first and second random data. The pre-master key is encrypted using the public key. The key exchange information is decrypted to obtain the pre-master key, and the pre-master key is verified. If the verification is successful, a handshake end message is sent to the terminal device.

[0163] Optionally, in this embodiment, when the handshake module 301 requests the generation of the corresponding server message according to the transport layer security protocol, it is specifically used for:

[0164] The unique identifier is validated. If the validation passes, the appropriate cipher suite is determined based on the list of available cipher suites. The preset public key, the second random data, and the selected cipher suite are then used to define the server message.

[0165] Optionally, in this embodiment, when the decryption module 304 decrypts the encrypted business data and generates the corresponding business data, it is specifically used for:

[0166] The encrypted business data is decrypted using the private key corresponding to the public key to generate the corresponding business data. It is then determined whether the business data contains a cascading information identifier. If it is determined that the cascading information identifier is not present, the business data is sent to the business processing device via a message queue middleware for corresponding processing.

[0167] Optionally, in this embodiment, if it is determined that a cascading information identifier is included, the decryption module 304 is further configured to:

[0168] The communication process continues to receive other encrypted data transmitted by the terminal device. This encrypted data is decrypted to generate corresponding decrypted data. The decrypted data includes a concatenation information identifier. Based on the concatenation information identifiers contained in the decrypted data and the business data, the business data and decrypted data are reassembled to generate the corresponding target data.

[0169] The sending module 305 is specifically used for:

[0170] The target data is sent to the business processing device for corresponding processing via message queue middleware.

[0171] Optionally, in this embodiment, the data transmission device 300 further includes:

[0172] The delivery module receives delivery data sent by the service processing device via message queue middleware. The delivery data includes a unique identifier for the communication card in the terminal device. The delivery data is encrypted to generate encrypted delivery data. The corresponding communication process is determined based on the unique identifier. Based on the communication process, the encrypted delivery data is sent to the terminal device.

[0173] Optionally, in this embodiment, the data transmission device 300 further includes:

[0174] The process shutdown module receives a communication process shutdown instruction sent by the service processing device via message queue middleware. The communication process shutdown instruction includes a unique identifier for the communication card in the terminal device. The communication process corresponding to the unique identifier is shut down according to the communication process shutdown instruction.

[0175] The data transmission device provided in this embodiment can perform... Figures 2-3 The technical solution of the method embodiment shown has the same implementation principle and technical effect as... Figures 2-3 The methods and embodiments shown are similar and will not be described in detail here.

[0176] According to embodiments of this application, this application also provides an electronic device, a computer-readable storage medium, and a computer program product.

[0177] like Figure 5 As shown, Figure 5This is a schematic diagram of the electronic device provided in this application. The electronic device is intended for various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0178] like Figure 5 As shown, the electronic device includes a processor 401 and a memory 402. The various components are interconnected via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the electronic device.

[0179] The memory 402 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause at least one processor to perform the data transmission method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the data transmission method provided in this application.

[0180] Memory 402, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the data transmission method in the embodiments of this application (e.g., attached...). Figure 4 The handshake module 301, receiving module 302, creation module 303, decryption module 304, and sending module 305 are shown. The processor 401 executes various functional applications and data transmissions of the electronic device by running non-transient software programs, instructions, and modules stored in the memory 402, thereby implementing the data transmission method in the above method embodiments.

[0181] In addition, this embodiment also provides a computer product, which, when the instructions in the computer product are executed by the processor of an electronic device, enables the electronic device to execute the data transmission method of the above embodiment.

[0182] Other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the embodiments of this application that follow the general principles of the embodiments of this application and include common knowledge or customary techniques in the art not disclosed in the embodiments of this application.

[0183] It should be understood that the embodiments of this application are not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from their scope. The scope of the embodiments of this application is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that, include: A preset handshake process is executed with the terminal device based on a transport layer security protocol; wherein, the preset handshake process omits the certificate verification process. Receive Hypertext Transfer Protocol requests sent by terminal devices; A corresponding communication process is created according to the Hypertext Transfer Protocol request; wherein, the communication process corresponds to each terminal device; when the terminal device sends the Hypertext Transfer Protocol request or performs a handshake process, the unique identifier of the communication card in the terminal device is obtained, and a corresponding communication process is created based on the unique identifier of the communication card in the terminal device; Based on the communication process, the terminal device receives encrypted service data, decrypts the encrypted service data, and generates corresponding service data. The business data is sent to the business processing device for corresponding processing via message queue middleware; The preset handshake process between the terminal device and the execution of the transport layer security protocol includes: The system receives a Transport Layer Security Protocol (TLS) request from a terminal device. The TLS request includes: first random data, a list of available cipher suites, and a unique identifier for the communication card in the terminal device. A corresponding server message is generated based on the TLS request, and the server message is sent to the terminal device. The server message includes: second random data, a cipher suite used, and a public key. The used cipher suite corresponds to the list of available cipher suites. The system receives key exchange information sent by a terminal device; the key exchange information includes an encrypted pre-master key; the pre-master key is generated by the terminal device based on the first random data and the second random data; the pre-master key is encrypted based on the public key; the system decrypts the key exchange information to obtain the pre-master key and verifies the pre-master key; if the verification result is successful, the system sends handshake end information to the terminal device.

2. The method according to claim 1, characterized in that, The step of generating the corresponding server message according to the transport layer security protocol request includes: The unique identifier of the communication card in the terminal device is verified; If the verification result is successful, the cipher suite to be used is determined based on the list of available cipher suites; The preset public key, the second random data, and the adopted cipher suite are determined as the server message.

3. The method according to claim 1, characterized in that, The step of decrypting the encrypted business data to generate corresponding business data includes: The encrypted business data is decrypted using the private key corresponding to the public key to generate the corresponding business data; Determine whether the business data contains a cascading information identifier; If it is determined that no cascading information identifier is included, then the step of sending the business data to the business processing device through the message queue middleware for corresponding processing is performed.

4. The method according to claim 3, characterized in that, If it is determined that a cascading information identifier is included, the method further includes: Based on the aforementioned communication process, continue to receive other encrypted data transmitted by the terminal device; The other encrypted data is decrypted to generate corresponding decrypted data; the decrypted data includes a cascading information identifier. Based on the cascading information identifiers contained in the decrypted data and the cascading information identifiers contained in the business data, the business data and decrypted data are recombined to generate the corresponding target data; The step of sending the business data to the business processing device for corresponding processing via message queue middleware includes: The target data is sent to the business processing device for corresponding processing via message queue middleware.

5. The method according to claim 1, characterized in that, After sending the business data to the business processing device for corresponding processing via message queue middleware, the process further includes: Receive data sent by the service processing device via a message queue middleware; the data sent includes a unique identifier of the communication card in the terminal device; The data to be sent is encrypted to generate encrypted data to be sent. The corresponding communication process is determined based on the unique identifier of the communication card in the terminal device; Based on the communication process, the encrypted data is sent to the terminal device.

6. The method according to claim 1, characterized in that, The method further includes: The device receives a communication process shutdown instruction sent by the service processing device via a message queue middleware; the communication process shutdown instruction includes a unique identifier of the communication card in the terminal device. The communication process corresponding to the unique identifier of the communication card in the terminal device is closed according to the communication process closure instruction.

7. A data transmission device, characterized in that, include: The handshake module is used to execute a preset handshake process with the terminal device based on the transport layer security protocol; wherein the preset handshake process omits the certificate verification process. The receiving module is used to receive Hypertext Transfer Protocol requests sent by the terminal device; A creation module is used to create a corresponding communication process according to the Hypertext Transfer Protocol request; wherein, the communication process corresponds to each terminal device; when the terminal device sends the Hypertext Transfer Protocol request or performs a handshake process, the unique identifier of the communication card in the terminal device is obtained, and the corresponding communication process is created based on the unique identifier of the communication card in the terminal device; The decryption module is used to receive encrypted service data transmitted by the terminal device based on the communication process, and to decrypt the encrypted service data to generate corresponding service data. The sending module is used to send the business data to the business processing device for corresponding processing through the message queue middleware; The handshake module is specifically used for: The system receives a Transport Layer Security (TLS) request from a terminal device. The TLS request includes: first random data, a list of available cipher suites, and a unique identifier for the communication card in the terminal device. A corresponding server message is generated based on the TLS request, and the server message is sent to the terminal device. The server message includes: second random data, the cipher suite used, and a public key. The cipher suite used corresponds to the list of available cipher suites. The system receives key exchange information sent by a terminal device; the key exchange information includes an encrypted pre-master key; the pre-master key is generated by the terminal device based on the first random data and the second random data; the pre-master key is encrypted based on the public key; the system decrypts the key exchange information to obtain the pre-master key and verifies the pre-master key; if the verification result is successful, the system sends handshake end information to the terminal device.

8. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the data transmission method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data transmission method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Middleware, M2M (machine-to-machine) system with industrial application middleware and application method of system

    CN102790781A

  • Communication method and device based on transport layer security protocol, and storage medium

    CN116318943A