A participant matching method and related device based on a DDS protocol

By constructing the first parameter table and the second parameter table and judging participant matching in combination with the data type, the data security problem caused by unexpected participant matching in the DDS protocol is solved, and secure participant matching is achieved.

CN119484086BActive Publication Date: 2025-10-10BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411604187.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-10-10
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

In the existing DDS protocol, during the participant matching phase, unexpected participants may be matched with existing participants in the domain, resulting in poor data security.

Method used

By constructing the first parameter table and the second parameter table of the target participant, it is determined whether the participant's address is located in these tables, and combined with the type of the first data, it is determined whether the participant matches, ensuring that only expected trusted participants are matched.

Benefits of technology

It improves the security of information transmission, avoids improper matching between unexpected participants and existing participants in the domain, and solves the problem of poor data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484086B_ABST
    Figure CN119484086B_ABST
Patent Text Reader

Abstract

The application discloses a participant matching method based on a DDS protocol and related devices, and relates to the technical field of communication. The method comprises the following steps: acquiring a first parameter table, a second parameter table and first data of a target participant; judging whether the address of a first participant is located in the first parameter table or the second parameter table; if the address of the first participant is located in the first parameter table, determining that the first participant is matched with the target participant; if the address of the first participant is located in the second parameter table, judging whether the first participant is matched with the target participant based on the first data; and if the address of the first participant is located outside the first parameter table and the second parameter table, determining that the first participant is not matched with the target participant. The method disclosed in the application can make the target participant at most be matched with the participants in the first parameter table and the second parameter table through the mutual cooperation of the first parameter table, the second parameter table and the first data, and solve the problem of poor data security in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a participant matching method and related devices based on the DDS protocol. Background Art

[0002] The Data Distribution Service (DDS) protocol is a data-centric middleware protocol that meets the needs of a variety of distributed real-time communication applications. The DDS protocol proposes a data-centric publish-subscribe communication middleware model; this model includes domains, participants, publishers, data writers, subscribers, data readers, and topics.

[0003] A domain represents the communication plane; only entities within the same domain can communicate. Participants are containers for entities within a domain. A publisher is a communication entity that publishes topic data and is associated with at least one data writer. Data writers write the topic data to be published from the application layer to themselves. A subscriber is a communication entity that subscribes to topic data and is associated with at least one data reader. Data readers pass the topic data received by subscribers to the application layer. In the publish-subscribe communication middleware model, data is identified by topics. Publishers publish data based on topics, and subscribers subscribe to data based on topics of interest.

[0004] In the current publish-subscribe communication middleware model, communication between participants within a domain requires two matching phases: participant matching and endpoint matching. The former is based on the Simple Participant Discovery Protocol (SPDP), while the latter is based on the Simple Endpoint Discovery Protocol (SEDP).

[0005] During the participant matching phase, participants periodically send SPDP's built-in endpoint data (pdata) to announce their presence on the network. Other participants receive this pdata and parse it using their own built-in endpoints to achieve participant matching. Once two participants are successfully matched, endpoint matching between them is then achieved using SEDP.

[0006] If the address used to send pdata during the participant matching phase is a multicast address, new participants will also receive the pdata and be matched. This can cause unexpected participants to be matched with existing participants in the domain. If, after participant matching is achieved, endpoint matching is then performed between two participants, the unexpected participant will establish a communication connection with the existing participant in the domain, and the data of the existing participant will be received by the unexpected participant, posing a certain security risk. Summary of the Invention

[0007] Based on the above problems, this application provides a participant matching method based on the DDS protocol to solve the problem of matching unexpected participants with existing participants in the domain after they come online, thereby improving the security of information transmission.

[0008] In a first aspect, the present application provides a participant matching method based on the DDS protocol, comprising:

[0009] Obtaining a first parameter table, a second parameter table, and first data of a target participant; the first parameter table records the addresses of multiple participants allowed to communicate with the target participant; the second parameter table records the multicast address monitored by the target participant; the first data indicates whether the target participant receives messages sent by participants outside the first parameter table;

