Data transmission method, system and device and storage medium

By introducing control payloads and executable scripts in the publish-subscribe mode of the message bus, the problem that producers cannot deliver messages in a direction is solved, and security control of data transmission is realized, ensuring that only designated consumers can receive messages.

CN119728661APending Publication Date: 2025-03-2858 CHANG LIFE (BEIJING) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411919778.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In a distributed system, the publish-subscribe mode of the message bus causes the producer to be unable to deliver messages to designated consumers in a direction, resulting in the inability to guarantee the security of data transmission.

Method used

By adding a control payload on the basis of the message payload, which contains an executable script for selecting the target message recipient, the message publisher can encapsulate and send the target message to the message bus, so that the message bus or topic subscriber can determine the target message recipient based on the execution result of the executable script.

Benefits of technology

Directed control of data transmission is realized, ensuring that only authorized target message recipients can obtain message payloads, and improving the security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728661A_ABST
    Figure CN119728661A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method, system and device and a storage medium. In the embodiment of the invention, a message publisher can construct a control load for a message load, the control load comprises an executable script used for selecting a target message receiver from theme subscribers corresponding to theme identification for the message load, and the message load and the control load are packaged into a target message to be sent to a message bus. And the message bus sends the target message to the target message receiver. Therefore, the structure of the target message is modified, the control load is added on the basis of the message load, a message publisher can directionally specify a target message receiver for the target message through the control load, and the control load can be used for carrying out identity verification on a theme subscriber corresponding to a theme identifier in the message load. Therefore, only the target message receiver can obtain the message load in the target message, leakage of the message load is avoided, and the security of data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data transmission method, system, device and storage medium. Background Art

[0002] Message Bus is a software architecture pattern used to implement communication between components in a distributed system. Message Bus usually adopts the publish-subscribe mode. Message Bus supports multiple topics. Each topic can be regarded as a logical channel. The producer publishes the message to the topic of the message bus, and all consumers who subscribe to the topic can obtain the message from the message bus.

[0003] However, according to the above publish-subscribe mode for data transmission, the data transmission process is uncontrollable for the producer. The producer cannot deliver the message to the designated consumer who has subscribed to the topic, resulting in the security of data transmission cannot be guaranteed. Summary of the invention

[0004] Multiple aspects of the present application provide a data transmission method, system, device and storage medium to achieve directional data transmission and improve the security of data transmission.

[0005] The present application provides a data transmission method applicable to a message publisher, the method comprising:

[0006] Constructing a message payload based on the data to be transmitted and a subject identifier corresponding to the data to be transmitted;

[0007] Generate a control payload for the message payload, wherein the control payload includes an executable script for selecting a target message recipient from the topic subscribers corresponding to the topic identifier for the message payload;

[0008] Encapsulating the message payload and the control payload into a target message;

[0009] The target message is sent to a message bus, so that the message bus sends the target message to the target message recipient; wherein the target message recipient is determined by the message bus from the topic subscribers by running the executable script, or is determined by the topic subscriber according to the running status of the executable script after receiving the target message.

[0010] The embodiment of the present application also provides a data transmission method, which is applicable to a message bus, and the method includes:

[0011] Receive a target message sent by a message publisher, wherein the target message includes a message payload and a control payload, wherein the message payload includes a topic identifier, and the control payload includes an executable script for selecting a target message recipient from topic subscribers corresponding to the topic identifier for the message payload;

[0012] When receiving a message acquisition request sent by a topic subscriber corresponding to the topic identifier, parsing a control payload from the target message;

[0013] Using the configuration information carried in the message acquisition request as input of the executable script, and executing the executable script in the control payload;

[0014] When the executable script is successfully executed, the topic subscriber is used as a target message receiver, and the target message is provided to the target message receiver so that the target message receiver can parse the message payload from the target message.

[0015] The embodiment of the present application also provides a data transmission method, applicable to a topic subscriber, the method comprising:

[0016] Sending a message acquisition request to the message bus, wherein the message acquisition request includes a subject identifier for retrieving target information;

[0017] receiving a target message returned by the message bus, wherein the target message is retrieved by the message bus based on the topic identifier;

[0018] If a control payload is parsed from the target message, the executable script in the control payload is executed based on the configuration information of the topic subscriber itself;

[0019] If the executable script is executed successfully, the topic subscriber is determined as the target message recipient, and the message payload is parsed from the target message.

[0020] The embodiment of the present application also provides a computing device, including: a memory, a processor, and a communication component;

[0021] The memory is used to store one or more computer instructions;

[0022] The processor is coupled to the memory and the communication component, and is configured to execute the one or more computer instructions to perform the aforementioned data transmission method.

[0023] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the aforementioned data transmission method.

[0024] An embodiment of the present application also provides a computer program product, including a computer program; when the computer program is executed by a processor, the processor is caused to execute the aforementioned data transmission method.

[0025] In an embodiment of the present application, the message publisher can construct a control payload for the message payload according to the actual data transmission requirements. The control payload contains an executable script for selecting the target message recipient from the topic subscribers corresponding to the topic identifier for the message payload. The message payload and the control payload are encapsulated into a target message and sent to the message bus, so that the message bus can send the target message to the target message recipient based on the control payload. In this way, the structure of the target message is modified, and the control payload is added on the basis of the message payload. The structure of the target message transmitted between the message publisher and the target message recipient is modified, and the control payload is added on the basis of the message payload. The message publisher can specify the target message recipient for the target message through the control payload. The control payload can be used to authenticate the topic subscriber corresponding to the topic identifier in the message payload, so that only the target message recipient can obtain the message payload in the target message, avoiding the leakage of the message payload, thereby improving the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0027] Figure 1 A schematic diagram of the structure of a data transmission system provided by an exemplary embodiment of the present application;

[0028] Figure 2 A flowchart of a data transmission method provided by an exemplary embodiment of the present application;

[0029] Figure 3 A flowchart of a data transmission method provided for another exemplary embodiment of the present application;

[0030] Figure 4 A flowchart of a data transmission method provided for another exemplary embodiment of the present application;

[0031] Figure 5 A schematic diagram of the structure of a computing device provided for another exemplary embodiment of the present application;

