WO2025241347A1 - Bus communication method and apparatus, and computer device and readable storage medium - Google Patents
Bus communication method and apparatus, and computer device and readable storage mediumInfo
- Publication number
- WO2025241347A1 WO2025241347A1 PCT/CN2024/115113 CN2024115113W WO2025241347A1 WO 2025241347 A1 WO2025241347 A1 WO 2025241347A1 CN 2024115113 W CN2024115113 W CN 2024115113W WO 2025241347 A1 WO2025241347 A1 WO 2025241347A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- plugin
- data
- gateway
- mqtt
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
Definitions
- This application relates to the field of communication technology, and in particular to a bus communication method, apparatus, computer equipment, and readable storage medium.
- a bus messaging system is a communication mechanism used to pass messages and data in distributed systems or microservice architectures.
- DBUS Desktop Bus
- IPC inter-process communication
- DBUS message bodies may contain complex data structures and parameters, which makes message parsing and processing relatively complicated, and makes it impossible to guarantee the quality of data transmission.
- this application provides a bus communication method applied to a bus server.
- the bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin.
- the method includes:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
- the plugin data is transmitted to the business platform through a second external interface.
- the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two;
- gateway plugin including:
- the corresponding business data for the business query request is retrieved from the business data provided by each business provider;
- the service data corresponding to the service query request is transmitted to the gateway plugin through the internal interface.
- the method further includes:
- the first MQTT request contains business identification information
- the first MQTT request will be used as the business query request corresponding to the gateway plugin.
- the service identification information includes the identifier of the target device corresponding to the service provider and the request. Type and related parameter information.
- the internal interface connects to at least two gateway plugins, and the service platform deploys at least two network interface card (NIC) devices; and
- NIC network interface card
- plugin data is transmitted to the business platform through a second external interface, including:
- the plugin data corresponding to the plugin query request is retrieved from the plugin data provided by each gateway plugin;
- the plugin data corresponding to the plugin query request is transmitted to the network card device through a second external interface.
- the method further includes:
- the second MQTT request contains plugin identification information
- the second MQTT request will be used as a plugin query request for the network interface device.
- the plugin data corresponding to the plugin query request is transmitted to the network interface device via a second external interface, including:
- the target plug-in data is transmitted to the network card device through a second external interface.
- the second external interface includes a network connection or communication port that supports the MQTT protocol.
- the routing address includes the physical address of the network interface card (NIC) device.
- NIC network interface card
- the routing address also includes the network interface card device's device account data.
- the MQTT protocol uses a publish/subscribe model.
- this application also provides a bus communication device applied to a bus server.
- the bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin.
- the device includes:
- the acquisition module used for the MQTT protocol, acquires business data published by the business provider through the first external interface
- the first internal transmission module is used to transmit business data to the gateway plugin through an internal interface
- the second internal transmission module is used to obtain plugin data transmitted by the gateway plugin through an internal interface; wherein, the plugin data is obtained based on business data processing;
- the sending module is used to transmit plugin data to the business platform via a second external interface based on the MQTT protocol.
- this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
- the plugin data is transmitted to the business platform through a second external interface.
- this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
- the plugin data is transmitted to the business platform through a second external interface.
- this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
- the plugin data is transmitted to the business platform through a second external interface.
- Figure 1 is an application environment diagram of the bus communication method in one embodiment of this application.
- FIG. 2 is a flowchart illustrating a bus communication method in one embodiment of this application.
- Figure 3 is a flowchart illustrating the steps of transmitting service data corresponding to a service query request to the gateway plugin in one embodiment of this application;
- Figure 4 is a flowchart illustrating the step of transmitting the plug-in data corresponding to the plug-in query request to the network card device through a second external interface in one embodiment of this application.
- Figure 5 is a flowchart illustrating the step of transmitting the plug-in data corresponding to the plug-in query request to the network card device through a second external interface in another embodiment of this application.
- Figure 6 is a structural block diagram of a bus communication device in one embodiment of this application.
- Figure 7 is an internal structural diagram of a computer device in one embodiment of this application.
- the bus communication method provided in this application embodiment can be applied to the application environment shown in Figure 1.
- the bus server includes a first external interface (A interface) for connecting to the service provider, a second external interface (B interface) for connecting to the service platform, and an internal interface for connecting to gateway plugins.
- Each gateway plugin may include a container management plugin, a control plugin, an FTTR (Fiber to the Room) control plugin, and a local web interface plugin.
- a bus communication method is provided. Taking the application of this method to the bus server in FIG1 as an example, the method includes the following steps 202 to 206. Wherein:
- Step 201 Based on the MQTT (Message Queuing Telemetry Transport) protocol, obtain the business data published by the service provider through the first external interface.
- MQTT Message Queuing Telemetry Transport
- the service provider can be an MQTT client or a vendor.
- the MQTT client (vendor) is the starting point for the data processing and transmission flow; it is responsible for publishing the service data generated by the device to the MQTT network for other systems to subscribe to and use.
- the service data generated by the device can include device status, sensor readings, and operational results.
- the vendor needs to ensure that the published data conforms to certain formats and standards so that other systems can correctly parse and use this data.
- MQTT Message Queuing Telemetry Transport
- MQTT uses a publish/subscribe model, meaning that clients can subscribe to specific topics and receive notifications when new messages are published on those topics. This model decouples message publishers and subscribers, so they do not need to be directly connected to each other or aware of each other's existence.
- a topic in the MQTT protocol is a string used to identify a message transmission channel.
- MQTT topics There is no strictly defined type for MQTT topics because they are string identifiers used to define a message transmission channel. Topics can be customized according to the application scenario to meet specific message delivery needs. For example, a topic... Questions can typically include the following types or naming conventions:
- command This type of topic is typically used to send control commands or instructions; 2) reply or response: This type of topic can be used when it is necessary to receive a reply or response after a command is executed; 3) report or status: This type of topic is often used for publishing device or system status reports; 4) config or settings: This type of topic may be used to send or receive configuration information.
- Step 202 Transmit business data to the gateway plugin through the internal interface.
- a gateway plugin is a software component installed on a gateway that has specific functions for processing, transforming, or monitoring data streams passing through the network gateway.
- a gateway plugin can process and transform data passing through the gateway.
- the plugin can perform operations such as encryption, compression, and format conversion to meet the data exchange needs between different systems.
- the internal interface is defined within the bus server and is used to transfer data between the server and the gateway plugin.
- the gateway plugin is typically integrated into or deployed on the bus server. When the gateway plugin starts, it establishes a connection with the bus server through the internal interface. Similarly, the gateway plugin can also send data or responses to the bus server through this interface.
- the bus server deploys the gateway plugins using LXC (Linux Containers).
- LXC provides a lightweight virtualization solution that allows multiple containers to run on a single physical host. This makes the deployment of gateway plugins faster and more flexible. By using LXC, containers containing gateway plugins can be easily created and managed, enabling rapid plugin deployment.
- Step 203 Obtain the plugin data transmitted by the gateway plugin through the internal interface.
- the plugin data is obtained based on business data processing.
- these data are transmitted to the gateway plugin via an internal interface.
- the gateway plugin processes it according to its own functionalities.
- the gateway plugin sends the processed data (i.e., plugin data) back to the bus server via the internal interface.
- Step 204 Based on the MQTT protocol, transmit the plugin data to the business platform through the second external interface.
- the plugin data has been properly formatted and encapsulated according to the requirements of the MQTT protocol. This typically involves converting the data into MQTT messages and specifying appropriate topics so that the business platform can correctly subscribe to and receive these messages.
- the second external interface serves as the connection point between the bus server and the business platform.
- this application uses the MQTT protocol to ensure the consistency and standardization of communication content between the service provider, gateway plugin and service platform, so that different service providers and gateway plugins can be uniformly connected, which improves the bus communication quality and further reduces the bus integration and development costs.
- step 202 includes steps 301 and 302:
- Step 301 When a business query request initiated by any gateway plugin based on the MQTT protocol is obtained, the business data corresponding to the business query request is obtained from the business data provided by each business provider.
- any gateway plugin can publish MQTT requests through the Topic:command topic; subscribe to MQTT replies through the Topic:reply topic; and subscribe to MQTT reports through the Topic:report topic.
- Topicic: command refers to the gateway plugin publishing MQTT requests to the command topic via the MQTT protocol when it needs to send control commands. These commands may include requests for device configuration, status queries, firmware updates, etc. Messages published to the command topic typically contain the identifier of the target device corresponding to the service provider, the request type, and relevant parameter information.
- subscribing to MQTT replies via the Topic:reply means that the gateway plugin subscribes to a reply topic to receive responses from other system components or devices to previously sent requests. Once other components or devices have processed their requests, they publish the results to this topic. By listening to this topic, the gateway plugin can obtain real-time updates on request processing. As a result, corresponding follow-up operations or decisions are made.
- subscribing to MQTT reports via the Topic:report means that the gateway plugin also subscribes to the report Topic to receive status updates, event notifications, or periodically reported data from other components or devices. This data may include device operating status, sensor readings, error logs, etc. By subscribing to this Topic, the gateway plugin can monitor the overall system operating status in real time and promptly identify and address potential problems.
- the first MQTT request initiated by any gateway plugin based on the MQTT protocol is obtained through an internal interface; when the first MQTT request contains service identification information, the first MQTT request is used as the service query request corresponding to the gateway plugin.
- the business identification information refers to the message published to the command topic, which typically includes the identifier of the target device corresponding to the business provider, the request type, and related parameter information.
- Step 302 Transmit the business data corresponding to the business query request to the gateway plugin through the internal interface.
- the system transmits this data back to the gateway plugin that initiated the query request via an internal interface. Since the internal interface connects to at least two gateway plugins, the system needs to ensure that the data is accurately sent to the correct gateway plugin.
- a distribution module is set up within the bus server. This module subscribes to the Local/command Topic to listen for commands from within the system. When a message is received from Local/command, the distribution module parses the data body of the message, particularly the method field, which contains the name of the target plugin. Based on the parsed plugin name, the distribution module forwards the data packet to the corresponding plugin's dedicated Topic. This ensures that each plugin only receives data relevant to it, achieving data isolation between plugins.
- the MQTT broker acts as a message middleware, responsible for receiving and distributing messages.
- the gateway plugin and other clients communicate and collaborate by publishing and subscribing to different topics. This publish/subscribe pattern allows for loosely coupled communication because senders and receivers do not need to be directly connected or aware of each other's existence; they only need to focus on the same topics.
- the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the service platform; as shown in Figure 4, step 203 includes steps 401 and 402:
- Step 401 When a plugin query request initiated by any network interface device in the business platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin.
- a service platform usually refers to a system or platform that provides specific business functions or services, while the network interface card (NIC) is the hardware component responsible for network communication within that system; the service platform provides services to the external network through the NIC.
- NIC network interface card
- a web server platform uses a NIC to receive client requests and send responses through the NIC.
- the network interface card (NIC) device acts as an MQTT client, capable of connecting to the MQTT Broker and participating in the MQTT publish/subscribe model. This enables the NIC device to proactively initiate requests and receive responses, allowing for asynchronous communication with other parts of the business platform.
- any network interface device can publish MQTT requests through the Topic:command topic; subscribe to MQTT replies through the Topic:reply topic; and subscribe to MQTT reports through the Topic:report topic.
- NIC network interface card
- NIC network interface card
- This request includes specific query parameters, such as the plugin name and version number. These parameters help other components in the business platform (such as servers or middleware) locate and provide the corresponding plugin data.
- the network interface card (NIC) device also subscribes to the Topic:reply topic, for example, Topic://reply ⁇ NIC mac ⁇ , to receive responses to its query requests.
- Topic:reply topic for example, Topic://reply ⁇ NIC mac ⁇
- components in the business platform find the corresponding plugin data and are ready to respond, they publish the data to this topic.
- the NIC device immediately receives this data and processes it accordingly.
- the network interface card (NIC) device can also subscribe to the Topic:report, for example, Topic://report ⁇ NIC mac ⁇ ; the NIC device can subscribe to this topic to receive real-time status reports from the gateway plugin, such as CPU usage, memory usage, network traffic, etc.
- the gateway plugin such as CPU usage, memory usage, network traffic, etc.
- a second MQTT request initiated by any network interface device based on the MQTT protocol can be obtained.
- an MQTT Broker is deployed within the bus server.
- the MQTT Broker is configured with conversion rules to enable data transmission between the network interface card (NIC) device and the gateway plugin. Specifically, the MQTT Broker converts Topic://command ⁇ NIC MAC address ⁇ to Topic:// ⁇ plugin name ⁇ command; the MQTT Broker converts Topic://reply ⁇ NIC MAC address ⁇ to Topic:// ⁇ plugin name ⁇ reply; and the MQTT Broker converts Topic://report ⁇ NIC MAC address ⁇ to Topic:// ⁇ plugin name ⁇ report.
- NIC network interface card
- the second MQTT request contains plugin identification information
- the second MQTT request is used as a plugin query request corresponding to the network interface device.
- Step 402 Based on the MQTT protocol, transmit the plugin data corresponding to the plugin query request to the network card device through the second external interface.
- plugin query requests are published to a topic subscribed to by the network interface card (NIC), typically Topic:reply, as this is the topic the NIC expects to receive responses from.
- the NIC continuously listens for messages on the Topic:reply topic.
- the system publishes an MQTT message containing plugin data
- the NIC immediately receives it.
- the NIC parses the message content, extracts the required plugin data, and performs subsequent operations or processing based on this data.
- the plugin data corresponding to the plugin query request is transmitted to the network interface device through the second external interface, including steps 501 and 502:
- Step 501 Add the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data.
- This routing address is a unique identifier for the NIC device in the network, and may be an IP address, MAC address, or other type of network identifier.
- the system can ensure that the response message is accurately sent back to the network interface card (NIC) that initiated the request, without confusion even when multiple NICs exist in the network.
- NIC network interface card
- Step 502 Based on the MQTT protocol, transmit the target plug-in data to the network card device through the second external interface.
- this data becomes “target plugin data.”
- the target plugin data is sent to the NIC device via a second external interface.
- the "second external interface” may refer to a network connection or communication port that supports MQTT.
- the target plugin data is packaged into an MQTT message and published with an appropriate topic specified (usually a topic subscribed to by the NIC device, such as Topic:reply).
- the network interface card (NIC) device will receive this MQTT message containing the target plugin data. Since the message includes the NIC device's routing address, the NIC device can confirm that this message is specifically prepared for it. After receiving the data, the NIC device will parse and process it, performing corresponding operations based on the content of the plugin data.
- the routing address includes the physical address of the network interface card (NIC). Based on the MQTT Broker's translation rules, the routing address corresponding to the NIC can also be added to the plugin data corresponding to the plugin query request to obtain the target plugin data; based on the MQTT protocol, the target plugin data is transmitted to the NIC via a second external interface.
- NIC network interface card
- the routing address includes the physical address of the network interface card (NIC) device and the device account data of the NIC device.
- NIC network interface card
- the conversion rules for the MQTT Broker are as follows:
- the number and complexity of MQTT messages can be significantly reduced, thereby lowering the platform's processing load.
- This design simplifies the message flow, enabling the platform to process each message more efficiently.
- the introduction of a configuration module ensures that each gateway device is correctly configured and authenticated before connecting to the MQTT Broker.
- the configuration module manages and verifies the device's identity, access permissions, and the topics that can be published, thus enhancing device security.
- intelligent message routing through the distribution module ensures that sensitive information is not mistakenly sent to unauthorized devices or systems.
- the distribution module acts like a message router, distributing MQTT messages to the correct gateway or plugin based on message type, target device, or other rules. This ensures message isolation, meaning each plugin only receives messages relevant to its function and is not affected by other unrelated messages. This isolation not only improves system reliability and efficiency but also reduces potential security risks, as malicious messages find it more difficult to infiltrate parts that shouldn't receive them.
- the MQTT Broker acting as a message broker, is responsible for receiving and forwarding MQTT messages. It is the core of the entire messaging system.
- the configuration module is responsible for device access configuration, permission management, and Topic subscription and publication rules. It ensures that devices meet security requirements and are correctly configured with their communication parameters before accessing the system.
- the distribution module intelligently distributes messages to the correct destinations according to the rules set by the configuration module. It acts as a message filter and router, ensuring that messages reach their intended destinations accurately and efficiently.
- this design by limiting the number of topics and introducing configuration and distribution modules, effectively reduces the platform's workload and improves device security and the isolation of MQTT messages.
- steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
- this application also provides a bus communication device for implementing the bus communication method described above.
- the solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more bus communication device embodiments provided below can be found in the limitations of the bus communication method described above, and will not be repeated here.
- a bus communication device is provided, applied to a bus server.
- the bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin.
- the device includes: an acquisition module 11, a first internal transmission module 12, a second internal transmission module 13, and a sending module 14, wherein...
- Module 11 is used to obtain business data published by the service provider through the first external interface based on the MQTT protocol.
- the first internal transmission module 12 is used to transmit business data to the gateway plug-in through an internal interface
- the second internal transmission module 13 is used to obtain plugin data transmitted by the gateway plugin through an internal interface; wherein, the plugin data is obtained based on business data processing.
- the sending module 14 is used to transmit plug-in data to the business platform through a second external interface based on the MQTT protocol.
- the number of gateway plugins connected to the internal interface is at least two, the number of service providers connected to the first external interface is at least two, and the first internal transmission module 12 is further configured to: when any...
- a gateway plugin initiates a business query request based on the MQTT protocol, it retrieves the business data corresponding to the business query request from the business data provided by each business provider.
- the internal interface is used to transmit the business data corresponding to the business query request to the gateway plugin.
- the device further includes a first request module, the first request module being configured to:
- the internal interface is used to obtain the first MQTT request initiated by any gateway plugin based on the MQTT protocol.
- the first MQTT request contains business identification information
- the first MQTT request is used as the business query request corresponding to the gateway plugin.
- the number of gateway plugins connected to the internal interface is at least two, and the service platform has at least two network interface card devices deployed.
- the second internal transmission module 13 is also used to: when a plugin query request initiated by any network card device in the service platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin;
- the plugin data corresponding to the plugin query request is transmitted to the network card device through the second external interface.
- the device further includes a second request module for:
- the internal interface is used to obtain a second MQTT request initiated by any network interface device based on the MQTT protocol.
- the second MQTT request contains plugin identification information
- the second MQTT request is used as a plugin query request corresponding to the network interface device.
- the step of transmitting the plugin data corresponding to the plugin query request to the network interface card device via the second external interface based on the MQTT protocol includes:
- the target plug-in data is transmitted to the network card device through the second external interface.
- the routing address includes the physical address of the network interface card (NIC) device.
- NIC network interface card
- the routing address also includes the device account data of the network interface card (NIC).
- NIC network interface card
- Each module in the aforementioned bus communication device can be implemented entirely or partially through software, hardware, or a combination thereof.
- These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
- a computer device which can be a server, specifically the bus server described in this application, and its internal structure can be as shown in Figure 7.
- the computer device includes a processor, memory, input/output interfaces (I/O), and a communication interface.
- the processor, memory, and I/O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I/O interfaces.
- the processor of the computer device provides computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and internal memory.
- the non-volatile storage medium stores an operating system, computer programs, and a database.
- the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
- the database of the computer device stores bus communication method data.
- the I/O interfaces of the computer device are used for exchanging information between the processor and external devices.
- the communication interface of the computer device is used for communicating with external terminals via a network connection.
- the computer program When executed by the processor, it implements a bus communication method.
- FIG. 7 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied.
- Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
- a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is based on business data processing. Arrived;
- the plugin data is transmitted to the business platform through a second external interface.
- the processor when the processor executes the computer program, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
- the processor when the processor executes the computer program, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
- the processor when the processor executes the computer program, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the service platform; the step of transmitting the plugin data to the service platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the service platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin; and the plugin data corresponding to the plugin query request is transmitted to the NIC device through the second external interface based on the MQTT protocol.
- NIC network interface card
- the processor when the processor executes the computer program, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
- the processor when the processor executes the computer program, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
- the routing address includes the physical address of the network interface card (NIC) device.
- NIC network interface card
- the routing address may also include the device account data of the network interface card (NIC).
- NIC network interface card
- a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through the internal interface; the plugin data is obtained based on business data processing.
- the plugin data is transmitted to the business platform through a second external interface.
- the computer program when executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
- the computer program when executed by the processor, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
- the computer program when executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the business platform; the step of transmitting the plugin data to the business platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the business platform based on the MQTT protocol is received, then in each gateway plugin... From the provided plugin data, obtain the plugin data corresponding to the plugin query request; based on the MQTT protocol, transmit the plugin data corresponding to the plugin query request to the network card device through the second external interface.
- NIC network interface card
- the computer program when executed by the processor, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
- the computer program when executed by the processor, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
- the routing address includes the physical address of the network interface card (NIC) device.
- NIC network interface card
- the routing address may also include the device account data of the network interface card (NIC).
- NIC network interface card
- a computer program product including a computer program that, when executed by a processor, performs the following steps:
- business data published by the service provider is obtained through the first external interface
- the plugin data transmitted by the gateway plugin is obtained through the internal interface; the plugin data is obtained based on business data processing.
- the plugin data is transmitted to the business platform through a second external interface.
- the computer program when executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
- the computer program when executed by the processor, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
- the computer program when executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the business platform; the step of transmitting the plugin data to the business platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the business platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin; and the plugin data corresponding to the plugin query request is transmitted to the NIC device through the second external interface based on the MQTT protocol.
- NIC network interface card
- the computer program when executed by the processor, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
- the computer program when executed by the processor, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
- the routing address includes the physical address of the network interface card (NIC) device.
- NIC network interface card
- the routing address may also include the device account data of the network interface card (NIC).
- NIC network interface card
- the user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, data stored, data displayed, etc.
- Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc.
- ROM read-only memory
- MRAM magnetic random access memory
- FRAM ferroelectric random access memory
- PCM phase change memory
- Volatile memory can include random access memory (RAM) or external cache memory, etc.
- RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
- SRAM Static Random Access Memory
- DRAM Dynamic Random Access Memory
- the databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases.
- the processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
相关申请Related applications
本申请要求2024年05月23日申请的,申请号为202410648130X,名称为“总线通信方法、装置、计算机设备和可读存储介质”的中国专利申请的优先权,在此将其全文引入作为参考。This application claims priority to Chinese patent application filed on May 23, 2024, with application number 202410648130X, entitled "Bus Communication Method, Apparatus, Computer Equipment and Readable Storage Medium", the entire contents of which are incorporated herein by reference.
本申请涉及通信技术领域,特别是涉及一种总线通信方法、装置、计算机设备和可读存储介质。This application relates to the field of communication technology, and in particular to a bus communication method, apparatus, computer equipment, and readable storage medium.
总线消息系统是一种通信机制,用于在分布式系统或微服务架构中传递消息和数据。A bus messaging system is a communication mechanism used to pass messages and data in distributed systems or microservice architectures.
现有的总线消息系统,特别是在Linux环境下,广泛采用DBUS(Desktop Bus)框架作为进程间通信的核心机制。DBUS是一个为应用程序间通信的消息总线系统,是用于进程间通信(IPC)的一个重要机制。它由freedesktop.org项目提供,并被广泛用于Linux桌面环境,以实现进程间的通信以及进程与内核之间的通信。DBUS的主要功能包括提供一个低延迟、低开销、高可用性的通信机制,支持服务发现、消息路由、以及通过匹配器(Matchers)实现消息的有选择性接收等。此外,DBUS还具备自身的协议,该协议基于二进制数据设计,保证了信息传递的高效性。Existing bus messaging systems, especially in Linux environments, widely adopt the DBUS (Desktop Bus) framework as the core mechanism for inter-process communication (IPC). DBUS is a message bus system for inter-application communication and an important mechanism for IPC. Provided by the freedesktop.org project, it is widely used in Linux desktop environments to implement communication between processes and between processes and the kernel. DBUS's main functions include providing a low-latency, low-overhead, and highly available communication mechanism, supporting service discovery, message routing, and selective message reception through matchers. Furthermore, DBUS has its own protocol, designed based on binary data, ensuring efficient information transmission.
然而,DBUS的消息体可能包含复杂的数据结构和参数,这使得消息的解析和处理变得相对复杂,使得数据传输质量无法得到保证。However, DBUS message bodies may contain complex data structures and parameters, which makes message parsing and processing relatively complicated, and makes it impossible to guarantee the quality of data transmission.
发明内容Summary of the Invention
基于此,有必要针对上述技术问题,提供一种总线通信方法、装置、计算机设备和可读存储介质。Therefore, it is necessary to provide a bus communication method, apparatus, computer device, and readable storage medium to address the aforementioned technical problems.
第一方面,本申请提供了一种总线通信方法,应用于总线服务器,总线服务器包括用于连接业务提供端的第一外部接口,用于连接业务平台的第二外部接口,以及用于连接网关插件的内部接口;该方法包括:In a first aspect, this application provides a bus communication method applied to a bus server. The bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin. The method includes:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;以及The plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
在其中一个实施例中,内部接口所连接的网关插件数量为至少两个,第一外部接口所连接的业务提供端数量为至少两个;以及In one embodiment, the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; and
通过内部接口,向网关插件传输业务数据,包括:Through the internal interface, business data is transmitted to the gateway plugin, including:
当获取到任一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取业务查询请求对应的业务数据;以及When a business query request initiated by any gateway plugin based on the MQTT protocol is received, the corresponding business data for the business query request is retrieved from the business data provided by each business provider; and
通过内部接口,向该网关插件传输业务查询请求对应的业务数据。The service data corresponding to the service query request is transmitted to the gateway plugin through the internal interface.
在其中一个实施例中,方法还包括:In one embodiment, the method further includes:
通过内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;以及Through the internal interface, obtain the first MQTT request initiated by any gateway plugin based on the MQTT protocol; and
当第一MQTT请求中包含业务标识信息时,则将第一MQTT请求作为该网关插件对应的业务查询请求。When the first MQTT request contains business identification information, the first MQTT request will be used as the business query request corresponding to the gateway plugin.
在其中一个实施例中,业务标识信息包括业务提供端对应的目标设备的标识符、请求 类型以及相关的参数信息。In one embodiment, the service identification information includes the identifier of the target device corresponding to the service provider and the request. Type and related parameter information.
在其中一个实施例中,内部接口所连接的网关插件数量为至少两个,业务平台中部署有至少两个网卡设备数量;以及In one embodiment, the internal interface connects to at least two gateway plugins, and the service platform deploys at least two network interface card (NIC) devices; and
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台,包括:Based on the MQTT protocol, plugin data is transmitted to the business platform through a second external interface, including:
当获取到业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件提供的插件数据中,获取插件查询请求对应的插件数据;以及When a plugin query request initiated by any network interface card (NIC) device in the business platform based on the MQTT protocol is received, the plugin data corresponding to the plugin query request is retrieved from the plugin data provided by each gateway plugin; and
基于MQTT协议,通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备。Based on the MQTT protocol, the plugin data corresponding to the plugin query request is transmitted to the network card device through a second external interface.
在其中一个实施例中,方法还包括:In one embodiment, the method further includes:
通过内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求;以及Through the internal interface, obtain the second MQTT request initiated by any network interface device based on the MQTT protocol; and
当第二MQTT请求中包含插件标识信息时,则将第二MQTT请求作为该网卡设备对应的插件查询请求。When the second MQTT request contains plugin identification information, the second MQTT request will be used as a plugin query request for the network interface device.
在其中一个实施例中,基于MQTT协议,通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备,包括:In one embodiment, based on the MQTT protocol, the plugin data corresponding to the plugin query request is transmitted to the network interface device via a second external interface, including:
在插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;以及Add the routing address corresponding to the network interface device to the plugin data corresponding to the plugin query request to obtain the target plugin data; and
基于MQTT协议,通过第二外部接口将目标插件数据传输至该网卡设备。Based on the MQTT protocol, the target plug-in data is transmitted to the network card device through a second external interface.
在其中一个实施例中,第二外部接口包括支持MQTT协议的网络连接或通信端口。In one embodiment, the second external interface includes a network connection or communication port that supports the MQTT protocol.
在其中一个实施例中,路由地址包括该网卡设备的物理地址。In one embodiment, the routing address includes the physical address of the network interface card (NIC) device.
在其中一个实施例中,路由地址还包括该网卡设备的设备账户数据。In one embodiment, the routing address also includes the network interface card device's device account data.
在其中一个实施例中,MQTT协议采用发布/订阅模式。In one embodiment, the MQTT protocol uses a publish/subscribe model.
第二方面,本申请还提供了一种总线通信装置,应用于总线服务器,总线服务器包括用于连接业务提供端的第一外部接口,用于连接业务平台的第二外部接口,以及用于连接网关插件的内部接口;装置包括:Secondly, this application also provides a bus communication device applied to a bus server. The bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin. The device includes:
获取模块,用于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;The acquisition module, used for the MQTT protocol, acquires business data published by the business provider through the first external interface;
第一内部传输模块,用于通过内部接口,向网关插件传输业务数据;The first internal transmission module is used to transmit business data to the gateway plugin through an internal interface;
第二内部传输模块,用于通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;以及The second internal transmission module is used to obtain plugin data transmitted by the gateway plugin through an internal interface; wherein, the plugin data is obtained based on business data processing; and
发送模块,用于基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。The sending module is used to transmit plugin data to the business platform via a second external interface based on the MQTT protocol.
第三方面,本申请还提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现以下步骤:Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;以及The plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
第四方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;以及The plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
第五方面,本申请还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据; Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;以及The plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is obtained based on business data processing; and
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of this application are set forth in the following drawings and description. Other features, objects, and advantages of this application will become apparent from the specification, drawings, and claims.
为了更清楚地说明本申请实施例或传统技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the disclosed drawings without creative effort.
图1为本申请一个实施例中总线通信方法的应用环境图;Figure 1 is an application environment diagram of the bus communication method in one embodiment of this application;
图2为本申请一个实施例中总线通信方法的流程示意图;Figure 2 is a flowchart illustrating a bus communication method in one embodiment of this application;
图3为本申请一个实施例中向该网关插件传输业务查询请求对应的业务数据步骤的流程示意图;Figure 3 is a flowchart illustrating the steps of transmitting service data corresponding to a service query request to the gateway plugin in one embodiment of this application;
图4为本申请一个实施例中通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备步骤的流程示意图;Figure 4 is a flowchart illustrating the step of transmitting the plug-in data corresponding to the plug-in query request to the network card device through a second external interface in one embodiment of this application.
图5为本申请另一个实施例中通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备步骤的流程示意图;Figure 5 is a flowchart illustrating the step of transmitting the plug-in data corresponding to the plug-in query request to the network card device through a second external interface in another embodiment of this application.
图6为本申请一个实施例中总线通信装置的结构框图;Figure 6 is a structural block diagram of a bus communication device in one embodiment of this application;
图7为本申请一个实施例中计算机设备的内部结构图。Figure 7 is an internal structural diagram of a computer device in one embodiment of this application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
本申请实施例提供的总线通信方法,可以应用于如图1所示的应用环境中总线服务器包括用于连接业务提供端的第一外部接口(A接口),用于连接业务平台的第二外部接口(B接口),以及用于连接网关插件的内部接口,各网关插件可以包括容器管理插件、管控插件、FTTR(Fiber to the Room)管控插件和本地Web界面插件。The bus communication method provided in this application embodiment can be applied to the application environment shown in Figure 1. The bus server includes a first external interface (A interface) for connecting to the service provider, a second external interface (B interface) for connecting to the service platform, and an internal interface for connecting to gateway plugins. Each gateway plugin may include a container management plugin, a control plugin, an FTTR (Fiber to the Room) control plugin, and a local web interface plugin.
在一个示例性的实施例中,如图2所示,提供了一种总线通信方法,以该方法应用于图1中的总线服务器为例进行说明,包括以下的步骤202至步骤206。其中:In an exemplary embodiment, as shown in FIG2, a bus communication method is provided. Taking the application of this method to the bus server in FIG1 as an example, the method includes the following steps 202 to 206. Wherein:
步骤201,基于MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)协议,通过第一外部接口获取业务提供端发布的业务数据。Step 201: Based on the MQTT (Message Queuing Telemetry Transport) protocol, obtain the business data published by the service provider through the first external interface.
其中,业务提供端可以为MQTT客户端/厂家。MQTT客户端(厂家)是数据处理和传输流程的起点,它负责将设备产生的业务数据发布到MQTT网络上,供其他系统订阅和使用。设备产生的业务数据可以包括设备状态、传感器读数、操作结果等。厂家需要确保发布的数据遵循一定的格式和标准,以便其他系统能够正确解析和使用这些数据。The service provider can be an MQTT client or a vendor. The MQTT client (vendor) is the starting point for the data processing and transmission flow; it is responsible for publishing the service data generated by the device to the MQTT network for other systems to subscribe to and use. The service data generated by the device can include device status, sensor readings, and operational results. The vendor needs to ensure that the published data conforms to certain formats and standards so that other systems can correctly parse and use this data.
具体的,消息队列遥测传输MQTT协议采用发布/订阅模式,这意味着客户端可以订阅特定的主题,并在这些主题(Topic)上有新消息发布时接收通知。这种模式解耦了消息的发布者和订阅者,使得它们不需要彼此直接连接或了解对方的存在。Specifically, the Message Queuing Telemetry Transport (MQTT) protocol uses a publish/subscribe model, meaning that clients can subscribe to specific topics and receive notifications when new messages are published on those topics. This model decouples message publishers and subscribers, so they do not need to be directly connected to each other or aware of each other's existence.
可以理解的是,MQTT协议中的主题是一个字符串,用于标识消息传输的通道。MQTT协议的主题并没有严格规定的类型,因为主题是字符串形式的标识符,用于定义消息传输的通道。主题可以根据应用场景自定义主题,以满足特定的消息传递需求。示例性的,主 题通常可以包括以下几种类型或命名约定:As is understandable, a topic in the MQTT protocol is a string used to identify a message transmission channel. There is no strictly defined type for MQTT topics because they are string identifiers used to define a message transmission channel. Topics can be customized according to the application scenario to meet specific message delivery needs. For example, a topic... Questions can typically include the following types or naming conventions:
1)command:这类主题通常用于发送控制命令或指令;2)reply或response:当需要接收命令执行后的回复或响应时,可以使用此类主题;3)report或status:这类主题常用于设备或系统状态报告的发布。4)config或settings:这类主题可能用于发送或接收配置信息。1) command: This type of topic is typically used to send control commands or instructions; 2) reply or response: This type of topic can be used when it is necessary to receive a reply or response after a command is executed; 3) report or status: This type of topic is often used for publishing device or system status reports; 4) config or settings: This type of topic may be used to send or receive configuration information.
步骤202,通过内部接口,向网关插件传输业务数据。Step 202: Transmit business data to the gateway plugin through the internal interface.
其中,网关插件是指安装在网关上的一种软件组件,它具有特定的功能,用于处理、转换或监控通过网络关的数据流。示例性的,网关插件可以对通过网关的数据进行处理和转换。在数据传输过程中,插件可以对数据进行加密、压缩、格式转换等操作,以满足不同系统之间的数据交换需求。A gateway plugin is a software component installed on a gateway that has specific functions for processing, transforming, or monitoring data streams passing through the network gateway. For example, a gateway plugin can process and transform data passing through the gateway. During data transmission, the plugin can perform operations such as encryption, compression, and format conversion to meet the data exchange needs between different systems.
具体的,内部接口是在总线服务器内部定义的,用于在服务器与网关插件之间传输数据。网关插件通常会被集成或部署在总线服务器上。当网关插件启动时,它会通过内部接口与总线服务器建立连接。同样,网关插件也可以通过这个接口向总线服务器发送数据或响应。Specifically, the internal interface is defined within the bus server and is used to transfer data between the server and the gateway plugin. The gateway plugin is typically integrated into or deployed on the bus server. When the gateway plugin starts, it establishes a connection with the bus server through the internal interface. Similarly, the gateway plugin can also send data or responses to the bus server through this interface.
在本实施例中,总线服务器通过部署LXC(Linux Container)来部署各网关插件;LXC提供了一种轻量级的虚拟化解决方案,允许在单个物理主机上运行多个容器。这使得网关插件的部署变得更加迅速和灵活。通过使用LXC,可以轻松地创建和管理包含网关插件的容器,从而实现插件的快速部署。In this embodiment, the bus server deploys the gateway plugins using LXC (Linux Containers). LXC provides a lightweight virtualization solution that allows multiple containers to run on a single physical host. This makes the deployment of gateway plugins faster and more flexible. By using LXC, containers containing gateway plugins can be easily created and managed, enabling rapid plugin deployment.
步骤203,通过内部接口获取网关插件传输的插件数据。Step 203: Obtain the plugin data transmitted by the gateway plugin through the internal interface.
其中,插件数据是基于业务数据处理得到的。The plugin data is obtained based on business data processing.
具体的,通过内部接口将这些数据传输给了网关插件。网关插件在接收到这些数据后,会根据自己的功能对这些数据进行处理。处理完成后,网关插件会通过内部接口将处理过的数据(即插件数据)发送回总线服务器。Specifically, these data are transmitted to the gateway plugin via an internal interface. Upon receiving this data, the gateway plugin processes it according to its own functionalities. After processing, the gateway plugin sends the processed data (i.e., plugin data) back to the bus server via the internal interface.
步骤204,基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Step 204: Based on the MQTT protocol, transmit the plugin data to the business platform through the second external interface.
可以理解的是,插件数据已经按照MQTT协议的要求进行了适当的格式化和封装。这通常涉及到将数据转换为MQTT消息,并指定适当的主题(Topic)以便业务平台能够正确订阅和接收这些消息。Understandably, the plugin data has been properly formatted and encapsulated according to the requirements of the MQTT protocol. This typically involves converting the data into MQTT messages and specifying appropriate topics so that the business platform can correctly subscribe to and receive these messages.
其中,第二外部接口是总线服务器与业务平台之间的连接点;一旦插件数据被封装为MQTT消息并通过第二外部接口发布,业务平台就可以通过订阅相应的主题来接收这些数据。The second external interface serves as the connection point between the bus server and the business platform. Once the plugin data is encapsulated into MQTT messages and published through the second external interface, the business platform can receive this data by subscribing to the corresponding topics.
上述总线通信方法中,本申请使用MQTT协议保证了业务提供端、网关插件和业务平台之间通信内容的一致性和标准化,使得不同业务提供端、网关插件能够统一对接,提高了总线通信质量,进一步的,也降低了总线集成和开发成本。In the above-mentioned bus communication method, this application uses the MQTT protocol to ensure the consistency and standardization of communication content between the service provider, gateway plugin and service platform, so that different service providers and gateway plugins can be uniformly connected, which improves the bus communication quality and further reduces the bus integration and development costs.
在一个示例性的实施例中,如图3所示,内部接口所连接的网关插件数量为至少两个,第一外部接口所连接的业务提供端数量为至少两个;步骤202包括步骤301和步骤302:In an exemplary embodiment, as shown in FIG3, the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; step 202 includes steps 301 and 302:
步骤301,当获取到任一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取业务查询请求对应的业务数据。Step 301: When a business query request initiated by any gateway plugin based on the MQTT protocol is obtained, the business data corresponding to the business query request is obtained from the business data provided by each business provider.
在本实施例中,任一网关插件可以通过Topic:command主题发布MQTT请求;可以通过Topic:reply主题订阅MQTT回复;可以通过Topic:report主题订阅MQTT上报。In this embodiment, any gateway plugin can publish MQTT requests through the Topic:command topic; subscribe to MQTT replies through the Topic:reply topic; and subscribe to MQTT reports through the Topic:report topic.
其中,Topic:command主题发布MQTT请求是指:网关插件需要向发送控制指令时,会通过MQTT协议发布业务查询请求到command Topic。这些指令可能包括设备配置、状态查询、固件更新等请求。发布到command Topic的消息通常包含业务提供端对应的目标设备的标识符、请求类型以及相关的参数信息。In this context, "Topic: command" refers to the gateway plugin publishing MQTT requests to the command topic via the MQTT protocol when it needs to send control commands. These commands may include requests for device configuration, status queries, firmware updates, etc. Messages published to the command topic typically contain the identifier of the target device corresponding to the service provider, the request type, and relevant parameter information.
其中,通过Topic:reply主题订阅MQTT回复是指:为了接收其他系统组件或设备对之前发送请求的响应,网关插件会订阅reply Topic。当其他组件或设备处理完请求后,它们会将结果发布到这个Topic上。网关插件通过监听这个Topic,可以实时获取请求的处理 结果,从而进行相应的后续操作或决策。In this context, subscribing to MQTT replies via the Topic:reply means that the gateway plugin subscribes to a reply topic to receive responses from other system components or devices to previously sent requests. Once other components or devices have processed their requests, they publish the results to this topic. By listening to this topic, the gateway plugin can obtain real-time updates on request processing. As a result, corresponding follow-up operations or decisions are made.
其中,通过Topic:report主题订阅MQTT上报是指:网关插件还会订阅report Topic,以接收来自其他组件或设备的状态更新、事件通知或定期上报的数据。这些数据可能包括设备的运行状态、传感器读数、错误日志等。通过订阅这个Topic,网关插件可以实时掌握整个系统的运行状态,及时发现并处理潜在的问题。In this context, subscribing to MQTT reports via the Topic:report means that the gateway plugin also subscribes to the report Topic to receive status updates, event notifications, or periodically reported data from other components or devices. This data may include device operating status, sensor readings, error logs, etc. By subscribing to this Topic, the gateway plugin can monitor the overall system operating status in real time and promptly identify and address potential problems.
在本实施例中,通过内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;当第一MQTT请求中包含业务标识信息时,则将第一MQTT请求作为该网关插件对应的业务查询请求。In this embodiment, the first MQTT request initiated by any gateway plugin based on the MQTT protocol is obtained through an internal interface; when the first MQTT request contains service identification information, the first MQTT request is used as the service query request corresponding to the gateway plugin.
其中,业务标识信息即为上述发布到command Topic的消息,通常包含业务提供端对应的目标设备的标识符、请求类型以及相关的参数信息。The business identification information refers to the message published to the command topic, which typically includes the identifier of the target device corresponding to the business provider, the request type, and related parameter information.
步骤302,通过内部接口,向该网关插件传输业务查询请求对应的业务数据。Step 302: Transmit the business data corresponding to the business query request to the gateway plugin through the internal interface.
可以理解的是,获取到请求的业务数据后,通过内部接口将这些数据传输回发起查询请求的网关插件。由于内部接口连接了至少两个网关插件,因此系统需要确保数据被准确地发送到正确的网关插件。Understandably, after obtaining the requested business data, the system transmits this data back to the gateway plugin that initiated the query request via an internal interface. Since the internal interface connects to at least two gateway plugins, the system needs to ensure that the data is accurately sent to the correct gateway plugin.
具体的,在总线服务器内设置有分发模块,分发模块订阅Local/command Topic,以监听来自系统内部的指令当从Local/command接收到消息时,分发模块会解析消息中的数据体,特别是method字段,该字段包含了目标插件的名称。根据解析出的插件名,分发模块会将数据报文转发到相应插件的专用Topic上,这样确保了每个插件只接收与其相关的数据,实现了插件之间的数据隔离。Specifically, a distribution module is set up within the bus server. This module subscribes to the Local/command Topic to listen for commands from within the system. When a message is received from Local/command, the distribution module parses the data body of the message, particularly the method field, which contains the name of the target plugin. Based on the parsed plugin name, the distribution module forwards the data packet to the corresponding plugin's dedicated Topic. This ensures that each plugin only receives data relevant to it, achieving data isolation between plugins.
本实施例中,MQTT代理起到了消息中间件的作用,负责接收和分发消息。网关插件和其他客户端通过发布和订阅不同的主题来进行通信和协作。这种发布/订阅模式允许松耦合的通信,因为发送方和接收方不需要直接连接或知道彼此的存在;它们只需要关注相同的主题即可。In this embodiment, the MQTT broker acts as a message middleware, responsible for receiving and distributing messages. The gateway plugin and other clients communicate and collaborate by publishing and subscribing to different topics. This publish/subscribe pattern allows for loosely coupled communication because senders and receivers do not need to be directly connected or aware of each other's existence; they only need to focus on the same topics.
在一个示例性的实施例中,内部接口所连接的网关插件数量为至少两个,业务平台中部署有至少两个网卡设备数量;如图4所示,步骤203包括步骤401和步骤402:In an exemplary embodiment, the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the service platform; as shown in Figure 4, step 203 includes steps 401 and 402:
步骤401,当获取到业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件提供的插件数据中,获取插件查询请求对应的插件数据。Step 401: When a plugin query request initiated by any network interface device in the business platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin.
可以理解的是,在一个典型的网络架构中,业务平台通常是指提供特定业务功能或服务的系统或平台,而网卡设备则是这个系统中负责网络通信的硬件组件;业务平台通过网卡设备向外部网络提供服务。例如,一个Web服务器平台会使用网卡设备来接收客户端的请求,并通过网卡设备发送响应。Understandably, in a typical network architecture, a service platform usually refers to a system or platform that provides specific business functions or services, while the network interface card (NIC) is the hardware component responsible for network communication within that system; the service platform provides services to the external network through the NIC. For example, a web server platform uses a NIC to receive client requests and send responses through the NIC.
本实施例中,网卡设备作为MQTT客户端,能够连接到MQTT Broker(MQTT代理服务器),并参与到MQTT的发布/订阅模式中。这使得网卡设备能够主动发起请求并接收响应,与业务平台中的其他部分进行异步通信。In this embodiment, the network interface card (NIC) device acts as an MQTT client, capable of connecting to the MQTT Broker and participating in the MQTT publish/subscribe model. This enables the NIC device to proactively initiate requests and receive responses, allowing for asynchronous communication with other parts of the business platform.
具体的,任一网卡设备可以通过Topic:command主题发布MQTT请求;可以通过Topic:reply主题订阅MQTT回复;可以通过Topic:report主题订阅MQTT上报。Specifically, any network interface device can publish MQTT requests through the Topic:command topic; subscribe to MQTT replies through the Topic:reply topic; and subscribe to MQTT reports through the Topic:report topic.
当网卡设备需要查询某个插件的信息时,它会通过MQTT协议,在Topic:command主题上发布一个插件查询请求,例如,Topic://command{网卡mac}。这个请求包含了特定的查询参数,如插件名称、版本号等,这些参数帮助业务平台中的其他组件(如服务器或中间件)定位并提供相应的插件数据。When a network interface card (NIC) device needs to query information about a specific plugin, it publishes a plugin query request via the MQTT protocol on the Topic:command, for example, Topic://command{NIC MAC}. This request includes specific query parameters, such as the plugin name and version number. These parameters help other components in the business platform (such as servers or middleware) locate and provide the corresponding plugin data.
网卡设备还会订阅Topic:reply主题,例如,Topic://reply{网卡mac};以便接收对其查询请求的响应。当业务平台中的组件找到对应的插件数据并准备好响应后,它们会将数据发布到这个主题上。网卡设备作为订阅者,会立即接收到这些数据,并进行相应的处理。The network interface card (NIC) device also subscribes to the Topic:reply topic, for example, Topic://reply{NIC mac}, to receive responses to its query requests. When components in the business platform find the corresponding plugin data and are ready to respond, they publish the data to this topic. As a subscriber, the NIC device immediately receives this data and processes it accordingly.
网卡设备还会订阅Topic:report主题,例如,Topic://report{网卡mac};网卡设备可以通过订阅此主题来接收网关插件的实时状态报告,如CPU使用率、内存占用、网络流量等。 The network interface card (NIC) device can also subscribe to the Topic:report, for example, Topic://report{NIC mac}; the NIC device can subscribe to this topic to receive real-time status reports from the gateway plugin, such as CPU usage, memory usage, network traffic, etc.
进一步的,通过内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求。Furthermore, through the internal interface, a second MQTT request initiated by any network interface device based on the MQTT protocol can be obtained.
可选的,在总线服务器内部署有MQTT Broker,MQTT Broker设置有转换规则,用于实现网卡设备与网关插件之间的数据传输;具体的,MQTT Broker将Topic://command{网卡mac}转换为Topic://{插件名}command;MQTT Broker将Topic://reply{网卡mac}转换为Topic://{插件名}reply;MQTT Broker将Topic://report{网卡mac}转换为Topic://{插件名}report。Optionally, an MQTT Broker is deployed within the bus server. The MQTT Broker is configured with conversion rules to enable data transmission between the network interface card (NIC) device and the gateway plugin. Specifically, the MQTT Broker converts Topic://command{NIC MAC address} to Topic://{plugin name}command; the MQTT Broker converts Topic://reply{NIC MAC address} to Topic://{plugin name}reply; and the MQTT Broker converts Topic://report{NIC MAC address} to Topic://{plugin name}report.
相应的,当第二MQTT请求中包含插件标识信息时,则将第二MQTT请求作为该网卡设备对应的插件查询请求。Accordingly, when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface device.
步骤402,基于MQTT协议,通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备。Step 402: Based on the MQTT protocol, transmit the plugin data corresponding to the plugin query request to the network card device through the second external interface.
可选的,插件查询请求会被发布到网卡设备订阅的主题上,通常是Topic:reply,因为这是网卡设备期待接收响应的主题。网卡设备作为MQTT的订阅者(subscriber),会持续监听Topic:reply主题上的消息。当系统发布包含插件数据的MQTT消息时,网卡设备会立即接收到这个消息。接收到消息后,网卡设备会解析消息内容,提取出所需的插件数据,并根据这些数据执行后续的操作或处理。Optionally, plugin query requests are published to a topic subscribed to by the network interface card (NIC), typically Topic:reply, as this is the topic the NIC expects to receive responses from. As an MQTT subscriber, the NIC continuously listens for messages on the Topic:reply topic. When the system publishes an MQTT message containing plugin data, the NIC immediately receives it. Upon receiving the message, the NIC parses the message content, extracts the required plugin data, and performs subsequent operations or processing based on this data.
如图5所示,基于MQTT协议,通过第二外部接口将插件查询请求对应的插件数据传输至该网卡设备,包括步骤501和步骤502:As shown in Figure 5, based on the MQTT protocol, the plugin data corresponding to the plugin query request is transmitted to the network interface device through the second external interface, including steps 501 and 502:
步骤501,在插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据。Step 501: Add the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data.
具体的,当业务平台处理完网卡设备的插件查询请求,并找到相应的插件数据后,系统会在这些数据中添加网卡设备的路由地址。这个路由地址是网卡设备在网络中的唯一标识,可能是一个IP地址、MAC地址或其他类型的网络标识符。Specifically, after the business platform processes the plugin query request for the network interface card (NIC) device and finds the corresponding plugin data, the system adds the NIC device's routing address to this data. This routing address is a unique identifier for the NIC device in the network, and may be an IP address, MAC address, or other type of network identifier.
通过将路由地址添加到插件数据中,系统可以确保响应消息能够准确地被发送回发起请求的网卡设备,即使在网络中存在多个网卡设备时也不会发生混淆。By adding the routing address to the plugin data, the system can ensure that the response message is accurately sent back to the network interface card (NIC) that initiated the request, without confusion even when multiple NICs exist in the network.
步骤502,基于MQTT协议,通过第二外部接口将目标插件数据传输至该网卡设备。Step 502: Based on the MQTT protocol, transmit the target plug-in data to the network card device through the second external interface.
可选的,一旦路由地址被添加到原始的插件数据中,这些数据就变成了“目标插件数据”。这意味着这些数据已经被特定地标记为要发送给具有该路由地址的网卡设备。接下来,基于MQTT协议,通过第二外部接口将目标插件数据发送给网卡设备。在这个过程中,“第二外部接口”可能是指一个支持MQTT的网络连接或通信端口。将目标插件数据打包成一个MQTT消息,并指定适当的主题(通常是网卡设备订阅的主题,如Topic:reply)进行发布。Optionally, once the routing address is added to the original plugin data, this data becomes "target plugin data." This means that this data has been specifically marked as being sent to the network interface card (NIC) device with that routing address. Next, based on the MQTT protocol, the target plugin data is sent to the NIC device via a second external interface. In this process, the "second external interface" may refer to a network connection or communication port that supports MQTT. The target plugin data is packaged into an MQTT message and published with an appropriate topic specified (usually a topic subscribed to by the NIC device, such as Topic:reply).
相应的,网卡设备作为MQTT的订阅者,会接收到这个包含目标插件数据的MQTT消息。由于消息中包含了网卡设备的路由地址,因此网卡设备可以确认这个消息是专门为它准备的。网卡设备接收到数据后,会进行解析和处理,根据插件数据的内容执行相应的操作。Accordingly, the network interface card (NIC) device, as an MQTT subscriber, will receive this MQTT message containing the target plugin data. Since the message includes the NIC device's routing address, the NIC device can confirm that this message is specifically prepared for it. After receiving the data, the NIC device will parse and process it, performing corresponding operations based on the content of the plugin data.
在一种可实现方式中,路由地址包括该网卡设备的物理地址。基于MQTT Broker的转换规则,还可以在插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;基于MQTT协议,通过第二外部接口将目标插件数据传输至该网卡设备。In one implementation, the routing address includes the physical address of the network interface card (NIC). Based on the MQTT Broker's translation rules, the routing address corresponding to the NIC can also be added to the plugin data corresponding to the plugin query request to obtain the target plugin data; based on the MQTT protocol, the target plugin data is transmitted to the NIC via a second external interface.
其中,MQTT Broker的转换规则如下:The conversion rules for MQTT Broker are as follows:
1)内部Topic://{插件名}/report向B接口Topic:report/{网卡mac}发送,1) Internal Topic: //{plugin name}/report sends data to Interface B Topic: report/{network card MAC address}.
2)内部Topic://{插件名}/reply向B接口Topic:reply/{网卡mac}发送,2) Internal Topic: //{plugin name}/reply sends a message to Interface B Topic: reply/{network card MAC address}.
3)内部Topic://{插件名}/command向B接口Topic:command/{网卡mac}发送。3) Send the internal Topic: //{plugin name}/command to the B interface Topic: command/{network card MAC}.
在另一种可实现方式中,路由地址包括该网卡设备的物理地址和该网卡设备的设备账户数据。In another possible implementation, the routing address includes the physical address of the network interface card (NIC) device and the device account data of the NIC device.
其中,MQTT Broker的转换规则如下: The conversion rules for the MQTT Broker are as follows:
1)内部Topic://{插件名}/report向B接口Topic:report/{网卡mac}{账户数据}发送,1) Internal Topic: //{Plugin Name}/report sends data to Interface B Topic: report/{Network Card MAC}{Account Data}
2)内部Topic://{插件名}/reply向B接口Topic:reply/{网卡mac}{账户数据}发送,2) Internal Topic: //{plugin name}/reply sends data to Interface B Topic: reply/{network card MAC}{account data}.
3)内部Topic://{插件名}/command向B接口Topic:command/{网卡mac}{账户数据}发送。3) Send the internal Topic: //{plugin name}/command to the B interface Topic: command/{network card MAC}{account data}.
本实施例中,通过限制网关插件和业务平台之间只有三个Topic,可以显著减少MQTT消息的数量和复杂性,从而降低平台的处理压力。这种设计简化了消息流,使得平台能够更高效地处理每个消息。引入配置模块可以确保每个网关设备在连接到MQTT Broker之前都经过正确的配置和认证。配置模块可以管理和验证设备的身份、访问权限以及可以发布的Topic,从而增强设备的安全性。此外,通过分发模块对消息进行智能路由,可以确保敏感信息不会被错误地发送到未经授权的设备或系统。In this embodiment, by limiting the communication between the gateway plugin and the business platform to only three topics, the number and complexity of MQTT messages can be significantly reduced, thereby lowering the platform's processing load. This design simplifies the message flow, enabling the platform to process each message more efficiently. The introduction of a configuration module ensures that each gateway device is correctly configured and authenticated before connecting to the MQTT Broker. The configuration module manages and verifies the device's identity, access permissions, and the topics that can be published, thus enhancing device security. Furthermore, intelligent message routing through the distribution module ensures that sensitive information is not mistakenly sent to unauthorized devices or systems.
分发模块的作用类似于一个消息路由器,它可以根据消息的类型、目标设备或其他规则,将MQTT消息分发到正确的网关或插件。这确保了消息的隔离性,即每个插件只接收与其功能相关的消息,而不会受到其他不相关消息的干扰。这种隔离不仅提高了系统的可靠性和效率,还减少了潜在的安全风险,因为恶意消息更难以渗透到不应该接收它们的部分。The distribution module acts like a message router, distributing MQTT messages to the correct gateway or plugin based on message type, target device, or other rules. This ensures message isolation, meaning each plugin only receives messages relevant to its function and is not affected by other unrelated messages. This isolation not only improves system reliability and efficiency but also reduces potential security risks, as malicious messages find it more difficult to infiltrate parts that shouldn't receive them.
MQTT Broker作为消息代理,负责接收和转发MQTT消息。它是整个消息传递系统的核心。配置模块负责设备的接入配置、权限管理以及Topic的订阅和发布规则。它可以确保设备在接入系统前满足安全要求,并正确配置其通信参数。分发模块则根据配置模块的规则,智能地将消息分发到正确的目标。它起到了消息过滤和路由的作用,确保消息能够准确、高效地到达预期的目的地。The MQTT Broker, acting as a message broker, is responsible for receiving and forwarding MQTT messages. It is the core of the entire messaging system. The configuration module is responsible for device access configuration, permission management, and Topic subscription and publication rules. It ensures that devices meet security requirements and are correctly configured with their communication parameters before accessing the system. The distribution module intelligently distributes messages to the correct destinations according to the rules set by the configuration module. It acts as a message filter and router, ensuring that messages reach their intended destinations accurately and efficiently.
综上,这种设计通过限制Topic数量、引入配置和分发模块,有效地降低了平台的压力,提高了设备的安全性和MQTT消息的隔离性。这些措施共同构成了一个高效、安全且可扩展的消息传递系统。In summary, this design, by limiting the number of topics and introducing configuration and distribution modules, effectively reduces the platform's workload and improves device security and the isolation of MQTT messages. These measures together constitute an efficient, secure, and scalable messaging system.
应该理解的是,虽然如上的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的总线通信方法的总线通信装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个总线通信装置实施例中的具体限定可以参见上文中对于总线通信方法的限定,在此不再赘述。Based on the same inventive concept, this application also provides a bus communication device for implementing the bus communication method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more bus communication device embodiments provided below can be found in the limitations of the bus communication method described above, and will not be repeated here.
在一个示例性的实施例中,如图6所示,提供了一种总线通信装置,应用于总线服务器,总线服务器包括用于连接业务提供端的第一外部接口,用于连接业务平台的第二外部接口,以及用于连接网关插件的内部接口;装置包括:获取模块11、第一内部传输模块12、第二内部传输模块13和发送模块14,其中In an exemplary embodiment, as shown in FIG6, a bus communication device is provided, applied to a bus server. The bus server includes a first external interface for connecting to a service provider, a second external interface for connecting to a service platform, and an internal interface for connecting to a gateway plugin. The device includes: an acquisition module 11, a first internal transmission module 12, a second internal transmission module 13, and a sending module 14, wherein...
获取模块11,用于基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Module 11 is used to obtain business data published by the service provider through the first external interface based on the MQTT protocol.
第一内部传输模块12,用于通过内部接口,向网关插件传输业务数据;The first internal transmission module 12 is used to transmit business data to the gateway plug-in through an internal interface;
第二内部传输模块13,用于通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;The second internal transmission module 13 is used to obtain plugin data transmitted by the gateway plugin through an internal interface; wherein, the plugin data is obtained based on business data processing.
发送模块14,用于基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。The sending module 14 is used to transmit plug-in data to the business platform through a second external interface based on the MQTT protocol.
在其中一个实施例中,所述内部接口所连接的网关插件数量为至少两个,所述第一外部接口所连接的业务提供端数量为至少两个,第一内部传输模块12,还用于:当获取到任 一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取所述业务查询请求对应的业务数据;In one embodiment, the number of gateway plugins connected to the internal interface is at least two, the number of service providers connected to the first external interface is at least two, and the first internal transmission module 12 is further configured to: when any... When a gateway plugin initiates a business query request based on the MQTT protocol, it retrieves the business data corresponding to the business query request from the business data provided by each business provider.
通过所述内部接口,向该网关插件传输所述业务查询请求对应的业务数据。The internal interface is used to transmit the business data corresponding to the business query request to the gateway plugin.
在其中一个实施例中,该装置还包括第一请求模块,第一请求模块用于:In one embodiment, the device further includes a first request module, the first request module being configured to:
通过所述内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;The internal interface is used to obtain the first MQTT request initiated by any gateway plugin based on the MQTT protocol.
当所述第一MQTT请求中包含业务标识信息时,则将所述第一MQTT请求作为该网关插件对应的业务查询请求。When the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
在其中一个实施例中,所述内部接口所连接的网关插件数量为至少两个,所述业务平台中部署有至少两个网卡设备数量;In one embodiment, the number of gateway plugins connected to the internal interface is at least two, and the service platform has at least two network interface card devices deployed.
相应的,第二内部传输模块13,还用于:当获取到所述业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件提供的插件数据中,获取所述插件查询请求对应的插件数据;Correspondingly, the second internal transmission module 13 is also used to: when a plugin query request initiated by any network card device in the service platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin;
基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备。Based on the MQTT protocol, the plugin data corresponding to the plugin query request is transmitted to the network card device through the second external interface.
在其中一个实施例中,该装置还包括第二请求模块,用于:In one embodiment, the device further includes a second request module for:
通过所述内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求;The internal interface is used to obtain a second MQTT request initiated by any network interface device based on the MQTT protocol.
当所述第二MQTT请求中包含插件标识信息时,则将所述第二MQTT请求作为该网卡设备对应的插件查询请求。When the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface device.
在其中一个实施例中,所述基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备,包括:In one embodiment, the step of transmitting the plugin data corresponding to the plugin query request to the network interface card device via the second external interface based on the MQTT protocol includes:
在所述插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;Add the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data;
基于MQTT协议,通过所述第二外部接口将所述目标插件数据传输至该网卡设备。Based on the MQTT protocol, the target plug-in data is transmitted to the network card device through the second external interface.
在其中一个实施例中,所述路由地址包括该网卡设备的物理地址。In one embodiment, the routing address includes the physical address of the network interface card (NIC) device.
在其中一个实施例中,所述路由地址还包括该网卡设备的设备账户数据。In one embodiment, the routing address also includes the device account data of the network interface card (NIC).
上述总线通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the aforementioned bus communication device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是服务器,即为本申请中的总线服务器,其内部结构图可以如图7所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储总线通信方法数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种总线通信方法。In an exemplary embodiment, a computer device is provided, which can be a server, specifically the bus server described in this application, and its internal structure can be as shown in Figure 7. The computer device includes a processor, memory, input/output interfaces (I/O), and a communication interface. The processor, memory, and I/O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I/O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores bus communication method data. The I/O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a bus communication method.
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in Figure 7 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
在一个示例性的实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得 到的;The plugin data transmitted by the gateway plugin is obtained through an internal interface; the plugin data is based on business data processing. Arrived;
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述第一外部接口所连接的业务提供端数量为至少两个;所述通过所述内部接口,向所述网关插件传输所述业务数据,包括:当获取到任一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取所述业务查询请求对应的业务数据;通过所述内部接口,向该网关插件传输所述业务查询请求对应的业务数据。In one embodiment, when the processor executes the computer program, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:通过所述内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;当所述第一MQTT请求中包含业务标识信息时,则将所述第一MQTT请求作为该网关插件对应的业务查询请求。In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述业务平台中部署有至少两个网卡设备数量;所述基于MQTT协议,通过所述第二外部接口将所述插件数据传输至所述业务平台,包括:当获取到所述业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件提供的插件数据中,获取所述插件查询请求对应的插件数据;基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备。In one embodiment, when the processor executes the computer program, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the service platform; the step of transmitting the plugin data to the service platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the service platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin; and the plugin data corresponding to the plugin query request is transmitted to the NIC device through the second external interface based on the MQTT protocol.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:通过所述内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求;当所述第二MQTT请求中包含插件标识信息时,则将所述第二MQTT请求作为该网卡设备对应的插件查询请求。In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:所述基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备,包括:在所述插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;基于MQTT协议,通过所述第二外部接口将所述目标插件数据传输至该网卡设备。In one embodiment, when the processor executes the computer program, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
在一个实施例中,所述路由地址包括该网卡设备的物理地址。In one embodiment, the routing address includes the physical address of the network interface card (NIC) device.
在一个实施例中,所述路由地址还包括该网卡设备的设备账户数据。In one embodiment, the routing address may also include the device account data of the network interface card (NIC).
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;The plugin data transmitted by the gateway plugin is obtained through the internal interface; the plugin data is obtained based on business data processing.
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述第一外部接口所连接的业务提供端数量为至少两个;所述通过所述内部接口,向所述网关插件传输所述业务数据,包括:当获取到任一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取所述业务查询请求对应的业务数据;通过所述内部接口,向该网关插件传输所述业务查询请求对应的业务数据。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:通过所述内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;当所述第一MQTT请求中包含业务标识信息时,则将所述第一MQTT请求作为该网关插件对应的业务查询请求。In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述业务平台中部署有至少两个网卡设备数量;所述基于MQTT协议,通过所述第二外部接口将所述插件数据传输至所述业务平台,包括:当获取到所述业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件 提供的插件数据中,获取所述插件查询请求对应的插件数据;基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the business platform; the step of transmitting the plugin data to the business platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the business platform based on the MQTT protocol is received, then in each gateway plugin... From the provided plugin data, obtain the plugin data corresponding to the plugin query request; based on the MQTT protocol, transmit the plugin data corresponding to the plugin query request to the network card device through the second external interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:通过所述内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求;当所述第二MQTT请求中包含插件标识信息时,则将所述第二MQTT请求作为该网卡设备对应的插件查询请求。In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备,包括:在所述插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;基于MQTT协议,通过所述第二外部接口将所述目标插件数据传输至该网卡设备。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
在一个实施例中,所述路由地址包括该网卡设备的物理地址。In one embodiment, the routing address includes the physical address of the network interface card (NIC) device.
在一个实施例中,所述路由地址还包括该网卡设备的设备账户数据。In one embodiment, the routing address may also include the device account data of the network interface card (NIC).
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
基于MQTT协议,通过第一外部接口获取业务提供端发布的业务数据;Based on the MQTT protocol, business data published by the service provider is obtained through the first external interface;
通过内部接口,向网关插件传输业务数据;Transmit business data to the gateway plugin through the internal interface;
通过内部接口获取网关插件传输的插件数据;其中,插件数据是基于业务数据处理得到的;The plugin data transmitted by the gateway plugin is obtained through the internal interface; the plugin data is obtained based on business data processing.
基于MQTT协议,通过第二外部接口将插件数据传输至业务平台。Based on the MQTT protocol, the plugin data is transmitted to the business platform through a second external interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述第一外部接口所连接的业务提供端数量为至少两个;所述通过所述内部接口,向所述网关插件传输所述业务数据,包括:当获取到任一网关插件基于MQTT协议发起的业务查询请求时,则在各业务提供端提供的业务数据中,获取所述业务查询请求对应的业务数据;通过所述内部接口,向该网关插件传输所述业务查询请求对应的业务数据。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and the number of service providers connected to the first external interface is at least two; transmitting the service data to the gateway plugin through the internal interface includes: when a service query request initiated by any gateway plugin based on the MQTT protocol is obtained, the service data corresponding to the service query request is obtained from the service data provided by each service provider; and transmitting the service data corresponding to the service query request to the gateway plugin through the internal interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:通过所述内部接口,获取任一网关插件基于MQTT协议发起的第一MQTT请求;当所述第一MQTT请求中包含业务标识信息时,则将所述第一MQTT请求作为该网关插件对应的业务查询请求。In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a first MQTT request initiated by any gateway plugin based on the MQTT protocol through the internal interface; when the first MQTT request contains business identification information, the first MQTT request is used as the business query request corresponding to the gateway plugin.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述内部接口所连接的网关插件数量为至少两个,所述业务平台中部署有至少两个网卡设备数量;所述基于MQTT协议,通过所述第二外部接口将所述插件数据传输至所述业务平台,包括:当获取到所述业务平台中任一网卡设备基于MQTT协议发起的插件查询请求时,则在各网关插件提供的插件数据中,获取所述插件查询请求对应的插件数据;基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the number of gateway plugins connected to the internal interface is at least two, and at least two network interface card (NIC) devices are deployed in the business platform; the step of transmitting the plugin data to the business platform through the second external interface based on the MQTT protocol includes: when a plugin query request initiated by any NIC device in the business platform based on the MQTT protocol is obtained, the plugin data corresponding to the plugin query request is obtained from the plugin data provided by each gateway plugin; and the plugin data corresponding to the plugin query request is transmitted to the NIC device through the second external interface based on the MQTT protocol.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:通过所述内部接口,获取任一网卡设备基于MQTT协议发起的第二MQTT请求;当所述第二MQTT请求中包含插件标识信息时,则将所述第二MQTT请求作为该网卡设备对应的插件查询请求。In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a second MQTT request initiated by any network interface card device based on the MQTT protocol through the internal interface; when the second MQTT request contains plugin identification information, the second MQTT request is used as a plugin query request corresponding to the network interface card device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:所述基于MQTT协议,通过所述第二外部接口将所述插件查询请求对应的插件数据传输至该网卡设备,包括:在所述插件查询请求对应的插件数据中添加该网卡设备对应的路由地址,得到目标插件数据;基于MQTT协议,通过所述第二外部接口将所述目标插件数据传输至该网卡设备。In one embodiment, when the computer program is executed by the processor, it further implements the following steps: transmitting the plugin data corresponding to the plugin query request to the network card device through the second external interface based on the MQTT protocol, including: adding the routing address corresponding to the network card device to the plugin data corresponding to the plugin query request to obtain the target plugin data; transmitting the target plugin data to the network card device through the second external interface based on the MQTT protocol.
在一个实施例中,所述路由地址包括该网卡设备的物理地址。In one embodiment, the routing address includes the physical address of the network interface card (NIC) device.
在一个实施例中,所述路由地址还包括该网卡设备的设备账户数据。In one embodiment, the routing address may also include the device account data of the network interface card (NIC).
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要符合相关规定。 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, and the collection, use and processing of the relevant data must comply with relevant regulations.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性存储器和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(Resistive Random Access Memory,ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器、人工智能(Artificial Intelligence,AI)处理器等,不限于此。Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。 The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims (15)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410648130.X | 2024-05-23 | ||
| CN202410648130.XA CN118488043A (en) | 2024-05-23 | 2024-05-23 | Bus communication method, bus communication device, computer equipment and readable storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025241347A1 true WO2025241347A1 (en) | 2025-11-27 |
Family
ID=92196216
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/115113 Pending WO2025241347A1 (en) | 2024-05-23 | 2024-08-28 | Bus communication method and apparatus, and computer device and readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN118488043A (en) |
| WO (1) | WO2025241347A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118488043A (en) * | 2024-05-23 | 2024-08-13 | 中国电信股份有限公司技术创新中心 | Bus communication method, bus communication device, computer equipment and readable storage medium |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108809972A (en) * | 2018-06-01 | 2018-11-13 | 南京邮电大学 | A kind of Internet of Things Comprehensive Experiment and application development platform and framework based on the ecosystem of increasing income |
| US20180338018A1 (en) * | 2017-05-18 | 2018-11-22 | Hcl Technologies Limited | Hybrid middleware device for facilitating communication amongst devices operating on a distinct communication protocols |
| CN110971614A (en) * | 2019-12-17 | 2020-04-07 | 软通动力信息技术(集团)有限公司 | Internet of things adaptation method and system, computer equipment and storage medium |
| CN111580985A (en) * | 2020-03-31 | 2020-08-25 | 西安电子科技大学 | Internet of things middleware data processing method and system, storage medium and terminal |
| CN114172929A (en) * | 2021-10-28 | 2022-03-11 | 深圳市信锐网科技术有限公司 | Communication method, device and gateway |
| CN116016005A (en) * | 2022-12-12 | 2023-04-25 | 阿里云计算有限公司 | Internet of things equipment access method and device, electronic equipment and storage medium |
| CN117978888A (en) * | 2024-01-18 | 2024-05-03 | 浪潮工创(山东)供应链科技有限公司 | Gateway and data transmission method using same |
| CN118488043A (en) * | 2024-05-23 | 2024-08-13 | 中国电信股份有限公司技术创新中心 | Bus communication method, bus communication device, computer equipment and readable storage medium |
-
2024
- 2024-05-23 CN CN202410648130.XA patent/CN118488043A/en active Pending
- 2024-08-28 WO PCT/CN2024/115113 patent/WO2025241347A1/en active Pending
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180338018A1 (en) * | 2017-05-18 | 2018-11-22 | Hcl Technologies Limited | Hybrid middleware device for facilitating communication amongst devices operating on a distinct communication protocols |
| CN108809972A (en) * | 2018-06-01 | 2018-11-13 | 南京邮电大学 | A kind of Internet of Things Comprehensive Experiment and application development platform and framework based on the ecosystem of increasing income |
| CN110971614A (en) * | 2019-12-17 | 2020-04-07 | 软通动力信息技术(集团)有限公司 | Internet of things adaptation method and system, computer equipment and storage medium |
| CN111580985A (en) * | 2020-03-31 | 2020-08-25 | 西安电子科技大学 | Internet of things middleware data processing method and system, storage medium and terminal |
| CN114172929A (en) * | 2021-10-28 | 2022-03-11 | 深圳市信锐网科技术有限公司 | Communication method, device and gateway |
| CN116016005A (en) * | 2022-12-12 | 2023-04-25 | 阿里云计算有限公司 | Internet of things equipment access method and device, electronic equipment and storage medium |
| CN117978888A (en) * | 2024-01-18 | 2024-05-03 | 浪潮工创(山东)供应链科技有限公司 | Gateway and data transmission method using same |
| CN118488043A (en) * | 2024-05-23 | 2024-08-13 | 中国电信股份有限公司技术创新中心 | Bus communication method, bus communication device, computer equipment and readable storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118488043A (en) | 2024-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3259898B1 (en) | Message bus service directory | |
| CN109391500B (en) | A configuration management method, device and device | |
| CN110413418B (en) | Cache synchronization device and method, cache synchronization system and electronic equipment | |
| US6775700B2 (en) | System and method for common information model object manager proxy interface and management | |
| US20190132276A1 (en) | Unified event processing for data/event exchanges with existing systems | |
| CN109756559B (en) | Construction and use method for distributed data distribution service of embedded airborne system | |
| CN111901230B (en) | Internet of things gateway and system supporting equipment access verification and equipment access verification method | |
| CN101729491B (en) | Method, device and system for enhancing application reliability of script-based business | |
| CN112181681A (en) | Remote calling method and device, computer equipment and storage medium | |
| CN114338063A (en) | Message queue system, service processing method, and computer-readable storage medium | |
| KR20170028878A (en) | Method for processing request messages in wireless communication system, and device for same | |
| CN114090388A (en) | Information acquisition method, server cluster, server and equipment | |
| CN110933188A (en) | Remote service calling method, system, server and storage medium | |
| CN110381058B (en) | Request transmission method and device based on full-duplex communication protocol WebSocket | |
| WO2025241347A1 (en) | Bus communication method and apparatus, and computer device and readable storage medium | |
| CN117221396A (en) | Network data interaction method, device, system, storage medium and computer equipment | |
| CN114025005B (en) | Data communication method, system, electronic equipment and storage medium | |
| CN115550468A (en) | Service request processing method, device, equipment and medium | |
| WO2024103943A1 (en) | Service processing method and apparatus, storage medium, and device | |
| CN111131427B (en) | Cross-domain cooperative system based on central domain and implementation method | |
| CN112769741B (en) | Message communication method and electronic equipment | |
| US20070130312A1 (en) | Web service provision apparatus and method and web service request apparatus and method | |
| US12452940B2 (en) | Apparatus and method for configuring data communication between robot components in different networks | |
| US20230412466A1 (en) | Managing cloud-native virtual network functions | |
| US7685303B2 (en) | Object-oriented discovery framework |