High-Frequency Data Transmission and Cross-Domain Authentication Method Based on the Middleware Layer

By introducing the UniBridge middleware layer, the communication protocol processing and cross-domain authentication problems between multiple gates are solved, and the security and efficiency of high-frequency data exchange are achieved, and the reliability and stability of the system are improved.

CN120128422BActive Publication Date: 2025-07-18XIAMEN DEL MICRO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510497964.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-18
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

When data transmission between multiple gateways, there are problems with inconsistent communication protocols, complex authentication, huge data volume and high-frequency communication, resulting in data leakage, packet loss and delay, affecting the reliability and security of the system.

Method used

UniBridge, a unified middleware layer, adopts OAuth 2.0 identity authentication, TLS encryption and SHA-256 hash signatures. Through distributed architecture and streaming processing technology, high-frequency and large-scale data processing is realized, and the conversion of different communication protocols and data integrity verification is supported.

Benefits of technology

It realizes seamless docking between multiple protocols, ensures the security and integrity of data transmission, improves data transmission efficiency, supports high-frequency and high-concurrency request processing, and has good scalability and low bandwidth consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128422B_ABST
    Figure CN120128422B_ABST
Patent Text Reader

Abstract

The present invention discloses a high-frequency data transmission and cross-domain authentication method based on a middleware layer, specifically including: the requesting system calls the HTTP interface of the API gateway of the UniBridge middleware layer to send user update data in JSON format, and attaches an OAuth 2.0 authorization token; the API gateway authenticates the OAuth 2.0, converts the HTTP request into gRPC format, and transmits the request to the receiving system through TLS encryption parameters request and SHA-256 hash signature; after receiving the gRPC request forwarded by the API gateway of the UniBridge middleware layer, the receiving system performs data integrity verification, calculates the SHA-256 hash value of the request data, and if the data is complete and valid, updates the user information in the database and returns a gRPC response message indicating successful update; the API gateway converts the gRPC response message back to HTTP format and returns it to the requesting system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer network technology, and mainly relates to a high-frequency data transmission and cross-domain authentication method based on a middleware layer, which is particularly suitable for scenarios of processing complex communication protocols, ensuring the integrity of big data transmission, and high-frequency data exchange. Background Art

[0002] With the development of Internet technology, the mutual communication between various network devices and application programs has increased day by day. Especially when data is transmitted between multiple independent domains, the complexity of communication protocols, the integrity of data transmission, and frequent data exchange have become urgent problems to be solved. Currently, cross-domain data transmission often faces problems such as inconsistent protocols, complex authentication, huge data volume, and stability issues during high-frequency communication. If these problems are not properly handled, it may not only lead to data leakage, but also cause packet loss, delay, and data corruption during the transmission process, seriously affecting the reliability and security of the system.

[0003] Therefore, there is a need for a solution that can provide reliability, efficiency, and security between multiple network gates, which can handle complex communication protocols, ensure the integrity of data transmission, and meet the requirements of high-frequency data exchange. Summary of the Invention

[0004] The present invention provides a high-frequency data transmission and cross-domain authentication solution based on a middleware layer, aiming to solve the problems of communication protocol processing, cross-domain authentication, ensuring the integrity of data transmission, and the requirements of high-frequency data exchange between multiple network gates.

[0005] The core idea of the present invention is to introduce a unified middleware layer between multiple network gates and adopt an efficient encryption and authentication mechanism to ensure the reliability, security, and efficiency of data transmission. At the same time, through a distributed architecture and streaming processing technology, it can ensure the processing of high-frequency and large amounts of data.

[0006] According to the first aspect of the present invention, a high-frequency data transmission and cross-domain authentication method based on a middleware layer is proposed. The specific steps include:

[0007] S1. The requesting system calls the HTTP interface of the API gateway of the UniBridge middleware layer to send user update data in JSON format, accompanied by an OAuth 2.0 authorization token. Among them, the request sent by the requesting system to the receiving system is in synchronous mode;

[0008] S2. The API gateway authenticates the OAuth 2.0, converts the HTTP request into gRPC format, and transmits the request to the receiving system through TLS encrypted parameters request and SHA-256 hash signature;

[0009] S3. After the receiving system receives the gRPC request forwarded by the API gateway of the UniBridge middleware layer, it performs data integrity verification, calculates the SHA-256 hash value of the request data. If the data is complete and valid, it updates the user information in the database and returns a gRPC response message indicating successful update.