[0032] Figure 6 A schematic diagram of the structure of another computing device provided for yet another exemplary embodiment of the present application;

[0033] Figure 7A schematic diagram of the structure of yet another computing device provided for yet another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0035] Before starting to introduce the technical solutions provided by the embodiments of the present application in detail, several technical concepts involved in the present application are briefly explained as follows.

[0036] A message bus is a communication architecture used to transmit messages between distributed systems or different components. It provides an intermediary layer so that the components of the system can communicate through the publication and subscription of messages without the need for direct interaction.

[0037] Microservice architecture is a method of splitting a large monolithic application into a set of small, independent services. Each service runs in its own independent process, and the services communicate with each other through lightweight communication mechanisms.

[0038] During the research process, the inventors found that in a microservice architecture, a message bus is usually used to transmit data between microservices. For the message publisher, the data transmission process is uncontrollable, and the message publisher cannot direct the message to the designated target message receiver, resulting in the security of data transmission cannot be guaranteed.

[0039] To improve this problem, the embodiment of the present application provides a solution, the basic idea of ​​which is to modify the structure of the target message transmitted between the message publisher and the target message receiver, add a control payload on the basis of the message payload, and the control payload contains an executable script for selecting the target message receiver from the topic subscribers corresponding to the topic identifier for the message payload. The message publisher can specify the target message receiver for the target message through the control payload, so that only the target message receiver can obtain the message payload in the target message, avoiding the leakage of the message payload, thereby improving the security of data transmission.

[0040] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0041] Figure 1 The following is a schematic diagram of a data transmission system provided by an exemplary embodiment of the present application. Figure 1As shown, the system includes: a message publisher 10, a topic subscriber 20 and a message bus 30. The message publisher 10 and the topic subscriber 20 communicate with each other through the message bus 30. The message publisher 10 is the generator of the message and is responsible for sending the message to the message bus 30. The message publisher 10 can be a microservice in a microservice architecture, a service in a distributed system, or a device in an Internet of Things system. The topic subscriber 20 is the receiver of the message and obtains the message from the message bus 30 for processing. The topic subscriber 20 can be a microservice in a microservice architecture, a service in a distributed system, or a device in an Internet of Things system. The message bus 30 can be understood as an intermediary layer, which is responsible for receiving, routing and delivering messages to ensure that the message can be correctly delivered from the message publisher 10 to the topic subscriber 20. The message bus 30 itself is not a device or node with execution capabilities. It only provides a message transmission, routing and distribution mechanism. The actual execution of the message (such as calling a script, processing data, etc.) is completed by the message sending and receiving device or control node included therein. The message sending and receiving device or control node can be any system component that can receive and process messages. It can execute business logic related to the message and even trigger script execution. The technology used by the message bus 30 can be Apache Kafka, RabbitMQ, NATS, ActiveMQ, etc.

[0042] Among them, Apache Kafka is a distributed stream processing platform that is widely used for high-throughput messaging and log collection. RabbitMQ is a message queue middleware that supports multiple messaging protocols and is often used for asynchronous messaging. NATS is a lightweight message queue system that focuses on high-performance and low-latency messaging. ActiveMQ is an open source message queue implementation that supports various messaging protocols.

[0043] In practical applications, the number of accessible message publishers 10 in the data transmission system may be one or more, and the number of accessible topic subscribers 20 in the data transmission system may also be one or more. Figure 1 Only one message publisher 10 and one topic subscriber 20 are shown as an example, but this should not cause loss of the protection scope of the present application.

[0044] The data transmission system provided in this embodiment can be applied to various scenarios that need to rely on a message bus for data transmission, for example, different microservices in a microservice architecture can communicate through a message bus, multiple services in a distributed system can communicate through a message bus, and different business systems under an enterprise can communicate with each other and share data through a message bus, etc. Of course, these are only exemplary, and this embodiment does not limit the application scenarios.

[0045] In this embodiment, the message publisher 10 can construct a message payload based on the data to be transmitted and the subject identifier corresponding to the data to be transmitted. The data to be transmitted refers to the data that the message publisher 10 expects to share with the target message recipient, which usually refers to actual business data or event information. The data to be transmitted depends on the business logic and application scenario. The subject identifier corresponding to the data to be transmitted can be used to characterize the content type of the data to be transmitted.

[0046] In a messaging system, a topic is a classification identifier or label for a message, which is usually associated with the content type, event type, or business domain of the message. Topics provide a mechanism for message publishers and message receivers to accurately route messages to interested message receivers based on their topics. Message receivers can choose to subscribe to a topic and become topic subscribers, and topic subscribers can request access to messages related to the topic.

[0047] On this basis, the data to be transmitted and the subject identifier can be encapsulated to obtain the message payload. In computer networks or communication protocols, the message payload refers to the actual data or content carried in the message, usually the specific information that is expected to be transmitted in the message transmission. The payload is a part of the message, which contains valid information at the application layer or business layer, but does not include header information, tail information or other metadata (such as message header information, routing information, metadata, etc.) used for message transmission.

[0048] After constructing the message payload, the message publisher 10 can generate a control payload for the message payload, and the control payload includes an executable script for selecting a target message recipient from the topic subscribers corresponding to the topic identifier for the message payload. An executable script refers to a script file that can be directly executed by a computer. It contains a series of commands or instructions written according to the rules of a specific programming language. Such an executable script usually does not need to be compiled and can be directly run through an interpreter or a virtual machine. Accordingly, the control payload may also include an interpreter corresponding to the programming language of the executable script, so that the message bus 30 or the topic subscriber 20 can execute the executable script through the interpreter. For example, a Python script requires a Python interpreter to execute, and a Shell script requires a Bash interpreter to execute.

[0049] It can be understood that the executable script in the control payload is configured by the message publisher 10 according to the target information recipient that the message publisher actually wants to communicate with. The logic code in the executable script is the screening condition set for the target information recipient. The purpose is to execute this executable script and use the screening condition in the executable script to determine whether the current topic subscriber is the target message recipient.

