DDS protocol-based participant matching method and related device

By using the first parameter table, the second parameter table and the first data in the participant matching of the DDS protocol, ensuring that only the expected participants make the match, the problem of the unanticipated participants and the participants in the domain is solved. Improved data security.

CN119484086AActive Publication Date: 2025-02-18BEIJING JINGWEI HIRAIN TECH CO INC

Patent Information

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

AI Technical Summary

Technical Problem

In the DDS protocol publish-subscribe communication middleware model, there are security risks in the participant matching stage, because participants who are not expected can match the original participants in the domain, resulting in poor data security.

Method used

By obtaining the first parameter table, second parameter table and first data of the target participant, we can determine whether the participant's address is located in the address table that allows communication or the multicast address table, and then determine the participant matching relationship to ensure that only the expected ones are participants were matched.

Benefits of technology

It effectively avoids unnecessary communication connections between participants who are not expected and the original participants in the domain, improves the security of information transmission, and ensures that data does not flow into unknown participants with low credibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484086A_ABST
    Figure CN119484086A_ABST
Patent Text Reader

Abstract

The invention discloses a DDS protocol-based participant matching method and a related device, and relates to the technical field of communication. Comprising the steps of obtaining a first parameter table, a second parameter table and first data of a target participant; judging whether the address of the first participant is located in a first parameter table or a 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. According to the method disclosed by the invention, through mutual cooperation of the first parameter table, the second parameter table and the first data, the target participant can only be matched with participants in the first parameter table and the second parameter table at most, and the problem of relatively poor data security in an existing scheme is solved.
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 a DDS protocol. Background Art

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

[0003] Among them, the domain represents the communication plane, and only communication entities within the same domain can communicate. Participants are containers for communication entities within the domain. The publisher is a communication entity that publishes topic data. The publisher is associated with at least one data writer; the data writer writes the topic data to be published from the application layer to itself. The subscriber is a communication entity that subscribes to the topic data. The subscriber is associated with at least one data reader; the data reader passes the topic data obtained by the subscriber to the application layer. In the publish-subscribe communication middleware model, data is identified by topics. The publisher publishes data according to the topic, and the subscriber subscribes to data according to the topic of their interest.

[0004] In the current publish-subscribe communication middleware model, the communication between participants in the domain needs to be achieved through two phases of matching: the participant matching phase and the endpoint matching phase. The former is based on the Simple Participant Discovery Protocol (SPDP) and the latter is based on the Simple Endpoint Discovery Protocol (SEDP).

[0005] In the participant matching phase, after the participant goes online, it will periodically send the built-in endpoint data (Participant Data, pdata) of SPDP to announce the existence of the participant on the network. After receiving the pdata, other participants will use their own built-in endpoints to parse the received pdata to achieve participant matching. After the two participants are successfully matched, the endpoint matching between the two participants is achieved based on SEDP.

[0006] If the address for sending pdata during the participant matching phase is a multicast address, when a new participant comes online, the pdata will also be received and matched; this will cause the unexpected participant to be matched with the original participant in the domain. If after the participant matching is achieved, the endpoints between the two participants are matched, the unexpected participant will establish a communication connection with the original participant in the domain, and the data of the original participant will be received by the unexpected participant, so there is a certain security risk. Summary of the invention

[0007] Based on the above problems, the present 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] The first aspect of the present application provides a participant matching method based on the DDS protocol, comprising:

[0009] 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;

[0010] Determining that the sender of the message received by the target participant is the first participant, and judging 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 located 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 manner, determining whether the first participant matches the target participant based on the first data includes:

[0015] Acquire the 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 the multicast address 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 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;

[0033] A participant determination module, used to determine that the sender of the message received by the target participant is the 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 judgment module, configured to judge 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 determination module includes:

[0038] a data type determination 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 introduced in any implementation manner 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 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, 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 unexpected participants with unknown credibility, and avoiding the data of the original participants in the domain from flowing into unexpected participants with unknown credibility, thus 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.