[0010] S4. The API gateway converts the gRPC response message back to the HTTP format and returns it to the requesting system.

[0011] Furthermore, the requesting system and the receiving system use different communication protocols. The requesting system communicates based on the HTTP REST API interface, and the receiving system communicates based on the gRPC interface. And the communication process follows identity authentication and data integrity verification.

[0012] Furthermore, the UniBridge middleware layer incorporates an API gateway, a message queue, identity authentication, security encryption, and intelligent traffic control for requesting systems and receiving systems with different communication protocols.

[0013] Furthermore, the UniBridge middleware layer adopts a microservices architecture, and its core components include: a protocol gateway component, a security center component, a traffic optimizer component, an asynchronous processor component, a data optimizer component, and an observability module component.

[0014] Furthermore, the protocol gateway component is used for dynamic protocol conversion, including: conversion between the HTTP protocol and the gRPC protocol, conversion between the WebSocket protocol and the MQTT protocol, and conversion between the REST API protocol and the AMQP protocol;

[0015] The security center component incorporates the OAuth 2.0 protocol to achieve cross-system secure access, is encrypted by TLS 1.3 to prevent man-in-the-middle attacks during communication, and uses SHA-256 data integrity verification to attach a hash signature during transmission to ensure that the information has not been tampered with;

[0016] The traffic optimizer component is used for AI-driven traffic optimization, and uses machine learning models for traffic analysis, including: intelligent load balancing, anomaly detection, and dynamic rate limiting;

[0017] The asynchronous processor component incorporates a Kafka / RabbitMQ message queue to achieve asynchronous task processing, automatic retry, and transaction consistency;

[0018] The data optimizer component incorporates gzip / zstd data compression, incremental transmission, and edge caching to reduce network transmission overhead.

[0019] Further, when the request sent by the request system to the receiving system is in asynchronous mode, the specific steps include:

[0020] The request system calls the HTTP interface of the API gateway in the UniBridge middleware layer to submit a user update request to the receiving system;

[0021] After the API gateway verifies the identity and performs data integrity verification, it pushes the data to the user-update-topic message queue of Kafka;

[0022] The receiving system obtains new messages in real time through the user-update-topic message queue. After the receiving system reads the messages, it performs data integrity verification. After the verification passes, it executes the database update operation;

[0023] The request system periodically queries the status query interface of the API gateway or obtains the processing result through the user-update-topic message queue.

[0024] Further, in the data integrity verification, if the data verification fails, that is, the receiving system finds that the received data hash value does not match, it rejects the processing and returns an error message. The API gateway triggers an automatic retry and re-informs the request system to send the correct data; if the receiving system cannot complete the update due to database exceptions, the API gateway stores the failed request in the Redis queue and resends it after waiting for a time threshold. After receiving the failure notice, the request system chooses to retry manually.

[0025] Further, in the UniBridge middleware layer, in synchronous or asynchronous mode, if high-frequency data transmission occurs, gzip or zstd compression can be used to reduce resource consumption; and Nginx + Kubernetes is used to ensure the horizontal expansion of multiple API gateways to handle high-concurrency requests.

[0026] According to the second aspect of the present invention, a computer program product is proposed, on which one or more computer programs are stored. When the one or more computer programs are executed by a computer processor, the above method is implemented.

[0027] According to the third aspect of the present invention, a computer system is proposed, including a processor and a memory, and the processor is configured to implement the above method when executed.

[0028] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0029] 1. Strong protocol unity and compatibility: Through the introduction of the middleware layer, seamless docking between multiple protocols can be achieved, simplifying the configuration and management of the system.

[0030] 2. Safe and reliable: Adopting the OAuth 2.0 / SAML authentication mechanism and TLS encryption technology effectively guarantees the security and integrity of data during cross - domain transmission.

[0031] 3. Efficient data processing and transmission: The use of a distributed architecture and the Kafka streaming processing framework greatly improves data transmission efficiency and supports high - frequency and high - concurrency request processing.

[0032] 4. Low bandwidth consumption: The combination of data compression and incremental transmission technology greatly reduces bandwidth consumption and improves transmission efficiency.

[0033] 5. High scalability: The system can flexibly handle different data volumes, network topologies, and business requirements, and has good scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate the embodiments and, together with the description, are used to explain the principles of the invention. Other embodiments and many of the intended advantages of the embodiments will be readily apparent as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale relative to each other. Like reference numerals refer to corresponding like parts.