[0050] Based on this, the message payload and the control payload can be encapsulated into a target message. The target message may include a message header, a message body, and message attributes. The message body is the core part of the target message and is used to carry the main data during the transmission process. The message body in the traditional target message only contains the message payload. This embodiment encapsulates the message payload and the control payload into the message body, and adds a control payload to the message body. The control payload can be understood as the access permission configured for the message payload. Only the topic subscribers with access permission can access the message payload.

[0051] Among them, encapsulating the control payload into the message body is achieved through various layers of the network protocol stack. Each layer will combine the control payload with the necessary control information according to the requirements of the protocol. In this way, the control payload can be smoothly transmitted in a complex environment through a series of encapsulation processes, and the reliability and integrity of the transmission can be guaranteed. Control information is usually related to the protocol layer. The physical layer is responsible for the physical transmission of data and usually does not involve specific data control information. The control information of the data link layer includes but is not limited to MAC addresses, error detection codes, frame types, etc. The control information of the network layer includes but is not limited to IP addresses, protocol fields, etc. The control information of the transport layer includes but is not limited to port numbers, sequence numbers, confirmation numbers, flags, window sizes, checksums, etc. The control information of the application layer includes but is not limited to the header information of the application protocol, metadata, etc.

[0052] In addition, the message header contains metadata about the target message, which helps the message bus identify, route and process messages. The message header includes but is not limited to message ID, timestamp, sender information, message format, etc. Message attributes are additional information of the target message. Different from the metadata in the message header, they are usually attributes related to message processing. Message attributes may include routing information, expiration time, persistence flag, etc. The target message may also contain a message signature to verify the integrity and source of the target message, which helps to ensure that the target message has not been tampered with during transmission.

[0053] After the message publisher 10 generates the target message, it can send the target message to the message bus so that the message bus can send the target message to the target message receiver. After receiving the target message, the message bus 30 can store the target message in the message queue corresponding to the subject identifier according to the subject identifier carried in the target message. The target message in the message queue can be requested by the subject subscriber corresponding to the subject identifier. The number of subject subscribers can be one or more. Although each subject subscriber can request the message bus to obtain the target message, only the subject subscriber who successfully obtains the message payload in the target message is the target message receiver.

[0054] In this embodiment, the target message recipient may be determined by the message bus or the topic subscriber. For example, the target message recipient may be determined by the message bus from the topic subscriber by running the executable script, or may be determined by the topic subscriber according to the execution status of the executable script after receiving the target message.

[0055] In one case, if the target message receiver is determined by the message bus, the message bus may determine the target message receiver from the topic subscribers by running an executable script.

[0056] For the message bus 30, it can receive the target message published by the message publisher 10. The target message includes a message payload and a control payload. The message payload includes a topic identifier, and the control payload includes an executable script for selecting a target message recipient from the topic subscribers corresponding to the topic identifier for the message payload.

[0057] When the message bus 30 receives a message acquisition request sent by a topic subscriber corresponding to the topic identifier, the target message can be determined according to the topic identifier carried in the message acquisition request. The number of determined target messages can be one or more. The message bus has the same processing logic for each target message. The following takes any target information as an example to introduce the processing logic of the message bus for the target information.

[0058] The message bus can parse the control payload from the target message, and use the configuration information carried in the message acquisition request as the input of the executable script to execute the executable script in the control payload. If the executable script is successfully executed, the topic subscriber can be used as the target message receiver, and the target message is provided to the target message receiver so that the target message receiver can parse the message payload from the target message. If the executable script fails to execute, it can be determined that the topic subscriber is not the target message receiver, and the target message is refused to be sent to the topic subscriber.

[0059] In this embodiment, for the message bus, on the basis of the publish-subscribe mode, an identity authentication link is added. The message bus can authenticate the topic subscriber who initiates the message acquisition request based on the control payload in the target message to verify whether the topic subscriber is the target message recipient specified by the message publisher. Only if the verification is successful will the target message be fed back to the topic subscriber who initiates the message acquisition request. This can achieve the purpose of the message publisher to control the target message recipient in a targeted manner and avoid leaking the target message to irrelevant topic subscribers, thereby effectively improving the security of data transmission.

[0060] In this optional implementation, the executable script may include selection conditions for selecting the target message recipient. The target message bus 30 may use the configuration information carried in the message acquisition request as the input of the executable script, and execute the executable script to determine whether the configuration information meets the selection conditions. Among them, the configuration information carried in the message acquisition request may include the environment information to which the topic subscriber belongs, the version information to which the topic subscriber belongs, the cluster information to which the topic subscriber belongs, and the address information to which the topic subscriber belongs. If the configuration information meets the selection conditions, it can be determined that the executable script is executed successfully. If the configuration information does not meet the selection conditions, it can be determined that the executable script fails to execute.

[0061] It can be understood that the executable script can be a section of code containing judgment logic, and the judgment logic represents the selection conditions for selecting the target message recipient. If the configuration information meets the judgment logic in the code, it is determined that the configuration information meets the selection conditions, and the executable script is executed successfully; if the configuration information does not meet the judgment logic in the code, it is determined that the configuration information does not meet the selection conditions, and the executable script fails to execute. That is, the message bus can respond to the message acquisition request initiated by the topic subscriber and automatically execute the executable script in the target message. By judging whether the configuration information meets the preset selection conditions, it can quickly determine whether the topic subscriber belongs to the preset target message recipient, thereby quickly determining whether to pass the target message to the topic subscriber, which can improve the efficiency of data transmission.

[0062] Of course, other executable script execution schemes may also be used, as long as the target message recipient can be selected, and no further limitations are made here.

[0063] Among them, the executable script can be flexibly configured by the message publisher 10. The following exemplarily shows several executable scripts and the execution logic of the message bus for the executable scripts:

[0064] 1. When the executable script is a logic code for filtering the target message receiver based on the target environment information, the environment information of the topic subscriber can be extracted from the configuration information, and it can be determined whether the environment information belongs to the target environment information. For example, the code in the executable script is: lang: "spel", body: "consumer.env == 'product'". This code limits the target environment information to "product environment". After receiving the message acquisition request sent by the topic subscriber, the environment information of the topic subscriber can be extracted from the message acquisition request. If the extracted environment information is "test environment", it can be determined that the environment information of the topic subscriber does not belong to the target environment information. Therefore, the message bus can determine that the topic subscriber is not the target message receiver and cannot feedback the target message to the topic subscriber.