[0010] Determining that the sender of the message received by the target participant is the first participant, and determining whether the address of the first participant is located in the first parameter table or the second parameter table;

[0011] If the address of the first participant is in the first parameter table, determining that the first participant matches the target participant;

[0012] If the address of the first participant is in the second parameter table, determining whether the first participant matches the target participant based on the first data;

[0013] If the address of the first participant is outside the first parameter table and outside the second parameter table, it is determined that the first participant does not match the target participant.

[0014] In an optional implementation, determining whether the first participant matches the target participant based on the first data includes:

[0015] Obtaining a type of the first data; the type of the first data includes a first type and a second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table;

[0016] If the first data is data of the first type, determining that the first participant matches the target participant;

[0017] If the first data is data of the second type, it is determined that the first participant and the target participant do not match.

[0018] In an optional implementation, the method for constructing the first parameter table includes:

[0019] Get the addresses of multiple preset participants;

[0020] The first parameter table is constructed based on the addresses of the plurality of participants.

[0021] In an optional implementation, the method for constructing the second parameter table includes:

[0022] Get the preset multicast address;

[0023] The second parameter table is constructed based on the multicast address.

[0024] In an optional implementation, the method further includes:

[0025] For each of the multiple participants, obtaining preset parameters corresponding to each participant; the preset parameters include preset addresses of the multiple participants and a preset multicast address;

[0026] Based on the preset parameters corresponding to each participant, a first parameter table and a second parameter table for each participant are constructed.

[0027] In an optional implementation, the method further includes:

[0028] Add or delete the address of the participant in the first parameter table;

[0029] and\or, adding or deleting multicast addresses in the second parameter table;

[0030] and / or, changing the type of the first data.

[0031] A second aspect of the present application provides a participant matching device based on the DDS protocol, comprising:

[0032] A first data acquisition module is configured to acquire a first parameter table, a second parameter table, and first data of a target participant; the first parameter table records the addresses of multiple participants allowed to communicate with the target participant; the second parameter table records the multicast address monitored by the target participant; and the first data indicates whether the target participant receives messages sent by participants outside the first parameter table.

[0033] a participant determination module, configured to determine that the sender of the message received by the target participant is a first participant, and to judge whether the address of the first participant is located in the first parameter table or the second parameter table;

[0034] a first judgment module, configured to determine that the first participant matches the target participant if the address of the first participant is in the first parameter table;

[0035] a second determination module, configured to determine whether the first participant matches the target participant based on the first data if the address of the first participant is located in the second parameter table;

[0036] The third judgment module is configured to determine that the first participant does not match the target participant if the address of the first participant is outside the first parameter table and outside the second parameter table.

[0037] In an optional implementation, the second judgment module includes:

[0038] a data type determining unit, configured to obtain a type of the first data; the type of the first data includes a first type and a second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table;

[0039] a first judgment unit, configured to determine that the first participant matches the target participant if the first data is data of the first type;

[0040] The second judgment unit is configured to determine that the first participant and the target participant do not match if the first data is data of the second type.

[0041] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any implementation of the first aspect.

[0042] A fourth aspect of the present application provides an electronic device, including:

[0043] a memory having a computer program stored thereon;

[0044] A processor is used to execute the computer program in the memory to implement the steps of the method introduced in any implementation manner of the first aspect.

[0045] Compared with the prior art, this application has the following beneficial effects:

[0046] The present application discloses a participant matching method based on the DDS protocol, comprising: obtaining a first parameter table, a second parameter table, and first data of a target participant; determining whether the address of the first participant is located in the first parameter table or in the second parameter table; if the address of the first participant is located in the first parameter table, determining that the first participant matches the target participant; if the address of the first participant is located in the second parameter table, determining whether the first participant matches the target participant based on the first data; if the address of the first participant is located outside the first parameter table and outside the second parameter table, determining that the first participant does not match the target participant.