[0050] Figure 1 A schematic diagram of data communication interaction of a traditional 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 structure 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 in a domain needs to be achieved through two phases of matching, namely the participant matching phase and the endpoint matching phase. The former is implemented based on a simple participant discovery protocol; 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 interaction process between every two participants is the same. For ease of understanding, the information interaction process between two participants is taken as an example to introduce the interaction process of data communication in 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 subscribing side. Figure 1 As shown in the figure, the data communication between the participants on the publishing end and the participants on the subscribing end is divided into three processes. The first process is the SPDP process, also known as the participant matching process; the second process is the SEDP process, also known as the endpoint matching process; the third process is the user data transmission process. For the publishing end and the subscribing end to communicate data, that is, to transmit user data, the matching between the two participants must be achieved through the SPDP process, and the matching between the endpoints of the two participants must be achieved through the SEDP process.

[0059] Combination 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] Combination Figure 1As shown, the SEDP process is when two participants, namely Figure 1 After the participants on the publishing end and the participants on the subscribing end are matched, the participants on the publishing end and the participants on the subscribing end will communicate with each other multiple times to achieve the endpoint matching between the participants on the publishing end and the participants on the subscribing end. Since this application mainly solves the problem of participant matching, that is, the problem of matching the unexpected participants involved in the SPDP process with the original participants in the domain, and since the SEDP process is a technology well known to those skilled in the art, this content will not be further elaborated in this application.

[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] Combination Figure 1 It can be seen that the address for sending pdata during the participant matching phase is a multicast address. When a new participant comes online, the pdata will also be received and matched; this will cause the unexpected participants to be matched with the original participants in the domain. If endpoint matching is achieved on the basis of participant matching, the unexpected participants will establish a communication connection with the participants in the domain, and the data of the original participants in the domain will be received by the unexpected participants, so there are certain security risks.

[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] Since the first parameter table in the present application records the addresses of multiple participants that are 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 credible. Therefore, the method disclosed in the present application, through the mutual cooperation of the first parameter table, the second parameter table and the first data, makes the target participant at most only match the participants in the first parameter table and the second parameter table, avoiding the problem in the prior art that the target participant may match with an unexpected participant with unknown credibility, and solving the problem of poor data security in the existing scheme.

[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. 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 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 by the present application includes:

[0067] Step 201, obtaining 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 represents 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, firstly, addresses of multiple participants that are allowed to perform participant matching with the target participant are obtained; and then, based on the addresses of the multiple participants obtained, a first parameter table is generated.

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

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

[0073] In an optional implementation, relevant options in the target participant, such as Accept UnknownPeers (AUP), can be set to true or 1, and 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, and 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 determine 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 other participants, the sender of the received message is determined to be the first participant. It is determined 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 .

[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 that are 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 manner, determining whether the first participant matches the target participant based on the first data includes:

[0081] Acquire the 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 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 can be understood 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 the present 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 avoiding the target participant from communicating with the first participant.

[0090] Figure 3 A schematic 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] Combination 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] Combination Figure 3 ,The characteristic of the SPDP process in this application is that the ,participants at the publishing end directly send pdata to the participants at the ,subscribing end, and the participants at the publishing end 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 respectively.