[0065] 2. When the executable script is a logic code for filtering the target message receiver based on the target version information, the version information of the topic subscriber can be extracted from the configuration information, and it can be determined whether the version information belongs to the target version information. For example, the code in the executable script is: lang: "spel", body: "consumer.version>'1.0.0'". This code limits the target version information to a version higher than 1.0.0. After receiving the message acquisition request sent by the topic subscriber, the version information of the topic subscriber can be extracted from the message acquisition request. If the extracted environment information is version 1.0.0, it can be determined that the version information of the topic subscriber does not belong to the target version information. Therefore, the message bus can determine that the topic subscriber is not the target message receiver and cannot feedback the target message to the topic subscriber.

[0066] 3. When the executable script is a logic code for filtering the target message receiver based on the target cluster information, the cluster information to which the topic subscriber belongs can be extracted from the configuration information, and it can be determined whether the cluster information belongs to the target cluster information. For example, the code in the executable script is: lang: "spel", body: "consumer.cluster in ('a', 'b')". This code limits the target cluster information to a and b. After receiving the message acquisition request sent by the topic subscriber, the cluster information to which the topic subscriber belongs can be extracted from the message acquisition request. If the extracted environment information is c, it can be determined that the cluster information to which the topic subscriber belongs does not belong to the target cluster information. Therefore, the message bus can determine that the topic subscriber is not the target message receiver and cannot feedback the target message to the topic subscriber.

[0067] 4. When the executable script is a logic code for filtering the target message receiver based on the target address information, the address information of the topic subscriber can be extracted from the configuration information, and it can be determined whether the address information belongs to the target address information. For example, the code in the executable script is: lang: "spel", body: "consumer.Ip == '10.xxx'". This code limits the target address information to 10.xxx. After receiving the message acquisition request sent by the topic subscriber, the address information of the topic subscriber can be extracted from the message acquisition request. If the extracted address information is 10.aaa, it can be determined that the address information of the topic subscriber does not belong to the target address information. Therefore, the message bus can determine that the topic subscriber is not the target message receiver and cannot feedback the target message to the topic subscriber.

[0068] In another optional implementation, after receiving the target message, the topic subscriber may determine whether it is the target recipient according to the execution status of the executable script.

[0069] For the topic subscriber 20, a message acquisition request can be sent to the message bus, and the message acquisition request includes a topic identifier for retrieving the target information. The target message returned by the message bus is received, and the target message is retrieved by the message bus based on the topic identifier. It should be noted that the message bus can retrieve one or more target information based on the topic identifier. When multiple target messages are retrieved, multiple target information will be returned to the topic subscriber. Since the processing logic of each target information is the same, the following takes any target information as an example to introduce the processing logic of the topic subscriber for the target information.

[0070] After receiving the target message, the topic subscriber can parse the control payload from the target message. If the control payload cannot be parsed from the target message, the target message is discarded; if the control payload is parsed from the target message, the executable script in the control payload is executed based on the configuration information of the topic subscriber itself. Based on this, if the executable script is executed successfully, it can be determined as the recipient of the target message and the message payload can be parsed from the target message; if the executable script fails to execute, it is determined that it is not the recipient of the target message and the target message is discarded.

[0071] In this embodiment, for topic subscribers, they can no longer directly obtain all messages under the topic they subscribe to as in the traditional solution, but two layers of identity authentication are added: "parsing" and "execution". After receiving the target information, only when the control payload is successfully parsed and the executable script in the control payload is successfully executed, can the identity authentication preset by the message publisher be passed, and the message payload can be successfully parsed from the target message. This can achieve the purpose of the message publisher specifying the target message recipient, avoid leaking the target message to irrelevant topic subscribers, and effectively improve the security of data transmission.

[0072] In this optional implementation, the executable script may also include selection conditions for selecting the target message recipient. The topic subscriber 20 may use the configuration information as the input of the executable script and execute the executable script to determine whether the configuration information meets the selection conditions. If the configuration information meets the selection conditions, it can be determined that the executable script is executed successfully; if the configuration information does not meet the selection conditions, it can be determined that the executable script fails to execute. As described above, by determining whether the configuration information meets the preset selection conditions, it can be quickly determined whether it belongs to the preset target message recipient, thereby deciding to retain or discard the target message, thereby improving the efficiency of data transmission.

[0073] Of course, other executable script execution schemes may also be used, as long as the target message recipient can be selected, and no further limitations are made here.

[0074] Among them, the executable script can be flexibly configured by the message publisher 10. The following exemplarily shows several executable scripts and the execution logic of the topic subscriber for the executable scripts:

[0075] When the executable script is a logic code for filtering the target message recipient based on the target environment information, the environment information to which the subject subscriber belongs can be extracted from the configuration information, and it can be determined whether the environment information belongs to the target environment information. When the executable script is a logic code for filtering the target message recipient based on the target version information, the version information to which the subject subscriber belongs can be extracted from the configuration information, and it can be determined whether the version information belongs to the target version information. When the executable script is a logic code for filtering the target message recipient based on the target cluster information, the cluster information to which the subject subscriber belongs can be extracted from the configuration information, and it can be determined whether the cluster information belongs to the target cluster information. When the executable script is a logic code for filtering the target message recipient based on the target address information, the address information to which the subject subscriber belongs can be extracted from the configuration information, and it can be determined whether the address information belongs to the target address information.

[0076] In summary, in this embodiment, the message publisher can construct a control payload for the message payload, and the control payload contains an executable script for selecting a target message recipient from the topic subscribers corresponding to the topic identifier for the message payload, and encapsulates the message payload and the control payload into a target message and sends it to the message bus, so that the message bus can send the target message to the target message recipient. In this way, the structure of the target message is transformed, and the control payload is added on the basis of the message payload. The message publisher can specify the target message recipient for the target message through the control payload, and the control payload can be used to authenticate the topic subscriber corresponding to the topic identifier in the message payload, so that only the target message recipient can obtain the message payload in the target message, avoiding the leakage of the message payload, thereby improving the security of data transmission.