[0047] Since the first parameter table in this application records the addresses of multiple participants allowed to communicate with the target participant, and the second parameter table records the preset multicast address listened to by the target participant, the participants in the first parameter table and the second parameter table are all expected participants and are all trustworthy participants.

[0048] The method disclosed in the present application, through the mutual coordination of the first parameter table, the second parameter table and the first data, enables the target participant to be matched with the participants in the first parameter table and the second parameter table at most, thereby avoiding the problem in the prior art that the target participant may be matched with an unexpected participant with unknown credibility, and avoiding the data of the original participants in the domain from flowing into an unexpected participant with unknown credibility, thereby solving the problem of poor data security in the existing scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0050] Figure 1 A schematic diagram of data communication interaction in a conventional solution provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of a participant matching method based on the DDS protocol provided in an embodiment of the present application;

[0052] Figure 3A schematic diagram of data communication interaction provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a network topology structure of a traditional solution provided in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of a network topology provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of the structure of a participant matching device based on the DDS protocol provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] As described above, in the current publish-subscribe communication middleware model, communication between participants within a domain requires two phases of matching: participant matching and endpoint matching. The former is implemented based on a simple participant discovery protocol, while the latter is implemented based on a simple endpoint discovery protocol.

[0057] It is understandable that although a domain may include multiple participants, the information exchange process between each two participants is the same. For ease of understanding, the following uses the information exchange process between two participants as an example to introduce the data communication interaction process of the traditional solution.

[0058] Figure 1 A schematic diagram of data communication interaction of a traditional solution provided in an embodiment of the present application. Figure 1 The diagram below shows the interaction diagram of data communication between two participants in the domain, namely the participant on the publishing side and the participant on the subscription side. Figure 1 As shown in Figure 1, data communication between the publisher and subscriber is divided into three processes. The first is the SPDP process, also known as the participant matching process; the second is the SEDP process, also known as the endpoint matching process; and the third is the user data transmission process. For the publisher and subscriber to communicate data, that is, to transmit user data, they must match the two participants through the SPDP process and match the endpoints of the two participants through the SEDP process.

[0059] Combine Figure 1 As shown in the figure, the SPDP process is that the participants at the publishing end in the domain send pdata to the multicast address, and the participants at the subscribing end in the domain will listen to the messages of the multicast address. When the participants at the subscribing end receive the pdata sent to the multicast address by the participants at the publishing end, they will use their own built-in endpoints to parse the received pdata and achieve matching between the participants at the publishing end and the participants at the subscribing end.

[0060] Combine Figure 1As shown, the SEDP process is when two participants, namely Figure 1 After the publisher and subscriber participants are matched, the publisher and subscriber participants will communicate multiple times to achieve endpoint matching between the publisher and subscriber participants. Since this application primarily addresses participant matching, i.e., matching unexpected participants involved in the SPDP process with existing participants in the domain, and since the SEDP process is a technology well known to those skilled in the art, this application will not elaborate further on this content.

[0061] After the participant matching and endpoint matching processes are completed, data communication can be carried out between the participants on the publishing side and the participants on the subscribing side.

[0062] Combine Figure 1 As can be seen, the address used to send pdata during the participant matching phase is a multicast address. When new participants come online, they will also receive this pdata and be matched. This can cause unexpected participants to be matched with existing participants in the domain. If endpoint matching is implemented after participant matching, unexpected participants will establish communication connections with participants in the domain, and data from existing participants in the domain will be received by the unexpected participants, posing a certain security risk.

[0063] The present application discloses a participant matching method based on the DDS protocol, comprising: obtaining a first parameter table, a second parameter table, and first data of a target participant; determining whether the address of the first participant is located in the first parameter table or in the second parameter table; if the address of the first participant is located in the first parameter table, determining that the first participant matches the target participant; if the address of the first participant is located in the second parameter table, determining whether the first participant matches the target participant based on the first data; if the address of the first participant is located outside the first parameter table and outside the second parameter table, determining that the first participant does not match the target participant.