[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 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 outside the first parameter table and outside the second parameter table, determining that the first participant does not match the target participant.

[0096] Since the first parameter table in the present application records the addresses of multiple participants that are 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 credible. Therefore, the method disclosed in the present application, through the mutual cooperation of the first parameter table, the second parameter table and the first data, makes the target participant at most only match the participants in the first parameter table and the second parameter table, avoiding the problem in the prior art that the target participant may match with an unexpected participant with unknown credibility, and solving the problem of poor data security in the existing scheme.

[0097] As can be seen from the above embodiments, the first parameter table, the second parameter table and the first type of the target participant in the present application are preset. In an optional implementation, those skilled in the art can add or delete the address of the participant in the first parameter table of the target participant according to the needs of the actual working situation; 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; and thereby expand or reduce the number of participants for participant matching 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 conventional solution provided in an embodiment of the present application. Figure 4 As shown, the original participants in the domain include: participant 1, participant 2, participant 3, participant 4 and participant 5. According to the above introduction, in the traditional solution, participant 1, participant 2, participant 3, participant 4 and participant 5 can send pdata to the multicast address to announce their existence, and then match with other participants.

[0100] by Figure 4 Taking participant 1 in the example, participant 1 sends pdata to the multicast address, and participants 2, 3, 4, and 5 can all receive and parse the pdata, so participant 1 is matched with participants 2, 3, 4, and 5. When a new device comes online, the device, as a new participant 6, that is, an unexpected participant in the embodiment of the present application, will also receive the pdata sent by participant 1 to the multicast address, and will also be matched with participant 1.

[0101] Furthermore, when participant 2 sends pdata to the multicast address, participant 1, participant 3, participant 4, participant 5, and the newly online participant 6 will all receive the pdata sent by participant 2 to the multicast address, thereby completing participant matching with participant 2.

[0102] It is understandable that if Figure 4 Participant 1 in is the client device, Figure 4 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 server devices to establish a communication connection with each other, such as participant 2 and participant 3.

[0103] In summary, in traditional solutions, every two participants will exchange data, but some data interactions are meaningless. When there are many participants in the domain, if all participants exchange information with other participants, the data interaction between two worthless participants will also occupy network resources and generate network burden.

[0104] In an optional implementation, for each of the multiple participants, preset parameters corresponding to each participant can be obtained; the preset parameters include preset addresses of multiple participants and a 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.

[0105] For example, if there are participants A, B and C in the domain, then the preset parameters corresponding to each participant in participants A, B and C are obtained respectively. The preset parameters include: preset addresses of multiple participants allowed to match with the participant, and preset multicast addresses allowed to be monitored by the participant.

[0106] Taking participant A as an example, obtain the preset parameters corresponding to participant A. That is, obtain the addresses of multiple participants that are allowed to match with participant A, and the multicast address that participant A is allowed to monitor.

[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 addresses of multiple participants allowed to match with participant A; the second parameter table of participant A is generated using the 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 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 the scope of objects that each participant can match is clarified, which can solve the problem that in traditional solutions, when there are many participants, all participants exchange information with other participants, and data exchange between two worthless participants will also occupy network resources and generate network burden.

[0111] Figure 5 A schematic diagram of a network topology structure provided in an embodiment of the present application. Figure 5 The network topology structure in 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 in the example 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, the second parameter table and the 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 launched device, which is an unexpected device mentioned in the aforementioned embodiment of the present application. If participant 6 is not in the first parameter table of participant 1, the newly launched participant 6 will not be matched with participant 1; if the newly launched device is in the second parameter table of participant 1, but the type of the first data of participant 1 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] Further, 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 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, avoiding useless mutual matching between participants, such as participant matching between server-side devices, and solving the problem of poor data security in the existing scheme; it can also solve the problem in the existing scheme that more 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 the present application includes:

[0117] The first data acquisition module 601 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;

[0118] A participant determination module 602 is used 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, 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 judgment module 604 is configured to judge 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 determination 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, used to acquire a preset multicast address;

[0131] The second parameter table generating unit is used 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 multiple participants, preset parameters corresponding to each participant; the preset parameters include preset addresses of the multiple participants and a preset multicast address;

[0134] A parameter generation unit, configured 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 module is used to add or delete the addresses of participants in the first parameter table; and / or, to add or delete the multicast addresses in the second parameter table; and / or, to 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 having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the DDS protocol-based participant matching method mentioned above.

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

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

[0140] A processor is used to execute the computer program in the memory to implement part or all of the steps in the participant matching method based on the DDS protocol provided in the above-mentioned embodiment.

[0141] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the 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 schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it 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 scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0142] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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: Obtain 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 judging 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 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, it is determined that the first participant does not match the target participant.

2. The method according to claim 1, characterized in that The determining, based on the first data, whether the first participant matches the target participant includes: Acquire the 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; If the first data is data of the first type, determining that the first participant matches the target participant; If the first data is data of the second type, it is determined that the first participant and the target participant do not match.

3. 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.

4. 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.

5. The method according to any one of claims 1 to 4, characterized in that: Also includes: For each participant among the multiple participants, obtaining a preset parameter 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.

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

7. A participant matching device based on the DDS protocol, characterized in that: include: A first data acquisition module, 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 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; A participant determination module, used to determine that the sender of the message received by the target participant is the 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 judge 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; 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.

8. The device according to claim 7, characterized in that The second judgment module includes: a data type determination 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; 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; 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.

9. 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 described in any one of claims 1 to 6 are implemented.

10. 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 6.

Citation Information

Patent Citations

  • Message processing method and switch

    CN108616463A

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

    CN111629082A

  • Distributed simulation-oriented data distribution service DDS automatic discovery method

    CN112328373A

  • Data communication method and device, electronic equipment and storage medium

    CN114697258A

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

    CN118646714A

Cited By

  • Topic-centered discovery mechanism in lightweight DDS

    CN120639852A

  • A lightweight topic-centric discovery mechanism in DDS

    CN120639852B