[0077] In the above or below embodiments, the message publisher 10 may generate a control payload for the message payload in a variety of implementations.

[0078] Optionally, the message publisher 10 may generate an executable script in a target programming language in response to a conditional configuration operation performed on the message payload, and generate a control payload based on the identification information of the target programming language and the executable script. Among them, the executable script may include selection conditions configured by the conditional configuration operation for selecting a target message recipient. The target programming language mentioned here is the programming language selected by the message publisher 10 according to its own environment. The identification information of the target programming language can be used to characterize the language type of the target programming language, and the language type may include but is not limited to JavaScript, Lua, SPEL, Python, etc. The message publisher can flexibly select a suitable target programming language to generate a control payload according to actual needs, which alleviates the execution restrictions caused by the language type and enhances the applicability of the control payload.

[0079] For example, in response to an environment configuration operation performed on a message payload, the target environment information configured by the environment configuration operation for selecting a target message recipient may be determined, and a logic code for filtering the target message recipient based on the target environment information may be written in a target programming language as an executable script. In response to a version configuration operation performed on a message payload, the target version information configured by the version configuration operation for selecting a target message recipient may be determined, and a logic code for filtering the target message recipient based on the target version information may be written in a target programming language as an executable script. In response to a cluster configuration operation performed on a message payload, the target cluster information configured by the cluster configuration operation for selecting a target message recipient may be determined, and a logic code for filtering the target message recipient based on the target cluster information may be written in a target programming language as an executable script. In response to an address configuration operation performed on a message payload, the target address information configured by the address configuration operation for selecting a target message recipient may be determined, and a logic code for filtering the target message recipient based on the target address information may be written in a target programming language as an executable script.

[0080] In summary, in this embodiment, the message publisher can flexibly define the judgment logic inside the executable script according to the actual data transmission requirements. By adjusting the control payload as needed, the message publisher can dynamically specify the target message recipient for any target message, thereby achieving directional delivery of the target message and ensuring the security of data transmission.

[0081] In the above or following embodiments, an associated operation script may also be configured in the control payload. The associated operation script may be used to describe associated operations configured for the message payload. The associated operations include but are not limited to consumption reporting statistics, log reporting, third event triggering, concurrency control, or delay time control.

[0082] The message publisher 10 may obtain the associated operation script configured for the message payload and add the associated operation script to the control payload, so that the target message receiver may run the associated operation script upon receiving the target message to perform associated operations on the message payload.

[0083] For the target message receiver, after receiving the target message, the control payload can be parsed from the target message. If the control payload cannot be parsed from the target message, the target message is discarded. If the control payload is successfully parsed, the associated operation script is parsed from the control payload and the associated operation script is executed to perform the associated operation on the message payload.

[0084] For example, if the associated operation described in the associated operation script is triggered by the third event, the code in the associated operation script can be: "spel", "http.get('htpp: / / 10.xxx:1080 / event')", the trigger address of the third event can be configured in the associated operation script, and the target message recipient can automatically trigger the execution of the third event after receiving the target message. If the associated operation described in the associated operation script is concurrency control, the code in the associated operation script can be: "spel", "consumer.concurrency=10", the number of tasks allowed to be processed simultaneously can be configured in the associated operation script, and the number of tasks currently being processed simultaneously can be automatically controlled after the target message recipient receives the target message.

[0085] Of course, these are only exemplary, and the associated operations may also include consumption statistics reporting, log reporting, delay time control, etc. No further examples are given here.

[0086] In summary, in this embodiment, by configuring the associated operation script in the control payload, the target message recipient can be provided with additional capabilities associated with the target message, which expands the functions of the target message recipient and further enriches the functions supported by the target message recipient.

[0087] Figure 2 A flowchart of a data transmission method provided by an exemplary embodiment of the present application. The method can be executed by a data processing device, which can be implemented as a combination of software and / or hardware, and the data processing device can be integrated in a computing device. Figure 2 , the method comprising:

[0088] Step 200, constructing a message payload based on the data to be transmitted and the subject identifier corresponding to the data to be transmitted;

[0089] Step 201, generating a control payload for a message payload, wherein the control payload includes an executable script for selecting a target message receiver from topic subscribers corresponding to a topic identifier for the message payload;

[0090] Step 202, encapsulate the message payload and the control payload into a target message;

[0091] Step 203, sending the target message to the message bus, so that the message bus sends the target message to the target message recipient; wherein the target message recipient is determined by the message bus from the topic subscribers by running the executable script, or is determined by the topic subscriber based on the running status of the executable script after receiving the target message.

[0092] In an optional embodiment, the specific implementation of step 201 may be:

[0093] In response to a conditional configuration operation performed on a message payload, an executable script is generated in a target programming language, wherein the executable script includes selection conditions configured by the conditional configuration operation for selecting a target message recipient; a control payload is generated according to identification information of the target programming language and the executable script.

[0094] In an optional embodiment, in response to the conditional configuration operation performed on the message payload, an executable script is generated in a target programming language, including at least one of the following:

[0095] In response to an environment configuration operation performed on a message payload, determining target environment information configured by the environment configuration operation for selecting a target message recipient, and using a target programming language to write logic code for screening the target message recipient based on the target environment information as an executable script;

[0096] In response to the version configuration operation performed on the message payload, determining the target version information configured by the version configuration operation for selecting the target message recipient, and writing logic code for screening the target message recipient based on the target version information in a target programming language as an executable script;

[0097] In response to the cluster configuration operation performed on the message payload, determining target cluster information configured by the cluster configuration operation for selecting a target message recipient, and using a target programming language to write logic code for screening the target message recipient based on the target cluster information as an executable script;

[0098] In response to the address configuration operation performed on the message payload, the target address information configured by the address configuration operation for selecting the target message recipient is determined, and a logic code for screening the target message recipient based on the target address information is written in a target programming language as an executable script.