[0035] Figure 1 A flowchart showing a high - frequency data transmission and cross - domain authentication method based on a middleware layer according to an embodiment of the present invention is shown.

[0036] Figure 2 A schematic diagram of the UniBridge middleware layer architecture according to an embodiment of the present invention is shown.

[0037] Figure 3 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the relevant invention and not for limiting the invention. It should also be noted that, for the sake of description, only parts related to the relevant invention are shown in the drawings.

[0039] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and embodiments.

[0040] Figure 1The figure shows a schematic flow diagram of a high-frequency data transmission and cross-domain authentication method based on a middleware layer according to an embodiment of the present invention, as Figure 1 shown below:

[0041] When the requesting system sends a user information update request to the receiving system and is in the synchronous mode, the specific steps are as follows:

[0042] S1. The requesting system calls the HTTP interface of the API gateway in the UniBridge middleware layer to send user update data in JSON format, along with an OAuth 2.0 authorization token;

[0043] The reference code of the embodiment is as follows:

[0044] POST https: / / api-gateway.com / updateUser

[0045] Headers:

[0046] Authorization: Bearer<access_token>

[0047] Content-Type: application / json

[0048] Body:

[0049] {

[0050] "userId": "12345",

[0051] "name": "Alice",

[0052] "email": "alice@example.com"

[0053] }

[0054] S2. The API gateway authenticates the OAuth 2.0, converts the HTTP request into the gRPC format, and transmits the request to the receiving system through TLS encrypted parameters request and SHA-256 hash signature;

[0055] The reference code of the embodiment is as follows:

[0056] gRPC Request:

[0057] {

[0058] "user_id": "12345",

[0059] "name": "Alice",

[0060] "email": "alice@example.com",

[0061] "hash": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"

[0062] }

[0063] S3. After the receiving system receives the gRPC request forwarded by the API gateway of the UniBridge middleware layer, it performs data integrity verification, calculates the SHA-256 hash value of the request data. If the data is complete and valid, it updates the user information in the database and returns a gRPC response message indicating successful update;

[0064] After success, the receiving system returns a response as follows:

[0065] gRPC Response:

[0066] {

[0067] "status": "success",

[0068] "message": "User updated"

[0069] }

[0070] S4. The said API gateway converts the gRPC response message back to the HTTP format and returns it to the requesting system.

[0071] The reference code for the embodiment is as follows:

[0072] HTTP Response:

[0073] {

[0074] "status": "success",

[0075] "message": "User updated"

[0076] }

[0077] When the requesting system needs to batch send data update requests and does not want to wait for the immediate response of the receiving system, asynchronous communication is implemented using a message queue. The specific steps are as follows:

[0078] Step 1. The requesting system calls the HTTP interface of the API gateway of the UniBridge middleware layer to submit a user update request to the receiving system;

[0079] Step 2: After the API gateway verifies the identity and performs data integrity verification, instead of directly calling the receiving system, it pushes the data to the user-update-topic message queue of Kafka;

[0080] The reference code for the embodiment is as follows:

[0081] Kafka Message:

[0082] {

[0083] "userId": "12345",

[0084] "name": "Alice",

[0085] "email": "alice@example.com",

[0086] "hash": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"

[0087] }

[0088] Step 3: The receiving system retrieves new messages in real time through the user-update-topic message queue. After the receiving system reads the messages, it performs data integrity verification. After the verification passes, it executes the database update operation;

[0089] Step 4: The requesting system periodically queries the status query interface of the API gateway or obtains the processing result through the user-update-topic message queue.

[0090] The reference code for the embodiment is as follows:

[0091] GET https: / / api-gateway.com / updateUser / status?requestId=xyz123

[0092] Response:

[0093] {

[0094] "status": "completed",

[0095] "message": "User updated successfully"

[0096] }

[0097] Whether it is synchronous mode communication or asynchronous mode communication, if the data integrity check fails, that is, the receiving system finds that the received data hash value does not match, it will reject the processing and return an error message. The API gateway triggers an automatic retry and re-informs the requesting system to send the correct data. If the receiving system fails to complete the update due to database exceptions, the API gateway stores the failed requests in the Redis queue and resends them after waiting for a time threshold. The requesting system receives the failure notice and chooses to retry manually.

[0098] For high-frequency data transmission, gzip or zstd compression can be used to reduce resource consumption; and Nginx + Kubernetes is used to ensure the horizontal expansion of multiple API gateways to handle high-concurrency requests.