[0064] Because the first parameter table in this application records the addresses of multiple participants allowed to communicate with the target participant, and the second parameter table records the preset multicast address that the target participant listens to, the participants in the first parameter table and the second parameter table are all expected participants and are all trustworthy. Therefore, the method disclosed in this application, through the mutual coordination of the first parameter table, the second parameter table, and the first data, ensures that the target participant can only be matched with the participants in the first parameter table and the second parameter table at most, avoiding the problem in the prior art that the target participant may be matched with an unexpected participant of unknown credibility, and solving the problem of poor data security in the existing solution.

[0065] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0066] Figure 2 A flowchart of a participant matching method based on the DDS protocol provided in an embodiment of the present application. Figure 2 As shown, the flow chart of the participant matching method provided in this application includes:

[0067] Step 201: Obtain a first parameter table, a second parameter table, and first data of a target participant.

[0068] The first parameter table records the addresses of multiple participants allowed to communicate with the target participant; the second parameter table records the multicast address monitored by the target participant; and the first data indicates whether the target participant receives messages sent by participants outside the first parameter table.

[0069] In an optional implementation, the method for constructing the first parameter table includes: obtaining addresses of a plurality of preset participants; and constructing the first parameter table based on the addresses of the plurality of participants.

[0070] Specifically, first, addresses of multiple participants that are allowed to be matched with a target participant are acquired; and then a first parameter table is generated based on the acquired addresses of the multiple participants.

[0071] In an optional implementation, the method for constructing the second parameter table includes: obtaining a preset multicast address; and constructing the second parameter table based on the multicast address.

[0072] Specifically, first, a multicast address that the target participant is allowed to monitor is obtained; and then a second parameter table is generated based on the obtained multicast address.

[0073] In an optional implementation, relevant options in the target participant, such as Accept UnknownPeers (AUP), can be set to true or 1, so that the target participant can receive messages from unknown participants; relevant options in the target participant, such as AUP, can be set to false or 0, so that the target participant cannot receive messages from unknown participants.

[0074] Step 202: Determine that the sender of the message received by the target participant is the first participant, and judge whether the address of the first participant is located in the first parameter table or the second parameter table.

[0075] When the target participant receives the message sent by the other participant, the sender of the received message is determined to be the first participant, and whether the address of the first participant is in the first parameter table in step 201 or in the second parameter table in step 201 is determined.

[0076] Step 203: If the address of the first participant is in the first parameter table, it is determined that the first participant matches the target participant.

[0077] Since the first parameter table records the addresses of multiple participants allowed to communicate with the target participant, when the address of the first participant is in the first parameter table, it can be determined that the first participant is an expected participant and can be matched with the target participant.

[0078] Step 204: If the address of the first participant is in the second parameter table, determine whether the first participant matches the target participant based on the first data.

[0079] Since the second parameter table records the multicast address that the target participant is allowed to monitor, when it is determined that the address of the first participant is in the second parameter table, it is necessary to determine whether the first participant matches the target participant in combination with the type of the first data.

[0080] In an optional implementation, determining whether the first participant matches the target participant based on the first data includes:

[0081] Obtaining a type of the first data; the type of the first data includes a first type and a second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table;

[0082] If the first data is data of the first type, determining that the first participant matches the target participant;

[0083] If the first data is data of the second type, it is determined that the first participant and the target participant do not match.

[0084] Specifically, when it is determined that the first participant is located in the second parameter table, the type of the first data of the target participant is first determined.

[0085] If the type of the first data is the first type, it means that the target participant can accept messages sent by participants outside the first parameter table, and it is determined that the first participant and the target participant can achieve participant matching.

[0086] If the type of the first data is the second type, it means that the target participant cannot accept messages sent by participants outside the first parameter table, and it is determined that the first participant and the target participant cannot achieve participant matching.

[0087] It is understandable that the type of the first data may be true or 1, and the type of the second data may be false or 0. The specific form of the type of the first data is not limited in this application.