[0099] In an optional embodiment, an associated operation script configured for the message payload can also be obtained. The associated operation script is used to describe the associated operations configured for the message payload. The associated operations include log reporting and third event triggering. The associated operation script is added to the control payload so that the target message recipient runs the associated operation script upon receiving the target message to perform the associated operation on the message payload.

[0100] The technical details in each embodiment of the above-mentioned data transmission method can refer to the relevant description of the actions of the message publisher in each embodiment of the aforementioned data transmission system. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0101] Figure 3 A flowchart of a data transmission method provided for another exemplary embodiment of the present application. The method can be executed by a data processing device, which can be implemented as a combination of software and / or hardware, and the data processing device can be integrated in a computing device. Figure 3 , the method comprising:

[0102] Step 300, receiving a target message sent by a message publisher, the target message including a message payload and a control payload, the message payload including a topic identifier, and the control payload including an executable script for selecting a target message recipient from topic subscribers corresponding to the topic identifier for the message payload;

[0103] Step 301, when receiving a message acquisition request sent by a topic subscriber corresponding to the topic identifier, parsing the control payload from the target message;

[0104] Step 302: Use the configuration information carried in the message acquisition request as input of the executable script to execute the executable script in the control payload;

[0105] Step 303, when the executable script is executed successfully, the topic subscriber may be used as the target message receiver, and the target message is provided to the target message receiver so that the target message receiver can parse the message payload from the target message.

[0106] In an optional embodiment, the executable script includes a selection condition for selecting a target message recipient, and the specific implementation of step 302 may be:

[0107] The configuration information is used as the input of the executable script, and the executable script is executed to determine whether the configuration information meets the selection conditions; if the configuration information meets the selection conditions, it is determined that the executable script is executed successfully; if the configuration information does not meet the selection conditions, it is determined that the executable script fails to execute.

[0108] In an optional embodiment, the configuration information is used as an input of an executable script, and the executable script is executed to determine whether the configuration information meets the selection condition, including at least one of the following:

[0109] When the executable script is a logic code for filtering the target message receiver based on the target environment information, the environment information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the environment information belongs to the target environment information;

[0110] When the executable script is a logic code for filtering the target message receiver based on the target version information, the version information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the version information belongs to the target version information;

[0111] When the executable script is a logic code for filtering target message receivers based on target cluster information, the cluster information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the cluster information belongs to the target cluster information;

[0112] When the executable script is a logic code for filtering target message recipients based on target address information, the address information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the address information belongs to the target address information.

[0113] The technical details in each embodiment of the above-mentioned data transmission method can refer to the relevant description of the action of the message bus in each embodiment of the above-mentioned data transmission system. In order to save space, they will not be repeated here, but this should not cause a loss of the protection scope of this application.

[0114] Figure 4 A flowchart of a data transmission method provided for another exemplary embodiment of the present application. The method can be executed by a data processing device, which can be implemented as a combination of software and / or hardware, and the data processing device can be integrated in a computing device. Figure 4 , the method comprising:

[0115] Step 400, sending a message acquisition request to the message bus, wherein the message acquisition request includes a subject identifier for retrieving target information;

[0116] Step 401, receiving a target message returned by the message bus, where the target message is retrieved by the message bus based on a topic identifier;

[0117] Step 402: If the control payload is parsed from the target message, the executable script in the control payload is executed based on the configuration information of the topic subscriber itself;

[0118] Step 403: If the executable script is executed successfully, the topic subscriber is determined as the target message receiver, and the message payload is parsed from the target message.

[0119] In an optional embodiment, the executable script includes a selection condition for selecting a target message recipient, and the specific implementation of step 402 may be:

[0120] The configuration information is used as the input of the executable script, and the executable script is executed to determine whether the topic subscriber information meets the selection conditions;

[0121] If the configuration information meets the selection criteria, it is determined that the executable script is executed successfully;

[0122] If the configuration information does not meet the selection criteria, it is determined that the executable script execution fails.

[0123] In an optional embodiment, after parsing the message payload from the target message, an associated operation script can also be parsed from the control payload. The associated operation script is used to describe the associated operations configured for the message payload. The associated operations include log reporting and third event triggering. The associated operation script is executed to perform the associated operations on the message payload.

[0124] In an optional embodiment, if the control payload cannot be parsed from the target message, or the executable script fails to execute, the target message is discarded.

[0125] The technical details in each embodiment of the above-mentioned data transmission method can refer to the relevant description of the actions of the topic subscriber in each embodiment of the aforementioned data transmission system. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0126] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 400 to 403 can be device A; for another example, the execution subject of steps 401 and 402 can be device A, and the execution subject of step 403 can be device B; and so on.

[0127] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 401, 402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.

[0128] Figure 5 A schematic diagram of a computing device provided as another exemplary embodiment of the present application is shown in FIG. Figure 5 As shown, the computing device includes: a memory 50 , a processor 51 and a communication component 52 .

[0129] The processor 51 is coupled to the memory 50 and is used to execute the computer program in the memory 50 to:

[0130] Constructing a message payload based on the data to be transmitted and the subject identifier corresponding to the data to be transmitted;

[0131] Generate a control payload for the message payload, the control payload including an executable script for selecting a target message receiver from topic subscribers corresponding to the topic identifier for the message payload;

[0132] Encapsulate the message payload and the control payload into a target message;

[0133] The target message is sent to the message bus through the communication component 52, so that the message bus sends the target message to the target message recipient; wherein the target message recipient is determined by the message bus from the topic subscribers by running the executable script, or is determined by the topic subscriber based on the running status of the executable script after receiving the target message.

[0134] In an optional embodiment, in the process of generating a control payload for a message payload, the processor 51 is further configured to:

[0135] In response to the conditional configuration operation performed on the message payload, an executable script is generated in a target programming language, wherein the executable script includes a selection condition configured by the conditional configuration operation for selecting a target message recipient;

[0136] Generates control payload based on identification information and executable scripts of the target programming language.

[0137] In an optional embodiment, in response to the conditional configuration operation performed on the message payload, during the process of generating an executable script using the target programming language, the processor 51 may be configured to perform at least one of the following operations:

[0138] In response to an environment configuration operation performed on a message payload, determining target environment information configured by the environment configuration operation for selecting a target message recipient, and using a target programming language to write logic code for screening the target message recipient based on the target environment information as an executable script;