[0099] The above-mentioned requesting system and receiving system adopt different communication protocols. The requesting system provides an HTTP REST API interface, and the receiving system communicates based on the gRPC interface, and requires identity authentication and data integrity verification.

[0100] Based on the above process steps, the UniBridge middleware layer is further introduced as Figure 2 shown Figure 2 shows a schematic diagram of the UniBridge middleware layer architecture according to an embodiment of the present invention, and the specific content is as follows:

[0101] The UniBridge middleware layer is an intelligent middleware layer for distributed systems, designed specifically for cross-protocol conversion, security authentication, and efficient data transmission. It integrates functions such as API gateways, message queues, identity authentication, security encryption, and intelligent traffic control, and can seamlessly connect the requesting system and receiving system of different protocols to ensure the stability, security, and efficiency of data transmission.

[0102] The UniBridge middleware layer of the present invention adopts a microservices architecture, and its core components include: protocol gateway component, security center component, traffic optimizer component, asynchronous processor component, data optimizer component, and observability module component. The independent functions are distributed as shown in Table 1:

[0103] Table 1 Microservices Architecture Components

[0104]

[0105] The key functions of the UniBridge middleware layer include: intelligent protocol conversion, security authentication and encryption, AI-driven traffic optimization, asynchronous message queue, and data optimization.

[0106] ① The protocol gateway component is used for dynamic protocol conversion, including but not limited to:

[0107] HTTP Protocol and gRPC Protocol Conversion: The request system sends an HTTP request, and UniBridge automatically converts it into a gRPC call to adapt to the receiving system.

[0108] WebSocket Protocol and MQTT Protocol Conversion: Supports low-latency two-way communication for IoT devices.

[0109] Conversion between REST API Protocol and AMQP Protocol: Intelligently switches between synchronous and asynchronous communication;

[0110] For example, the request system (HTTP) UniBridge Receiving system (gRPC):

[0111] The HTTP format of the request system is as follows:

[0112] POST https: / / unibridge.com / updateUser

[0113] Headers:

[0114] Authorization: Bearer <token>

[0115] Content-Type: application / json

[0116] Body:

[0117] {

[0118] "userId": "12345",

[0119] "name": "Alice",

[0120] "email": "alice@example.com"

[0121] }

[0122] gRPC format after UniBridge conversion:

[0123] message UpdateUserRequest {

[0124] string user_id = 1;

[0125] string name = 2;

[0126] string email = 3;

[0127] string hash = 4;

[0128] }

[0129] ② The security center component implements cross-system secure access by integrating the OAuth 2.0 protocol. Communication is protected from man-in-the-middle attacks by TLS 1.3 encryption, and data integrity verification using SHA-256 is employed to append a hash signature during transmission, ensuring that the information has not been tampered with.

[0130] UniBridge recalculates the hash value for verification upon reception. If there is a mismatch, the request is rejected.

[0131] ③ The traffic optimizer component is used for AI-driven traffic optimization. It conducts traffic analysis using machine learning models, and its specific functions include:

[0132] Intelligent load balancing: Automatically selects the optimal nodes, such as Nginx or Kubernetes; distributes traffic, where Nginx reverse proxy: Based on strategies such as round-robin, least connections, IP hash, etc.; distributes request loads, and Kubernetes auto-scaling: Dynamically expands or contracts based on CPU / memory load conditions.

[0133] Anomaly Detection: Detect DDoS attacks and abnormal request traffic, and automatically adjust policies.

[0134] Dynamic Rate Limiting: Adjust the request rate according to the real-time load to prevent system overload;

[0135] For example, in load-based traffic distribution, when the traffic is low, API requests are directly forwarded to the receiving system. When the traffic is high, some requests are automatically sent to the Kafka queue for delayed processing to reduce system pressure.

[0136] ④ The asynchronous processor component has a built-in Kafka or RabbitMQ message queue, including an event-driven architecture to implement the producer-consumer pattern, improving the system decoupling ability. The specific functions also include:

[0137] Asynchronous Task Processing: Requests from the requesting system are deposited into Kafka, and the receiving system consumes them asynchronously to reduce blocking.

[0138] Automatic Retry: If the receiving system is down, UniBridge will periodically retry the request until it succeeds.

[0139] Transaction Consistency: Combine with the idempotency mechanism to avoid duplicate consumption;