[0088] Step 205: If the address of the first participant is outside the first parameter table and outside the second parameter table, it is determined that the first participant does not match the target participant.

[0089] If the address of the first participant is neither in the first parameter table nor in the second parameter table, it is determined that the first participant is an unexpected participant, and the target participant is determined not to be matched with the first participant, thereby preventing the target participant from establishing a communication connection with the first participant.

[0090] Figure 3 This is a diagram of a data communication interaction provided by an embodiment of the present application. Since the information interaction process between every two participants in the domain is the same, Figure 3 Taking the information interaction process between two participants as an example, the data communication process including the participant matching method based on the DDS protocol disclosed in this application is introduced.

[0091] Combine Figure 3 As shown, the interactive process of data communication includes SPDP process, SEDP process and user data transmission process. Figure 3 The SEDP process and the user data transmission process are shown in the previous embodiment of this application. Figure 1 The relevant introduction of the department will not be repeated here.

[0092] Combine Figure 3 ,The characteristic of the SPDP process in this application is that ,the participants on the publishing side directly send pdata to the ,participants on the subscribing side, and the participants on the publishing side do not ,send pdata to the multicast address.

[0093] It should be noted that when there are multiple participants in the first parameter table, that is, Figure 3 When multiple subscribers are involved, the publisher sends pdata to each subscriber separately.

[0094] It should be noted that Figure 3 The SPDP process given in only presents the process of sending data to the address of the participant in the first parameter table of the target participant, and does not present the content related to the second parameter table of the target participant.

[0095] In summary, the present application discloses a participant matching method based on the DDS protocol, including obtaining a first parameter table, a second parameter table and first data of a target participant; determining whether the address of the first participant is located in the first parameter table or the second parameter table; if the address of the first participant is located in the first parameter table, determining that the first participant matches the target participant; if the address of the first participant is located in the second parameter table, determining whether the first participant matches the target participant based on the first data; if the address of the first participant is outside the first parameter table and outside the second parameter table, determining that the first participant does not match the target participant.

[0096] Because the first parameter table in this application records the addresses of multiple participants allowed to communicate with the target participant, and the second parameter table records the preset multicast address that the target participant listens to, the participants in the first parameter table and the second parameter table are all expected participants and are all trustworthy. Therefore, the method disclosed in this application, through the mutual coordination of the first parameter table, the second parameter table, and the first data, ensures that the target participant can only be matched with the participants in the first parameter table and the second parameter table at most, avoiding the problem in the prior art that the target participant may be matched with an unexpected participant of unknown credibility, and solving the problem of poor data security in the existing solution.

[0097] As can be seen from the aforementioned embodiments, the first parameter table, second parameter table, and first type of the target participant in this application are preset. In an optional implementation, those skilled in the art may, based on actual work needs, add or delete the address of the participant in the first parameter table of the target participant; and / or, add or delete the multicast address in the second parameter table of the target participant; and / or, change the type of the first data of the target participant; thereby expanding or reducing the number of participants to be matched with the target participant.

[0098] Furthermore, in the traditional solution, when an external device is connected, that is, when an unexpected participant appears, the external device can receive the pdata sent by the local participant to the multicast and try to match it with the original participants in the domain. Figure 4 shown.

[0099] Figure 4 A schematic diagram of a network topology structure of a traditional solution provided in an embodiment of the present application. Figure 4 As shown in the figure, the original participants in the domain include: Participant 1, Participant 2, Participant 3, Participant 4, and Participant 5. As mentioned above, in the traditional solution, Participant 1, Participant 2, Participant 3, Participant 4, and Participant 5 can all send pdata to the multicast address to announce their existence, and then perform participant matching with other participants.