[0139] In response to the version configuration operation performed on the message payload, determining the target version information configured by the version configuration operation for selecting the target message recipient, and writing logic code for screening the target message recipient based on the target version information in a target programming language as an executable script;

[0140] In response to the cluster configuration operation performed on the message payload, determining target cluster information configured by the cluster configuration operation for selecting a target message recipient, and using a target programming language to write logic code for screening the target message recipient based on the target cluster information as an executable script;

[0141] In response to the address configuration operation performed on the message payload, the target address information configured by the address configuration operation for selecting the target message recipient is determined, and a logic code for screening the target message recipient based on the target address information is written in a target programming language as an executable script.

[0142] In an optional embodiment, the processor 51 is further configured to:

[0143] Obtaining the associated operation script configured for the message payload, where the associated operation script is used to describe the associated operations configured for the message payload, including log reporting and third event triggering;

[0144] The associated operation script is added to the control payload, so that the target message receiver runs the associated operation script when receiving the target message, so as to perform the associated operation on the message payload.

[0145] Further, if Figure 5 As shown, the computing device also includes: a display 53, a power supply component 54 and other components. Figure 5 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 5 Components shown.

[0146] It is worth noting that the technical details in the above-mentioned embodiments of the computing device can refer to the relevant description of the actions of the information publisher in the aforementioned data transmission system embodiment. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0147] Figure 6 A schematic diagram of the structure of another computing device provided by another exemplary embodiment of the present application. Figure 5 As shown, the computing device includes: a memory 60 , a processor 61 and a communication component 62 .

[0148] The processor 61 is coupled to the memory 60 and is configured to execute the computer program in the memory 60 to:

[0149] Receive a target message sent by a message publisher through the communication component 62, the target message including a message payload and a control payload, the message payload including a topic identifier, and the control payload including an executable script for selecting a target message receiver from topic subscribers corresponding to the topic identifier for the message payload;

[0150] When receiving a message acquisition request sent by a topic subscriber corresponding to the topic identifier, parsing the control payload from the target message;

[0151] The configuration information carried in the message acquisition request is used as the input of the executable script to execute the executable script in the control payload;

[0152] When the executable script is successfully executed, the topic subscriber is used as the target message receiver, and the target message is provided to the target message receiver so that the target message receiver can parse the message payload from the target message.

[0153] In an optional embodiment, the executable script includes a selection condition for selecting a target message recipient, and the configuration information carried in the message acquisition request is used as an input of the executable script. During the execution of the executable script in the control payload, the processor 61 is further configured to:

[0154] The configuration information is used as input of the executable script, and the executable script is executed to determine whether the configuration information meets the selection condition;

[0155] If the configuration information meets the selection criteria, it is determined that the executable script is executed successfully;

[0156] If the configuration information does not meet the selection criteria, it is determined that the executable script execution fails.

[0157] In an optional embodiment, in the process of taking the configuration information as the input of the executable script, executing the executable script, and determining whether the configuration information meets the selection condition, the processor 61 is further configured to:

[0158] When the executable script is a logic code for filtering the target message receiver based on the target environment information, the environment information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the environment information belongs to the target environment information;

[0159] When the executable script is a logic code for filtering the target message receiver based on the target version information, the version information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the version information belongs to the target version information;

[0160] When the executable script is a logic code for filtering target message receivers based on target cluster information, the cluster information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the cluster information belongs to the target cluster information;

[0161] When the executable script is a logic code for filtering target message recipients based on target address information, the address information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the address information belongs to the target address information.

[0162] Further, if Figure 6As shown, the computing device also includes: a display 63, a power supply component 64 and other components. Figure 6 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 6 Components shown.

[0163] It is worth noting that the technical details in the above-mentioned embodiments of the computing device can refer to the relevant description of the actions of the message bus in the aforementioned embodiments of the data transmission system. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0164] Figure 7 A schematic diagram of a computing device provided as another exemplary embodiment of the present application is shown in FIG. Figure 7 As shown, the computing device includes: a memory 70 , a processor 71 and a communication component 72 .

[0165] The processor 71 is coupled to the memory 70 and is configured to execute the computer program in the memory 70 to:

[0166] Sending a message acquisition request to the message bus through the communication component 72, wherein the message acquisition request includes a subject identifier for retrieving target information;

[0167] Receive the target message returned by the message bus. The target message is retrieved by the message bus based on the topic identifier.

[0168] If the control payload is parsed from the target message, the executable script in the control payload is executed based on the configuration information of the topic subscriber itself;

[0169] If the executable script is executed successfully, the topic subscriber is determined as the target message receiver, and the message payload is parsed from the target message.

[0170] In an optional embodiment, the executable script includes a selection condition for selecting a target message recipient. Based on the configuration information of the topic subscriber itself, during the execution of the executable script in the control payload, the processor 71 is further configured to:

[0171] The configuration information is used as input of the executable script, and the executable script is executed to determine whether the configuration information meets the selection condition;

[0172] If the configuration information meets the selection criteria, it is determined that the executable script is executed successfully;

[0173] If the configuration information does not meet the selection criteria, it is determined that the executable script execution fails.

[0174] In an optional embodiment, after parsing the message payload from the target message, the processor 71 is further configured to include:

[0175] Parse the associated operation script from the control payload, where the associated operation script is used to describe the associated operation configured for the message payload, including log reporting and third event triggering;

[0176] Execute the correlation operation script to perform the correlation operation on the message payload.

[0177] In an optional embodiment, if the control payload cannot be parsed from the target message, or the executable script fails to execute, the processor 71 may discard the target message.

[0178] Further, if Figure 7 As shown, the computing device also includes: a display 73, a power supply component 74 and other components. Figure 7 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 7 Components shown.

[0179] It is worth noting that the technical details in the above-mentioned embodiments of the computing device can refer to the relevant descriptions of the actions of the topic subscriber in the aforementioned embodiments of the data transmission system. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0180] The embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the above-mentioned data transmission method can be implemented. It should be noted that the technical solution of the computer program and the technical solution of the above-mentioned data transmission method belong to the same concept, and the details not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the above-mentioned data transmission method.