[0140] For example: The requesting system submits data, UniBridge deposits it into the Kafka queue, the receiving system consumes the data from Kafka and returns the result, and the result is deposited into the Redis cache. The requesting system can query the processing status.

[0141] ⑤ The data optimizer component reduces network transmission overhead. The specific functions include:

[0142] gzip / zstd Data Compression: Reduce the amount of data transmitted and improve throughput.

[0143] Incremental Transmission: Only send the changed parts to avoid full updates.

[0144] Edge Caching: Reduce repeated calculations and improve response speed.

[0145] In some business embodiments, such as high-concurrency e-commerce or financial systems, it is necessary for the system to dynamically predict which data needs to be cached preferentially under high load, so as to improve the cache hit rate. At this time, the UniBridge middleware layer introduces and enables a quantum cache acceleration component. The implementation steps include: UniBridge records the data access history, constructs an access frequency model in combination with machine learning, calculates the optimal cache policy according to the historical access trend, ensures that high-frequency data is always retained, and automatically promotes the suddenly increased hot data to the ultra-high-speed cache layer. In this way, the traditional fixed LRU algorithm is abandoned, which causes premature elimination of hot data. The quantum cache acceleration component can intelligently predict data requirements and pre-cache data that may have a high access volume in the future.

[0146] Among them, the quantum cache acceleration component adopts a three-level cache framework, including L1 ultra-high-speed cache, L2 edge intelligent cache, and L3 distributed long-term cache. For example, when the request system requests data from the receiving system, the quantum cache acceleration component automatically determines which cache layer to store the data in, reducing the number of database accesses. If the access frequency of a certain data suddenly increases (such as a product flash sale event), the quantum cache acceleration component will intelligently upgrade the cache level, from L3 to L1, to improve the access speed. Similarly, when caching data, security authentication and encryption are observed, and encryption verification is used to prevent cache pollution or tampering.

[0147] The unified middleware will bring the risk of single-point failure. For example, in the global e-commerce platform, System A and System B need to synchronize inventory, orders, and user data in real time, and all API requests are processed through the middleware UniBridge. If there is a problem with the middleware UniBridge, it will cause the data synchronization to be interrupted.

[0148] Therefore, when necessary, the middleware UniBridge enables the Raft consensus algorithm. When the UniBridge of System A fails, System B can automatically take over the data synchronization; the Kafka framework in UniBridge will also store the data through the message queue when a node fails and automatically process the unprocessed data after the failure is recovered.

[0149] In summary, as a new type of middleware layer, UniBridge breaks through the limitations of traditional API gateways, integrates intelligent protocol conversion, security authentication, traffic optimization, asynchronous message processing, and data optimization, and is applicable to high-concurrency, large-scale distributed systems, which can improve the efficiency, security, and stability of cross-system communication. The usage scenarios include: enterprise-level microservice architecture: microservice communication across multiple protocols and multiple languages. Large-scale IoT device communication: low-latency, high-throughput data transmission optimization. Financial security system: payment and transaction systems with high security and data integrity verification. High-concurrency e-commerce platform: automatic load balancing and asynchronous processing of order data.

[0150] Refer to the following Figure 3 , which shows a schematic structural diagram of a computer system 300 of an electronic device suitable for implementing the embodiments of the present application. Figure 3 The shown electronic device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0151] As Figure 3 shown, the computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 302 or the programs loaded from the storage section 308 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the system 300 are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.

[0152] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read from it can be installed into the storage section 308 as needed.

[0153] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0154] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, Matlab, Labview, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0156] The modules described in the embodiments of this application can be implemented in software or in hardware.

[0157] As another aspect, the present application also provides a computer-readable storage medium. This computer-readable storage medium can be included in the electronic device described in the above embodiments; or it can exist alone without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: request the system to call the HTTP interface of the API gateway of the UniBridge middleware layer to send user update data in JSON format and attach an OAuth 2.0 authorization token; the API gateway authenticates the OAuth 2.0 and converts the HTTP request into gRPC format, and transmits the request to the receiving system through the TLS encryption parameter request and the SHA-256 hash signature; after receiving the gRPC request forwarded by the API gateway of the UniBridge middleware layer, the receiving system performs data integrity verification, calculates the SHA-256 hash value of the request data. If the data is complete and valid, it updates the user information in the database and returns a gRPC response message indicating successful update; the API gateway converts the gRPC response message back to HTTP format and returns it to the requesting system.