[0100] In the step S101, the participant 1 sends the pdata to the multicast address, and the participant 2, the participant 3, the participant 4 and the participant 5 can receive and parse the pdata, so the participant 1 matches with the participant 2, the participant 3, the participant 4 and the participant 5. Figure 4 Taking the participant 1 in the domain as an example, the participant 1 sends the pdata to the multicast address, and the participant 2, the participant 3, the participant 4 and the participant 5 can receive and parse the pdata, so the participant 1 matches with the participant 2, the participant 3, the participant 4 and the participant 5. When a new device is online, the device is a new participant 6, which is an unexpected participant in the embodiment of the present application. The participant 6 also receives the pdata sent by the participant 1 to the multicast address, and matches with the participant 1.

[0101] Further, when the participant 2 sends the pdata to the multicast address, the participant 1, the participant 3, the participant 4 and the participant 5, and the newly online participant 6 can all receive the pdata sent by the participant 2 to the multicast address, and then complete the participant matching with the participant 2.

[0102] It can be understood that if the participant 1 in the domain is a client device, and the other participants are server devices, it is meaningful for the client device to establish a communication connection with the server device, but it may be meaningless for the server devices, such as the participant 2 and the participant 3, to establish a communication connection. Figure 4 Figure 4 It can be understood that if the participant 1 in the domain is a client device, and the other participants are server devices, it is meaningful for the client device to establish a communication connection with the server device, but it may be meaningless for the server devices, such as the participant 2 and the participant 3, to establish a communication connection.

[0103] In summary, in the traditional scheme, every two participants will interact with each other, but some data interaction is meaningless. In the case of a large number of participants in the domain, if all participants interact with other participants, the data interaction between two participants without value will also occupy network resources and cause network burden.

[0104] In an optional implementation, for each participant in the plurality of participants, a preset parameter corresponding to each participant can be acquired; the preset parameter includes a plurality of preset addresses of participants allowed to match with each participant and a preset multicast address allowed to be listened to by each participant; and a first parameter table and a second parameter table of each participant are constructed based on the preset parameter corresponding to each participant.

[0105] For example, if there are a participant A, a participant B and a participant C in the domain, the preset parameter corresponding to each participant in the participant A, the participant B and the participant C is acquired. The preset parameter includes a plurality of preset addresses of participants allowed to match with each participant and a preset multicast address allowed to be listened to by each participant.

[0106] Taking the participant A as an example, the preset parameter corresponding to the participant A is acquired. That is, the plurality of preset addresses of participants allowed to match with the participant A and the preset multicast address allowed to be listened to by the participant A are acquired.

[0107] ​After acquiring the above data, a first parameter table and a second parameter table for each participant are constructed based on the above data.

[0108] Taking participant A as an example, the first parameter table of participant A is generated using the obtained addresses of multiple participants allowed to match with participant A; the second parameter table of participant A is generated using the obtained multicast address allowed to be monitored by participant A.

[0109] It should be noted that since generating a parameter table based on the acquired parameters is a technology that is relatively well known to those skilled in the art, this content will not be elaborated in this application.

[0110] The benefit of configuring the first parameter table, the second parameter table, and the first data for each participant in the domain is that it clarifies the scope of objects that each participant can match. This can solve the problem in traditional solutions where, when there are many participants, all participants interact with other participants, and data interaction between two worthless participants also occupies network resources, creating a network burden.

[0111] Figure 5 A schematic diagram of a network topology provided in an embodiment of the present application. Figure 5 The network topology structure in the example is generated based on the participant matching method based on the DDS protocol disclosed in the embodiment of the present application. Figure 5 As shown, the original participants in the domain include: participant 1, participant 2, participant 3, participant 4 and participant 5.

[0112] Assume that participant 1 is a client device, and participants 2, 3, 4, and 5 are all server devices. Figure 5 Participant 1 can be matched with participant 2, participant 3, participant 4 and participant 5 respectively; however, participant 2, participant 3, participant 4 and participant 5 can be matched with each other by setting the first parameter table, second parameter table and first data of each participant so that parameter matching is not performed between the above participants.