[0181] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by a computing device in the above method embodiment.

[0182] Above Figure 5-7 The memory in the computer is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0183] Above Figure 5-7The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0184] Above Figure 5-7 The display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0185] Above Figure 5-7 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

[0186] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0187] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0190] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0191] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0192] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0193] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0194] 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, stored data, displayed data, 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 relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0195] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A data transmission method, characterized in that: Applicable to a message publisher, the method includes: Constructing a message payload based on the data to be transmitted and a subject identifier corresponding to the data to be transmitted; Generate a control payload for the message payload, wherein the control payload includes an executable script for selecting a target message recipient from the topic subscribers corresponding to the topic identifier for the message payload; Encapsulating the message payload and the control payload into a target message; The target message is sent to a message bus, so that the message bus sends the target message to the target message recipient; wherein the target message recipient is determined by the message bus from the topic subscribers by running the executable script, or is determined by the topic subscriber according to the running status of the executable script after receiving the target message.

2. The method according to claim 1, characterized in that Generating a control payload for the message payload includes: In response to the conditional configuration operation performed on the message payload, generating the executable script in a target programming language, the executable script including the selection condition configured by the conditional configuration operation for selecting a target message recipient; A control payload is generated according to the identification information of the target programming language and the executable script.

3. The method according to claim 2, characterized in that In response to the conditional configuration operation performed on the message payload, generating the executable script in a target programming language includes at least one of the following: In response to an environment configuration operation performed on the message payload, determining target environment information configured by the environment configuration operation for selecting a target message recipient, and using the target programming language to write logic code for screening the target message recipient based on the target environment information as the executable script; In response to the version configuration operation performed on the message payload, determining the target version information configured by the version configuration operation for selecting the target message recipient, and using the target programming language to write a logic code for screening the target message recipient based on the target version information as the executable script; In response to a cluster configuration operation performed on the message payload, determining target cluster information configured by the cluster configuration operation for selecting a target message recipient, and using the target programming language to write a logic code for screening the target message recipient based on the target cluster information as the executable script; In response to the address configuration operation performed on the message payload, the target address information configured by the address configuration operation for selecting the target message recipient is determined, and logic code for screening the target message recipient based on the target address information is written in the target programming language as the executable script.

4. The method according to claim 1, characterized in that: Also includes: Acquire an associated operation script configured for the message payload, where the associated operation script is used to describe an associated operation configured for the message payload, where the associated operation includes log reporting and third event triggering; The associated operation script is added to the control payload, so that the target message receiver runs the associated operation script when receiving the target message, so as to perform an associated operation on the message payload.

5. A data transmission method, characterized in that: Applicable to a message bus, the method comprises: Receive a target message sent by a message publisher, wherein the target message includes a message payload and a control payload, wherein the message payload includes a topic identifier, and the control payload includes an executable script for selecting a target message recipient from topic subscribers corresponding to the topic identifier for the message payload; When receiving a message acquisition request sent by a topic subscriber corresponding to the topic identifier, parsing a control payload from the target message; Using the configuration information carried in the message acquisition request as input of the executable script, and executing the executable script in the control payload; When the executable script is successfully executed, the topic subscriber is used as a target message receiver, and the target message is provided to the target message receiver so that the target message receiver can parse the message payload from the target message.

6. The method according to claim 5, characterized in that The executable script includes a selection condition for selecting a target message recipient, and the configuration information carried in the message acquisition request is used as an input of the executable script to execute the executable script in the control payload, including: Using the configuration information as input of the executable script, executing the executable script, and determining whether the configuration information meets the selection condition; If the configuration information meets the selection condition, determining that the executable script is executed successfully; If the configuration information does not meet the selection condition, it is determined that the execution of the executable script fails.

7. The method according to claim 6, characterized in that Using the configuration information as input of the executable script, executing the executable script, and determining whether the configuration information meets the selection condition includes: When the executable script is a logic code for filtering target message recipients based on target environment information, extracting the environment information to which the topic subscriber belongs from the configuration information, and determining whether the environment information belongs to the target environment information; When the executable script is a logic code for filtering target message recipients based on target version information, the version information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the version information belongs to the target version information; When the executable script is a logic code for filtering target message recipients based on target cluster information, the cluster information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the cluster information belongs to the target cluster information; When the executable script is a logic code for filtering target message recipients based on target address information, the address information to which the topic subscriber belongs is extracted from the configuration information, and it is determined whether the address information belongs to the target address information.

8. A data transmission method, characterized in that: Applicable to topic subscribers, the method includes: Sending a message acquisition request to the message bus, wherein the message acquisition request includes a subject identifier for retrieving target information; receiving a target message returned by the message bus, wherein the target message is retrieved by the message bus based on the topic identifier; If a control payload is parsed from the target message, the executable script in the control payload is executed based on the configuration information of the topic subscriber itself; If the executable script is executed successfully, the topic subscriber is determined as the target message recipient, and the message payload is parsed from the target message.

9. The method according to claim 8, characterized in that The executable script includes a selection condition for selecting a target message recipient, and the executable script in the control payload is executed based on the configuration information of the topic subscriber itself, including: Using the configuration information as input of the executable script, executing the executable script, and determining whether the configuration information meets the selection condition; If the configuration information meets the selection condition, determining that the executable script is executed successfully; If the configuration information does not meet the selection condition, it is determined that the execution of the executable script fails.

10. The method according to claim 8, characterized in that After parsing the message payload from the target message, the method further includes: Parsing an associated operation script from the control payload, wherein the associated operation script is used to describe an associated operation configured for the message payload, wherein the associated operation includes log reporting and a third event triggering; The association operation script is executed to perform an association operation on the message payload.

11. The method according to claim 8, characterized in that Also includes: If the control payload cannot be parsed from the target message, or the executable script fails to execute, the target message is discarded.

12. A computing device, characterized in that: Includes memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is coupled to the memory and the communication component, and is configured to execute the one or more computer instructions to execute the data transmission method according to any one of claims 1 to 11.

13. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the data transmission method according to any one of claims 1 to 11.