[0158] The above description is only a preferred embodiment of the present application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features with similar functions disclosed in the present application.< / token>

Claims

1. A high-frequency data transmission and cross-domain authentication method based on a middleware layer, characterized in that, It includes the following steps: S1. The requesting system calls the HTTP interface of the API gateway in the UniBridge middleware layer to send user update data in JSON format, along with an OAuth 2.0 authorization token. Here, the request sent by the requesting system to the receiving system is in synchronous mode; S2. The API gateway authenticates the OAuth 2.0, converts the HTTP request into gRPC format, and transmits the request to the receiving system through TLS encryption parameters request and SHA-256 hash signature; S3. After receiving the gRPC request forwarded by the API gateway in the UniBridge middleware layer, the receiving system performs data integrity verification, calculates the SHA-256 hash value of the request data. If the data is complete and valid, it updates the user information in the database and returns a gRPC response message indicating successful update; S4. The API gateway converts the gRPC response message back to HTTP format and returns it to the requesting system; The UniBridge middleware layer adopts a microservices architecture, and its core components include: protocol gateway component, security center component, traffic optimizer component, asynchronous processor component, data optimizer component, and observability module component; The protocol gateway component is used for dynamic protocol conversion, including: conversion between HTTP protocol and gRPC protocol, conversion between WebSocket protocol and MQTT protocol, and conversion between REST API protocol and AMQP protocol; The security center component builds in the OAuth 2.0 protocol to achieve cross-system secure access, uses TLS 1.3 encryption to prevent man-in-the-middle attacks during communication, and adopts SHA-256 data integrity verification to attach a hash signature during transmission; The traffic optimizer component is used for AI-driven traffic optimization, and uses machine learning models for traffic analysis, including: intelligent load balancing, anomaly detection, and dynamic rate limiting; The asynchronous processor component builds in Kafka / RabbitMQ message queues, including: asynchronous task processing, automatic retry, and transaction consistency; The data optimizer component builds in gzip / zstd data compression, incremental transmission, and edge caching.

2. The high-frequency data transmission and cross-domain authentication method according to claim 1, characterized in that The requesting system and the receiving system adopt different communication protocols. The requesting system communicates based on the HTTP REST API interface, and the receiving system communicates based on the gRPC interface. Moreover, authentication and data integrity verification are adopted during the communication process.

3. The high-frequency data transmission and cross-domain authentication method according to claim 1, wherein The UniBridge middleware layer builds in an API gateway, message queue, authentication, security encryption, and intelligent traffic control for requesting systems and receiving systems with different communication protocols.

4. The high-frequency data transmission and cross-domain authentication method according to claim 1, characterized in that When the request sent by the requesting system to the receiving system is in asynchronous mode, the specific steps include: The requesting system calls the HTTP interface of the API gateway in the UniBridge middleware layer to submit a user update request to the receiving system; After the API gateway verifies the identity and conducts data integrity verification, it pushes the data to the user-update-topic message queue of Kafka; The receiving system obtains new messages in real time through the user-update-topic message queue. After the receiving system reads the messages, it conducts data integrity verification. After the verification passes, it performs database update operations; The requesting system periodically queries the status query interface of the API gateway or obtains the processing result through the user-update-topic message queue.

5. The high-frequency data transmission and cross-domain authentication method according to claim 1 or 4, characterized in that In the data integrity verification, if the data verification fails, that is, the receiving system finds that the received data hash values do not match, it rejects the processing and returns an error message. The API gateway triggers an automatic retry and re-informs the requesting system to send the correct data; if the receiving system fails to complete the update due to database anomalies, the API gateway stores the failed requests in the Redis queue and resends them after waiting for a time threshold. The requesting system receives the failure notice and chooses to retry manually.

6. The high-frequency data transmission and cross-domain authentication method according to claim 1 or 4, characterized in that In the UniBridge middleware layer, in synchronous or asynchronous mode, if high-frequency data transmission occurs, gzip or zstd compression can be used to reduce resource consumption; and Nginx + Kubernetes is used to ensure the horizontal expansion of multiple API gateways to handle high-concurrency requests.

7. A computer program product, characterized in that, It stores a computer program, and the computer program, when executed by a processor, implements the method according to any one of claims 1-6.

8. A computing system, characterized in that, It includes a processor and a memory, and the processor is configured to execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Semantic conversion method of edge layer in industrial internet and middleware

    CN110399612A

  • Industrial internet protocol conversion system and method based on middleware

    CN117176825A