[0113] like Figure 5 As shown, participant 6 is a newly online device, which is the unexpected device mentioned in the aforementioned embodiment of this application. If participant 6 is not in the first parameter table of participant 1, the newly online participant 6 will not be matched with participant 1; if the newly online device is in the second parameter table of participant 1, but the type of participant 1's first data is the second type, that is, the first data indicates that participant 1 does not accept messages sent by other participants outside the first parameter table, then participant 1 will not be matched with participant 6; if participant 6 is neither in the first parameter table of participant 1 nor in the second parameter table of participant 1, participant 1 will not be matched with participant 6.

[0114] Furthermore, taking participant 2 as an example, if participant 3, participant 4, participant 5 and participant 6 are not in the first parameter table of participant 2, or if participant 3, participant 4, participant 5 and participant 6 are in the second parameter table of participant 2, but the first data type of participant 2 is the second type, participant 2 will not be matched with participant 3, participant 4, participant 5 and participant 6.

[0115] Therefore, the method disclosed in the present application, through the mutual coordination of the first parameter table, the second parameter table and the first data, makes it possible for the target participant to be matched with the participants in the first parameter table and the second parameter table at most, thereby avoiding the problem in the prior art that the target participant may be matched with an unexpected participant of unknown credibility, and avoiding useless mutual matching between participants, such as participant matching between server-side devices, thereby solving the problem of poor data security in the existing scheme; it can also solve the problem in the existing scheme that a large number of participants occupy more network resources.

[0116] Based on the participant matching method based on the DDS protocol provided in the aforementioned embodiment, the present application also provides a participant matching device based on the DDS protocol. Figure 6 A schematic diagram of the structure of a participant matching device based on the DDS protocol provided in an embodiment of the present application. Figure 6 As shown, the participant matching device 600 in this application includes:

[0117] A first data acquisition module 601 is configured to acquire a first parameter table, a second parameter table, and first data of a target participant; the first parameter table records the addresses of multiple participants allowed to communicate with the target participant; the second parameter table records the multicast address monitored by the target participant; and the first data indicates whether the target participant receives messages sent by participants outside the first parameter table.

[0118] A participant determination module 602 is configured to determine that the sender of the message received by the target participant is a first participant, and to determine whether the address of the first participant is located in the first parameter table or the second parameter table;

[0119] A first judgment module 603 is configured to determine that the first participant matches the target participant if the address of the first participant is in the first parameter table;

[0120] A second determination module 604 is configured to determine whether the first participant matches the target participant based on the first data if the address of the first participant is located in the second parameter table;

[0121] The third judgment module 605 is configured to determine that the first participant does not match the target participant if the address of the first participant is outside the first parameter table and outside the second parameter table.

[0122] In an optional implementation, the second determining module 604 includes:

[0123] a data type determining unit, configured to obtain a type of the first data; the type of the first data includes a first type and a second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table;

[0124] a first judgment unit, configured to determine that the first participant matches the target participant if the first data is data of the first type;

[0125] The second judgment unit is configured to determine that the first participant and the target participant do not match if the first data is data of the second type.

[0126] In an optional implementation, the participant matching device 600 further includes:

[0127] An address acquisition unit, used to acquire addresses of a plurality of preset participants;

[0128] The first parameter table generating unit constructs the first parameter table based on the addresses of the plurality of participants.

[0129] In an optional implementation, the participant matching device 600 further includes:

[0130] A multicast address acquisition unit, configured to acquire a preset multicast address;

[0131] The second parameter table generating unit is configured to construct the second parameter table based on the multicast address.

[0132] In an optional implementation, the participant matching device 600 further includes:

[0133] A parameter acquisition unit, configured to acquire, for each of the plurality of participants, preset parameters corresponding to each participant; the preset parameters including the preset addresses of the plurality of participants and the preset multicast address;

[0134] A parameter generation unit is used to construct a first parameter table and a second parameter table for each participant based on the preset parameters corresponding to each participant.

[0135] In an optional implementation, the participant matching device 600 further includes:

