A micro-service-based multi-protocol protocol conversion method and system
By adopting a microservice-based architecture, a multi-protocol conversion method and system were implemented, which solved the problem that existing systems could not convert protocols independently. It provides a flexible and scalable protocol conversion solution, reduces development and maintenance costs, and improves data transmission efficiency and system stability.
Patent Information
- Application Number
- CN202310377800.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-04-11
AI Technical Summary
Existing multi-protocol conversion systems cannot autonomously convert communication protocols, leading to difficulties and increased costs in application development and maintenance, and are unable to handle changes between various communication protocols.
It adopts a microservice-based architecture, and through a microservice gateway, a central processing unit module, a business logic processing engine, a data transformation module and a monitoring system, it realizes multi-protocol conversion and supports flexible conversion and dynamic updates between multiple protocols.
It enables fast and accurate data transmission between different protocols, provides efficient and stable conversion services, has strong compatibility, good flexibility and scalability, supports real-time analysis and processing, and reduces system development and maintenance costs.
Smart Images

Figure CN116346948B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for multi-protocol conversion based on microservices, and particularly to the problem of protocol conversion between different protocols. Background Technology
[0002] In recent years, mobile communication technology has developed rapidly, exhibiting trends of diversification and complexity. From 2G to 5G, wireless transmission technology has continuously upgraded, and bandwidth has increased, making wireless communication the dominant force in today's communication industry. However, the protocol specifications used are constantly changing in different communication environments. Protocol specifications in mobile communication technology are the common standards that different devices (such as mobile phones, sensors, industrial control equipment, servers, etc.) must follow when communicating. These standards include IP, TCP, HTTP, UDP, FTP, and others. However, because the protocol specifications of different devices may differ, even if they can connect, they may not be able to communicate properly. With the rapid development of mobile communication technology, the unification and standardization of protocol specifications has become an urgent need.
[0003] In traditional data communication systems, all devices transmitting data use the same protocol specifications to ensure error-free information transmission. However, in a multi-protocol network environment, devices may use different protocol types and versions, leading to data transmission failures between different devices. This is where multi-protocol conversion systems come in, enabling data conversion between different protocols and facilitating data transmission and processing between devices. However, existing multi-protocol conversion systems cannot autonomously perform communication protocol conversion, which limits the development of various application areas. Currently, most multi-protocol conversion systems on the market solve communication problems by privately exchanging information data. However, they cannot handle changes between various communication protocols or perform conversions between different protocols. Whenever protocol conversion is required, the problem must be handled by system developers, making application development and maintenance extremely difficult and rapidly increasing costs.
[0004] To address the issue of existing multi-protocol conversion systems' inability to autonomously perform communication protocol conversion, we propose a microservice-based multi-protocol conversion method and system. This system supports conversion of various protocol types, such as TCP / IP, HTTP / HTTPS, WebSocket, and MQTT, enabling data packets to be freely converted between different protocols for fast and accurate data transmission. It supports dynamic updates and expansion of various protocol parsing programs. The method and system employ a microservice architecture, allowing for real-time updates or expansion of communication protocol parsing programs based on user or system requirements. It supports real-time analysis and processing of data packets with different protocols. The data analysis and parsing microservice analyzes and processes data packets of different protocols in real time, converting them into a unified data format that the system can process for subsequent operations. It provides efficient and stable conversion microservices. These microservices convert parsed data packets of different protocol protocols into the target protocol protocol through appropriate data format and protocol conversion for subsequent data transmission and processing. This method and system offer strong compatibility, high reliability, and stable and efficient conversion services. Summary of the Invention
[0005] In real-world applications, communication between different protocols has become increasingly common. On the one hand, traditional implementation methods typically employ static compilation or runtime parsing, lacking flexibility. On the other hand, as application scenarios change, protocol conversion requires continuous adjustment and improvement, which traditional methods often struggle to achieve. To address these issues, this invention provides a microservice-based multi-protocol conversion method and system. This method efficiently converts between different protocols, offering good flexibility and scalability. Furthermore, this invention also provides a system for implementing this protocol conversion method.
[0006] Firstly, this application provides a multi-protocol conversion method based on microservices, employing the following technical solution:
[0007] The messaging client establishes a connection with the microservice gateway and sends data to the microservice gateway.
[0008] After being scheduled by the central processing unit module, the data is converted into the target protocol, the business logic processing engine is called, and the matching rules are found, the rule-based operations are performed, and the data is persisted to the cache layer. If the rule content changes, the cache is optimized and updated to complete the generation and storage of preprocessed data.
[0009] Data transformation is performed according to the rule table. The input data undergoes multiple rounds of data transformation to become the final target format data, and then the data is cached.
[0010] Output the converted data to the target protocol;
[0011] The target protocol is sent to the target end through the network port;
[0012] The monitoring system collects information on the transformation of microservices and performs comprehensive monitoring and optimization.
[0013] By adopting the above technical solution, this method consists of multiple microservices, each responsible for implementing a specific function, including supporting data conversion between multiple application protocols (such as HTTP, SOAP, RESTful, etc.); using a business logic processing engine to execute rules, which can automatically select the corresponding conversion rules according to the needs of the scenario; including a central scheduler module to coordinate the data interaction between various microservices; and adopting a microservice architecture, where each microservice is independent and supports elastic scaling, thereby improving conversion efficiency.
[0014] The messaging client and the microservice gateway exchange data and interact, establishing a connection. The messaging client refers to a terminal (client, server, etc.) in a user or other system. The microservice gateway is an API gateway responsible for accepting requests from the messaging client over the network and forwarding them to the central processing unit (CPU) module for processing. As a unified entry point, the microservice gateway can perform filtering and authentication operations on requests.
[0015] The central processing unit (CPU) module is the hub of the entire system. It is responsible for scheduling components such as data transformation and business logic processing engines, and returning the processing results to the microservice gateway. Its main functions include distributing data streams to designated microservices and implementing data stream transformation; monitoring microservice status, automatically adjusting the number of microservices, and optimizing service load; and providing configurable traffic control to prevent system crashes due to excessive pressure. Specifically, upon receiving a request from the microservice gateway, the CPU module decomposes and parses the request, identifies the corresponding business processing engine and rule matcher, and forwards the request to them for processing. After processing, the CPU module merges and integrates the results, performs format conversion as needed, and finally returns the result to the microservice gateway.
[0016] The business logic processing engine obtains corresponding transformation rules based on business scenario requirements, including but not limited to mapping tables, function closures, and regular expressions; it parses and preprocesses input data using data preprocessing techniques and caches the preprocessing results for efficient rule matching to improve transformation efficiency; it constructs a data transformation model based on input data and transformation rules and automatically executes data transformation using data reflection technology; it provides data validation and error handling mechanisms and takes corresponding load adjustment measures based on actual application scenarios to improve system stability.
[0017] Data transformation and caching transforms input data according to business rules and logic, generating target protocol-related data, and caching the transformed data in a persistent cache layer. Specifically, the central processing unit module calls the rule matcher and passes request data. The rule matcher processes the request according to the rule table, including data transformation and data merging operations. This includes a format conversion microservice to convert the input data format to the format of a specific protocol for subsequent microservice processing; a semantic conversion microservice to map the semantics of input data to the semantics of different protocols for mutual conversion between multiple protocols; a structure conversion microservice to convert the structure of input data to the structure of the target protocol for structure matching between multiple protocols; and an old protocol to new protocol microservice to convert data from the old protocol to the new protocol to adapt to the evolution and upgrade of different protocols. Simultaneously, the processing results are cached in a persistent cache layer for subsequent processing.
[0018] The transformed data is output to the target protocol through the microservice gateway. Specifically, the microservice gateway passes the transformed data to the relevant components of the target protocol for processing. These components may include network transport protocols (such as TCP, HTTP, etc.) and data transmission tools (such as Kafka, RabbitMQ, etc.). After receiving the data, the target protocol caches it in the target system for subsequent business use and processing.
[0019] A monitoring system is a tool used to monitor the performance, bottlenecks, and faults of microservice architecture systems. During the microservice transformation, the monitoring system needs to collect information about the transformation, including inter-service call times and large-scale concurrency, analyze the collected information, perform comprehensive monitoring and optimization, promptly address any issues, and adjust the system in real time to improve performance and efficiency.
[0020] The above describes the data processing flow of the multi-protocol conversion method, which enables fast and accurate conversion of data between multiple protocols, and can be adjusted and optimized according to system requirements.
[0021] Secondly, this application provides a microservice-based multi-protocol conversion system, which adopts the following technical solution:
[0022] Microservice Gateway: As the entry point for the multi-protocol conversion system, the microservice gateway is responsible for handling connection status control, encryption / decryption, access mechanism control, and data quality detection for various data sources. Its main functions include connection management, maintaining the connection status with each data source, including establishing, closing, and monitoring connections; security control mechanisms, supporting multiple encryption / decryption algorithms to encrypt and store sensitive information during transmission to ensure data security; access control mechanisms, establishing user authentication and access control mechanisms to ensure system security; and data monitoring and traffic limiting mechanisms, monitoring and limiting requests to prevent DDoS attacks and improve system fault tolerance.
[0023] The central scheduler module coordinates data transmission and interaction between microservices, implementing data transformation and flow control. Its main functions include service registration and discovery (all microservices register with the central scheduler upon startup, which maintains microservice information and enables dynamic service discovery and invocation); load balancing (dynamically allocating tasks to microservices based on system load to ensure efficient system operation); and data routing (routing data to the appropriate microservices for processing based on its source and destination).
[0024] Business logic processing engine: The core component that makes decisions and executes specific rules for data transformation between various protocols. Its main functions include a rules engine, which determines the data transformation process and results based on preset transformation rules; and an execution engine, which executes specific data transformation operations based on the decisions made by the rules engine.
[0025] Data Conversion Module: Responsible for unifying the format conversion of data between various protocol formats, thereby achieving data interoperability. Main functions include: protocol adaptation (supporting multiple data protocols, including but not limited to XML, JSON, CSV, etc.); data mapping (mapping attribute values of source data to attribute values of target data according to preset mapping rules); and data conversion (converting source data to the requirements of the target data protocol, including data type conversion and encoding conversion.)
[0026] The caching module includes preprocessing caching and transformation result caching to support flow control and efficient rule matching. Its main functions include preprocessing caching, which caches received raw data to reduce the risk of data loss; and transformation result caching, which caches transformed data for subsequent business logic processing and to improve data processing speed.
[0027] Dynamic scaling module: Elastically scales the number of microservices and hardware resources based on peak traffic and the availability of infrastructure resources, ensuring system stability and responsiveness. Key functions include resource monitoring (real-time monitoring of system resource usage, including CPU, memory, and network); and elastic scaling (dynamically adjusting the number of microservices and hardware resources based on monitoring data to adapt to different business needs).
[0028] Infrastructure module: This module includes storage devices, computing devices, network devices, and the monitoring and management of the infrastructure to ensure stable and efficient system operation. Key functions include resource management (unified management of system hardware resources, including resource allocation, reclamation, and scheduling); monitoring and alarms (real-time monitoring of system operation status, timely alarms upon detecting anomalies to ensure stable system operation); and log management (recording system operation logs, running logs, error logs, etc., for troubleshooting and performance optimization).
[0029] Thirdly, this application provides a computer device that adopts the following technical solution: it includes a memory, a processor, and a network. The memory stores a computer program that can be loaded and executed by the processor to perform a microservice-based multi-protocol conversion system as described above, and sends the converted information to the target end through the network.
[0030] By adopting the above technical solution, after receiving a protocol conversion request, the system generates expected information through protocol adaptation and conversion engine, and sends the information packet to the target end within a preset time limit.
[0031] Fourthly, this application provides a high-speed cache storage medium, which adopts the following technical solution: the storage medium caches protocol data to be processed and distributed to support flow control and efficient matching rules, thereby improving system efficiency and stability.
[0032] By adopting the above technical solution, after receiving the protocol data, the system first caches the protocol data to be converted. The central processing unit module comprehensively schedules the business logic processing engine and the data conversion microservice to process the cached data. The converted data is then stored in the high-speed cache storage medium and sent to the target end through the infrastructure network, thereby improving the conversion efficiency.
[0033] In summary, this application includes at least one of the following beneficial technical effects:
[0034] 1. By adopting a microservice architecture, the reduction transformation operation is broken down into multiple smaller tasks, thereby enabling flexible combination of reduction transformations. This approach makes the reduction transformation operation more flexible, allowing it to be combined and split as needed.
[0035] 2. A universal protocol description language is adopted to unify the protocol descriptions across various protocols, thereby facilitating protocol conversion. This language can serve as a common language foundation for communication between different protocols, enabling better collaboration between different protocol conversion services.
[0036] 3. Provide a robust microservice collaboration mechanism to ensure the correctness and consistency of specification transformation. A good collaboration mechanism can resolve data exchange issues between specification transformation services and ensure data consistency among them.
[0037] 4. Provides a dynamic management mechanism that enables dynamic adjustment and management of microservices, ensuring efficient execution of specification transformation operations. Through this dynamic management mechanism, microservices can be optimized, upgraded, added, or deleted based on actual needs, thereby improving the efficiency and reliability of specification transformation operations. Attached Figure Description
[0038] Figure 1 This is a flowchart of a microservice-based multi-protocol conversion method in an embodiment of this application.
[0039] Figure 2 This is a structural block diagram of a microservice-based multi-protocol conversion system in an embodiment of this application.
[0040] Figure labeling: 201, Microservice Gateway; 202, Data Transformation Module; 203, Business Logic Processing Engine; 204, Central Scheduler Module; 205, Caching Module; 206, Dynamic Expansion Module; 207, Infrastructure Module. Detailed Implementation
[0041] The following is in conjunction with the appendix Figure 1-2 This application will be described in further detail.
[0042] This application discloses a multi-protocol conversion method based on microservices. The method is based on a multi-protocol conversion system that adopts a microservice architecture. The system receives data sent by the message terminal through the microservice gateway, the central processing unit module calls the business logic processing engine to find matching rules and perform rule-based operations, persists the data to the cache layer, the data conversion module converts the data into target protocol data, and the target protocol data is sent to the target terminal through network routing. The method also detects and dynamically optimizes the entire processing process.
[0043] like Figure 1 As shown, the method includes the following steps:
[0044] S100, the messaging client establishes a connection with the microservice gateway.
[0045] Specifically, the microservice gateway and messaging client implement functions such as connection management, security control mechanisms, access control mechanisms, data monitoring, and traffic limiting mechanisms. For connection management, NIO frameworks such as Netty are used to achieve efficient asynchronous I / O processing and ensure connection cycle and status monitoring. For security control mechanisms, TLS / SSL encryption algorithms are used to ensure data security, while standard authorization protocols such as OAuth 2.0 are used to implement identity authentication and access control mechanisms. For data monitoring and traffic limiting mechanisms, by monitoring microservices and collecting metrics for various services, data monitoring and prevention of DDoS attacks are achieved.
[0046] Based on business scenarios and invocation methods, the system provides APIs for establishing and disconnecting connections, as well as connection status monitoring for connection management; for security control mechanisms, it provides APIs for encryption and decryption, as well as identity and authentication; and for data monitoring and traffic limiting mechanisms, it provides APIs for monitoring and limiting. This microservice gateway ensures data source connection status control, encryption / decryption, access mechanism control, and data quality detection capabilities, guaranteeing system security and performance, and providing support and acceleration for subsequent multi-protocol conversions.
[0047] S200, the central processing unit module schedules relevant microservices and caches data.
[0048] The central scheduler module implements capabilities such as service registration and discovery, load balancing, and data routing. Service registration and discovery: In a microservice architecture, each microservice needs to register with the central scheduler, providing its own metadata information, such as IP address, port number, and service name. Based on this information, the central scheduler maintains a list of service instances. Specifically, when a microservice starts, it sends a registration request to the central scheduler, including the necessary metadata information; upon receiving the registration request, the central scheduler adds it to the service instance list and assigns a unique identifier to each service instance; the central scheduler periodically checks the health status of service instances to ensure their availability.
[0049] The service discovery process involves the following steps: when a client or other microservice needs to call a service, it sends a service discovery request to the central scheduler, including the name of the required service; the central scheduler searches for the corresponding service instance in the service instance list based on the service name and returns its metadata information; the client or other microservice communicates directly with the target service instance based on the returned metadata information.
[0050] To ensure efficient system operation, the central scheduler needs to implement load balancing, dynamically distributing tasks to various microservices. The load balancing implementation steps are as follows: Round-robin: The central scheduler distributes requests sequentially to service instances, returning to the first instance after reaching the last one; Weighted round-robin: Requests are allocated based on the weight of each service instance. The weight can be dynamically adjusted based on the service instance's performance, load, and other factors; Least connections: Requests are distributed to the service instance with the fewest current connections to ensure efficient resource utilization.
[0051] The data routing implementation strategy requires the central scheduler to route data to the appropriate microservices for processing based on the data's source and destination. The data routing process involves the client or other microservice sending a data request to the central scheduler, providing both the data source and destination information; the central scheduler searching for the corresponding service instance in its service instance list based on the data source and destination information; the central scheduler forwarding the data request to the found service instance and waiting for the processing result; and the service instance processing the data and returning the result to the central scheduler.
[0052] S300, the business logic processing engine performs regulation matching.
[0053] The business logic processing engine is a key component used for decision-making and execution of data transformations between various protocols. To implement this engine, we designed and implemented the rules engine and the execution engine separately.
[0054] The rules engine is the core component of the business logic processing engine, responsible for deciding the process and result of data transformation based on predefined transformation rules. The implementation steps of the rules engine include: rule definition (first, defining data transformation rules, including the source protocol, target protocol, and transformation rules; these rules can be stored and managed using formats such as XML and JSON); rule loading (the rules engine needs to provide a module responsible for loading and parsing the stored transformation rules; the rule loading module loads the rules into memory at startup for fast access); rule matching (when a data transformation request is received, the rules engine needs to match the source and target protocols against the rules in the memory set to find the corresponding transformation rule); and decision result (the rules engine generates a decision result based on the matched rules, including the specific steps of data transformation, required resources, etc.). The decision result is then passed to the execution engine for the actual data transformation operation.
[0055] The execution engine is responsible for performing specific data transformation operations based on the decision results of the rule engine. The execution engine's implementation steps are as follows: Resource preparation: Based on the decision results, the execution engine needs to prepare necessary resources, such as loading required libraries and initializing transformation tools; Data preprocessing: Before performing the actual data transformation, the execution engine needs to preprocess the raw data, such as removing whitespace characters and validating data formats; Data transformation: According to the specific steps in the decision results, the execution engine performs data transformation, including data structure transformation, data format transformation, and data unit transformation. During this process, the execution engine needs to handle various exceptions, such as data format errors and transformation failures; Data post-processing: After the transformation is complete, the execution engine needs to perform data post-processing, such as adding validation information and formatting the output; Result return: The execution engine returns the transformed data to the requester, while simultaneously updating the transformation log and statistical information.
[0056] S400 performs data transformation according to the rule table.
[0057] The data conversion module is one of the core components of the system, responsible for achieving unified data format conversion between various protocol formats to enable data interoperability. Specific implementation methods include protocol adaptation, data mapping, data conversion, and exception handling.
[0058] The data conversion module needs to support multiple data protocols, including but not limited to XML, JSON, and CSV. To achieve protocol adaptation, the processing logic for each data protocol is encapsulated into an independent module, adhering to the design principle of high cohesion and low coupling. This allows for easy addition or removal of protocol support, improving system maintainability and scalability. A unified interface is defined for all protocol processing modules, including data parsing and data serialization operations. This decouples the data conversion module from specific protocol processing logic, facilitating future upgrades or replacements.
[0059] Data mapping primarily maps attribute values from source data to attribute values from target data based on preset mapping rules. The steps to implement data mapping are: 1) Mapping rule definition: First, the data mapping rules need to be defined, including the attribute correspondence between source and target data. Mapping rules can be stored and managed using formats such as XML and JSON. 2) Mapping rule loading: The data conversion module needs to provide a module responsible for loading and parsing the stored mapping rules. The mapping rule loading module loads the rules into memory at startup for fast access. 3) Attribute mapping: During data conversion, attribute values from source data are mapped to attribute values from target data according to the loaded mapping rules. This process needs to handle various exceptions, such as missing data or type mismatches.
[0060] Data conversion primarily involves transforming source data according to the requirements of the target data protocol, including data type conversion and encoding conversion. The steps for data conversion are: data parsing, which calls the corresponding protocol processing module to parse the source data into an internally unified data structure, ensuring that subsequent data mapping and conversion operations are independent of the specific data protocol; data mapping and conversion, which maps the attribute values of the source data to the attribute values of the target data according to the steps in the data mapping function, and performs necessary data type conversion and encoding conversion; and data serialization, which calls the corresponding protocol processing module to serialize the internally unified data structure into the target data format. This ensures that the data can be correctly parsed and processed in the target system.
[0061] Exception handling. Exception handling is required at each stage of the data transformation module. When an exception occurs, detailed error information should be recorded, and appropriate measures should be taken according to the exception type, such as retrying or rolling back. At the same time, the exception information should be notified to relevant personnel for timely handling.
[0062] The S500 buffers the converted target protocol data and then sends it.
[0063] The cache includes preprocessing caching, which caches the received raw data to reduce the risk of data loss; and transformation result caching, which caches the transformed data to facilitate subsequent business logic processing and improve data processing speed. This section focuses on defining caching strategies. Based on system requirements and resource constraints, caching strategies can be selected based on factors such as time, capacity, and access frequency. For example, a cache expiration period can be set, and items can be automatically cleared after expiration; or a cache capacity limit can be set, and cached items will be evicted according to a certain strategy (such as Least Recently Used, LRU) when the limit is exceeded.
[0064] During data transformation, caching operations are required, including cache lookup. Upon receiving a transformation request, the cache is first checked to see if the target protocol data, already transformed, exists. If it exists, the data is retrieved directly from the cache without transformation. For cache update, if the target protocol data is not in the cache, data transformation is performed, and the transformed data is stored in the cache. Caching strategies need to be considered, such as expiration time and capacity limits. For cache deletion, in some cases, manual or automatic deletion of cached data may be necessary, such as data expiration or cache eviction.
[0065] Data transmission involves sending the target protocol data, retrieved from the cache or converted, to the requester. Data transmission can be synchronous or asynchronous, depending on the system's real-time requirements and performance metrics. Before sending data, operations such as data compression and encryption need to be considered to optimize transmission efficiency and ensure data security.
[0066] S600 detects and dynamically optimizes infrastructure.
[0067] Specifically, it involves real-time monitoring and management of infrastructure devices such as storage, computing, and network equipment to ensure stable and efficient system operation. Key features include: resource management (unified management of system hardware resources, including allocation, reclamation, and scheduling); monitoring and alarms (real-time monitoring of system operation status and timely alarms upon detecting anomalies to ensure stable operation); log management (recording system operation logs, running logs, and error logs for troubleshooting and performance optimization); and security protection (access control, data encryption, and intrusion detection).
[0068] Based on the above method, this application also discloses a microservice-based multi-protocol conversion system.
[0069] Combination Figure 2 The system includes the following modules:
[0070] Microservice gateway
[201] : Adopting a microservice architecture, it can automatically adapt the connection method according to the different communication protocols of the message end and the target end, and is responsible for microservices such as connection status control, encryption and decryption, access mechanism control and data quality detection of each data source;
[0071] Central Processing Unit Module
[202] : After receiving the message from Module
[201] , it acts as the central control center to coordinate the data transmission and interaction between various microservices, and realize data conversion and flow control;
[0072] Business logic processing engine
[203] : Based on the scheduling of module
[202] , the rule engine is started to adapt the protocol conversion logic and execute the engine for specific rules of data conversion between various protocols. The main functions include the rule engine, which decides the process and result of data conversion according to the preset conversion rules; and the execution engine, which executes specific data conversion operations according to the decision result of the rule engine.
[0073] Data conversion module
[204] : Based on the rule logic determined by module
[203] , the data conversion module is driven to work. This module is responsible for the microservice of converting data between various protocol formats into a unified format.
[0074] Cache module
[205] : Based on the processing of
[204] , it performs high-speed caching of various types of data in the processing process, including preprocessing cache and transformation result cache, to support flow control and efficient matching rules;
[0075] Dynamic expansion module
[206] : Based on the load intensity instructions and traffic peaks of
[204] and
[205] , the number of infrastructure resources can be elastically expanded to include microservices and hardware resources to ensure the stability and performance of the system;
[0076] Infrastructure module
[207] : A computer device that includes functions such as storage, computing, and networking, while providing monitoring, management and dynamic optimization of the operating environment to achieve stable and efficient operation of the system.
[0077] This application also discloses a computer device.
[0078] Specifically, the device includes a memory, a processor, and a network. The memory stores a computer program that can be loaded and executed by the processor to perform a microservice-based multi-protocol conversion system as described above, and sends the converted information to the target end via the network.
[0079] This application also discloses a computer cache storage medium.
[0080] Specifically, the computer cache storage medium stores computer programs that can be loaded and executed by the processor using the microservice-based multi-protocol conversion method described above. The computer read / write storage medium includes, for example, various media capable of storing program code, such as hard disks, read-only memory (ROM), and random access memory (RAM).
[0081] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A multi-protocol conversion method based on microservices, used for protocol conversion between different protocols. Its features include... The method includes: establishing a connection between the messaging client and the microservice gateway; scheduling relevant microservices and caching data using the central processing module; performing regulation matching by the business logic processing engine; transforming data according to a rule table; caching and sending the transformed target protocol data; and detecting and dynamically optimizing the infrastructure. The messaging client refers to a terminal in a user or other system. The microservice gateway is responsible for receiving requests from the messaging client over the network and passing them to the central processing module. The central processing module is responsible for scheduling the data transformation and business logic processing engine. The business logic processing engine obtains the corresponding transformation rules according to the business scenario requirements, parses and preprocesses the input data using data preprocessing techniques, and efficiently matches the rules. Data transformation and caching are integrated. The microservices for format conversion, semantic conversion, structural conversion, and old protocol to new protocol transformation convert input data according to business rules and logic, generating target protocol-related data. The converted data is then output to the target protocol through the microservice gateway. Specifically, the format conversion microservice converts the input data format to the format of a specific protocol; the semantic conversion microservice maps the semantics of the input data to the semantics of different protocols to achieve mutual conversion between multiple protocols; the structural conversion microservice converts the structure of the input data to the structure of the target protocol to achieve structural matching between multiple protocols; and the old protocol to new protocol microservice converts data from the old protocol to the data of the new protocol to adapt to the evolution and upgrade of different protocols.
2. In the multi-protocol conversion method based on microservices according to claim 1, the central scheduler module implements the following features: after receiving a request from the microservice gateway, the central processing unit module decomposes and parses the request, finds the corresponding business processing engine and rule matcher, and passes the request to them for processing respectively; after processing, the central processing unit module merges and integrates the processing results, and performs format conversion as needed.
3. In the microservice-based multi-protocol conversion method according to claim 1, the business logic processing engine implements the following features: obtains the corresponding conversion rules according to the business scenario requirements, parses and preprocesses the input data through data preprocessing technology, and caches the preprocessing results to efficiently match the rules; constructs a data conversion model according to the input data and conversion rules, and automatically executes the data conversion through data reflection technology.
4. In the microservice-based multi-protocol conversion method according to claim 1, the data conversion and caching transform the input data according to business rules and logic to achieve the following features: the central processing unit module calls the rule matcher and passes the request data, and the rule matcher processes the request according to the rule table, including data conversion and data merging operations.
5. A multi-protocol conversion system based on microservices as described in claim 1, the system comprising the following components: Microservice gateway [201]: responsible for connection status control, encryption / decryption, access mechanism control and data quality detection of each data source; Central scheduler module [202]: coordinates data transmission and interaction between various microservices, and realizes data conversion and flow control; Business logic processing engine [203]: An engine that makes decisions and executes specific rules for data conversion between various protocols; Data conversion module [204]: a microservice responsible for converting data between various protocol formats into a unified format; Cache module [205]: includes preprocessing cache and transformation result cache to support flow control and efficient matching rules; Dynamic scaling module [206]: Elastically scales the number of microservices and hardware resources based on peak traffic and the amount of infrastructure resources to ensure system stability and corresponding performance; Infrastructure module [207]: includes storage devices, computing devices, network devices, etc., as well as monitoring, operation and management of the infrastructure.
Citation Information
Patent Citations
Real-time microservice architecture
CN110572405A
Service processing method and device in service engine, storage medium and electronic equipment
CN110825457A
Enterprise-level micro-service management system and method
CN111130892A