[0136] A deletion and modification module is used to add or delete the addresses of participants in the first parameter table; and\or, add or delete the multicast addresses in the second parameter table; and\or, change the type of the first data.

[0137] Based on the DDS protocol-based participant matching method and device provided in the aforementioned embodiments, the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements some or all of the steps in the DDS protocol-based participant matching method mentioned above.

[0138] Based on the DDS protocol-based participant matching method and apparatus provided in the aforementioned embodiments, the present application further provides an electronic device, including:

[0139] a memory having a computer program stored thereon;

[0140] A processor is configured to execute the computer program in the memory to implement some or all of the steps in the participant matching method based on the DDS protocol provided in the aforementioned embodiment.

[0141] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0142] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A participant matching method based on the DDS protocol, wherein the publish-subscribe model constructed based on the DDS protocol includes multiple participants, characterized in that: include: Obtaining a first parameter table, a second parameter table, and first data of a target participant; The first parameter table records the addresses of multiple participants that are allowed to communicate with the target participant; The second parameter table records the multicast address monitored by the target participant; the first data indicates whether the target participant receives messages sent by participants outside the first parameter table; Determining that the sender of the message received by the target participant is the first participant, and determining whether the address of the first participant is located in the first parameter table or the second parameter table; If the address of the first participant is in the first parameter table, determining that the first participant matches the target participant; If the address of the first participant is in the second parameter table, the type of the first data is obtained; if the first data is data of the first type, it is determined that the first participant and the target participant match; if the first data is data of the second type, it is determined that the first participant and the target participant do not match; the types of the first data include the first type and the second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table; If the address of the first participant is outside the first parameter table and outside the second parameter table, it is determined that the first participant does not match the target participant.

2. The method according to claim 1, characterized in that The method for constructing the first parameter table includes: Get the addresses of multiple preset participants; The first parameter table is constructed based on the addresses of the plurality of participants.

3. The method according to claim 1, characterized in that The method for constructing the second parameter table includes: Get the preset multicast address; The second parameter table is constructed based on the multicast address.

4. The method according to any one of claims 1 to 3, characterized in that Also includes: For each participant among the multiple participants, obtaining preset parameters corresponding to each participant; The preset parameters include the preset addresses of multiple participants and the preset multicast address; Based on the preset parameters corresponding to each participant, a first parameter table and a second parameter table for each participant are constructed.

5. The method according to any one of claims 1 to 3, characterized in that Also includes: Add or delete the address of the participant in the first parameter table; and\or, adding or deleting multicast addresses in the second parameter table; and / or, changing the type of the first data.

6. A participant matching device based on the DDS protocol, wherein the publish-subscribe model constructed based on the DDS protocol includes multiple participants, characterized in that: include: A first data acquisition module is used to acquire a first parameter table, a second parameter table and first data of a target participant; The first parameter table records the addresses of multiple participants allowed to communicate with the target participant; the second parameter table records the multicast address monitored by the target participant; the first data indicates whether the target participant receives messages sent by participants outside the first parameter table; a participant determination module, configured to determine that the sender of the message received by the target participant is a first participant, and to judge whether the address of the first participant is located in the first parameter table or the second parameter table; a first judgment module, configured to determine that the first participant matches the target participant if the address of the first participant is in the first parameter table; a second judgment module, configured to obtain the type of the first data if the address of the first participant is located in the second parameter table; determine that the first participant matches the target participant if the first data is data of the first type; and determine that the first participant does not match the target participant if the first data is data of the second type; the types of the first data include the first type and the second type; the first type indicates that the target participant accepts messages sent by participants outside the first parameter table; and the second type indicates that the target participant does not accept messages sent by participants outside the first parameter table; The third judgment module is configured to determine that the first participant does not match the target participant if the address of the first participant is outside the first parameter table and outside the second parameter table.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

8. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Address hopping system, method and device, storage medium and processor

    CN111629082A

  • Vehicle data transmission method and device, electronic equipment and storage medium

    CN118646714A