A method and system for evaluating the legality of a ship information system publish / subscribe

By defining and evaluating publish-subscribe relationships in the ship information system, the problems of illegal subscriptions and relationship confusion are solved, enabling rapid and flexible legality testing and ensuring the stable and efficient operation of the system.

CN122372549APending Publication Date: 2026-07-10CHINA SHIP DEV & DESIGN CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610409292.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-31
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

The existence of illegal subscriptions, disordered publish-subscribe relationships, and a lack of automated testing tools in complex shipboard information systems leads to increased network overhead and chaotic system logic, affecting the compliance and reliability of communications.

Method used

The publish-subscribe relationship can be defined through graphical design or formatted file import, and the actual relationship can be detected in real time. The relationship can be compared and evaluated using predetermined legality judgment rules, and the evaluation results can be output, including the legality judgment of the publisher, subscriber and topic string.

Benefits of technology

It improves the flexibility of publishing-subscription relationship definition and the efficiency of legality assessment, ensuring the stable and smooth operation of the system and enabling rapid adaptation to complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372549A_ABST
    Figure CN122372549A_ABST
Patent Text Reader

Abstract

This invention discloses a method for testing and evaluating the legality of publish-subscribe relationships in a ship information system. The method includes: defining the publish-subscribe relationships of each node in the ship information system, including publishers, subscribers, and topic strings, through graphical design or formatted file import, and storing this as structured data; in the local area network (LAN) where the ship information system operates, detecting and acquiring the actual publish-subscribe relationships of each node in the LAN in real time through the built-in topics of the publish-subscribe mechanism, including the actual publishers, subscribers, and topic strings, and storing this as structured data; comparing the actual publish-subscribe relationships with the defined designed publish-subscribe relationships item by item, and judging the legality of each actual published or subscribed topic according to predetermined publish-subscribe legality evaluation rules, and outputting the evaluation result. This invention can quickly define correct publish-subscribe relationships, detect actual relationships in the network in real time, and automatically perform comparisons and evaluations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, specifically to a method and system for testing and evaluating the legality of publishing and subscribing in a ship information system. Background Technology

[0002] In complex information systems on ships, the publish-subscribe mechanism is widely used in message passing and communication in distributed systems. Through this mechanism, message publishers publish data to specific topics, while message subscribers subscribe to relevant topics according to their own needs, thus achieving loosely coupled message passing. However, with the increasing complexity of information systems, the legality and security issues of publish-subscribe have gradually become prominent, mainly in the following aspects: (1) There may be illegal subscriptions: In the complex information system of ships, there may be subscribers who subscribe to sensitive topics without authorization, obtain unauthorized data, increase network overhead, and may cause network delays in specific scenarios with high real-time requirements; (2) There may be a disorder in the publish-subscribe relationship: The number of publish-subscribe topics in the complex information system of ships is huge. If there is a disorder in the publish-subscribe topics, it will cause the entire information system to be confused in processing logic and disrupt normal work processes. (3) Lack of automated publish-subscribe legitimacy testing methods and tools: Currently, complex information systems on ships lack flexible, configurable, and automated publish-subscribe legitimacy testing tools and methods. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method and system for testing and evaluating the legality of publish-subscribe relationships in ship information systems, which addresses the shortcomings of existing technologies. The present invention can quickly define correct publish-subscribe relationships, detect actual relationships in the network in real time, and automatically perform comparison and legality assessment, effectively ensuring the compliance and reliability of ship information system communication.

[0004] To achieve the above objectives, according to one aspect of the present invention, a method for testing and evaluating the legality of publish-subscribe functionality in a ship information system is provided, comprising: Define the publish-subscribe relationship of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and store them as structured data; In the local area network where the ship information system operates, the actual publish-subscribe relationship of each node in the local area network is detected and obtained in real time through the built-in topics of the publish-subscribe mechanism, including the actual publisher, subscriber, and topic string, and stored as structured data; The actual publish-subscribe relationship is compared with the defined publish-subscribe relationship item by item, and the legality of each actual published or subscribed topic is judged according to the predetermined publish-subscribe legality judgment rules, and the evaluation result is output.

[0005] In the above scheme, the publish-subscribe relationships of each node in the ship information system are defined through graphical design, including: The system's software nodes are defined through a visual interface, and the publish-subscribe relationships between the nodes are defined in a topology graph.

[0006] In the above scheme, the publish-subscribe relationships of each node in the ship information system are defined by importing formatted files, including: The publish-subscribe relationship is imported by parsing a formatted file, which includes a publish-subscribe relationship table and a data mapping relationship table.

[0007] In the above scheme, the publish-subscribe relationship table includes fields for publisher, subscriber, topic string, and domain identifier; the data correspondence table is used to record the correspondence between topic strings, software node names and their Chinese identifiers.

[0008] In the above scheme, defining the publish-subscribe relationship of each node in the ship information system includes: Define the string name and Chinese name of the topic; Define all participating nodes in the system; Define the publish topics and subscribe topics for each node.

[0009] In the above scheme, the built-in topic includes domain participant information, publisher information, and subscriber information.

[0010] The above scheme includes three categories of rules for judging the legality of publish / subscribe: Category 1: When the publisher, subscriber, and topic strings in the detected publish-subscribe relationship all exactly match one of the elements in the designed publish-subscribe relationship, it is considered valid. The second category: When the detected topic string published by the publisher is not within the scope of the topics defined by the publisher in the design of the publish-subscribe relationship, or when the detected topic string subscribed by the subscriber is not within the scope of the topics defined by the subscriber in the design of the publish-subscribe relationship, it is judged as illegal; The third category: When the topic string published by the detected publisher is not within the scope of the designed publish-subscribe relationship, and the topic string is the same as the topic string published by another detected publisher, it is judged as a conflict.

[0011] Another aspect of the present invention provides a system for testing and evaluating the legality of publish-subscribe behavior in a ship information system, comprising: The publish-subscribe relationship design module is used to define the publish-subscribe relationships of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and store them as structured data; The publish-subscribe data acquisition module is used to detect and acquire the actual publish-subscribe relationships of each node in the local area network in which the ship information system operates, including the actual publishers, subscribers, and topic strings, and store them as structured data in real time through the built-in topics of the publish-subscribe mechanism. The publish / subscribe legality assessment module is used to compare the actual publish / subscribe relationship with the defined designed publish / subscribe relationship item by item, and to determine the legality of each actual published or subscribed topic according to the predetermined publish / subscribe legality judgment rules, and output the assessment result. The data storage module is used to store the defined design publish-subscribe relationships, the collected actual publish-subscribe relationship information, and the evaluation results.

[0012] In the above scheme, the publish-subscribe relationship design module has a file import interface, which parses and imports a formatted file containing a publish-subscribe relationship table and a topic-name mapping table, and converts it into structured data for internal system use.

[0013] In the above scheme, the publish-subscribe legality assessment module encodes the publish-subscribe legality judgment rules into a function, takes the defined design publish-subscribe relationship data and the collected actual publish-subscribe relationship data as input, and outputs the assessment result.

[0014] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: This invention provides a method for testing and evaluating the legality of publish-subscribe relationships in a ship information system. This method improves the flexibility of defining publish-subscribe relationships, making it easier to quickly adapt publish-subscribe legality testing to any new and complex system. This method also improves the efficiency of publish-subscribe legality evaluation, enabling rapid assessment of the legality of publish-subscribe relationships in complex systems, thus laying the foundation for the smooth and stable operation of the system. Attached Figure Description

[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference figures denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating a method for testing and evaluating the legality of publishing and subscribing in a ship information system according to Embodiment 1 of the present invention.

[0016] Figure 2 This is a flowchart of a method for testing and evaluating the legality of publishing and subscribing in a ship information system according to Embodiment 1 of the present invention.

[0017] Figure 3 This is a test flowchart of a ship information system publish-subscribe legality test and evaluation system according to Embodiment 2 of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0019] It should be understood that the sequence number of each step in the embodiment does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0020] Example 1 This application provides a method for testing and evaluating the legality of publish / subscribe functionality in a ship information system. Please refer to [link / reference]. Figure 1 The method provided in this application includes: S1 defines the publish-subscribe relationships of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and stores them as structured data.

[0021] In this embodiment, the publish-subscribe relationships of each node in the ship information system are defined using a graphical design approach. First, the topic string name and the Chinese name of the topic are defined for each project to facilitate the identification of the topic meaning. Then, the nodes are defined, that is, all nodes participating in the system. Next, the publish-subscribe topic relationships of the nodes are defined, that is, all topics published and all topics subscribed to by each node. If the same topic appears on different nodes, it is a publish-subscribe pair relationship. In particular, this embodiment also uses a visual topology diagram of the topic publish-subscribe relationships of each node to clearly express the publish-subscribe relationships between each node in the system. Finally, the publish-subscribe relationships are stored as structured data for easy querying.

[0022] S2, within the local area network where the ship information system operates, uses the built-in topics of the publish-subscribe mechanism to detect and obtain the actual publish-subscribe relationships of each node in the local area network in real time, including the actual publishers, subscribers, and topic strings, and stores them as structured data.

[0023] In this embodiment, it is understood that within the local area network (LAN) where the ship information system operates, the publish-subscribe mechanism defines built-in topics such as "DCPSParticipant," "DCPSPublication," and "DCPSSubscription." By subscribing to these built-in topics, the publish-subscribe relationships within the domain can be obtained. These built-in topics include information about domain participants, publishers, and subscribers. By subscribing to these topics, the publish-subscribe relationships between all nodes within the LAN can be obtained, and information such as publishers, subscribers, and topic names within these relationships can be stored in structured data. In this embodiment, collection items are defined before data collection, and different collection items are managed separately.

[0024] S3 compares the actual publish-subscribe relationship with the defined publish-subscribe relationship item by item, and judges the legality of each actual published or subscribed topic according to the predetermined publish-subscribe legality judgment rules, and outputs the evaluation result.

[0025] In this embodiment, the predetermined publish / subscribe legality judgment rules are mainly divided into three categories: The first category is that the publisher, subscriber, and topic name match exactly, which is considered a legal publish and a legal subscription; the second category is that if the topic published by the publisher is not within the design scope, or the topic subscribed to by the subscriber is not within the design scope, it means that the publisher has published an illegal topic or the subscriber has subscribed to an illegal topic; the third category is that if a publisher publishes an illegal topic and it conflicts with the topic published by another publisher, it means that a conflicting topic has occurred within the local area network. This embodiment also formats the predetermined publish / subscribe legality judgment rules into computer-recognizable rules, that is, the three types of publish / subscribe legality judgment rules are edited into code functions, the input is the defined design publish / subscribe relationship data and the collected actual publish / subscribe relationship data, and the output is the legality evaluation result of each published or subscribed topic detected.

[0026] Specifically, this embodiment compares the detected actual publish-subscribe relationship data with the defined publish-subscribe relationship data item by item. It iterates through all detected publishers and subscribers, as well as the names of the topics they publish and subscribe to, comparing them with the defined publish-subscribe relationships. It then invokes predefined publish-subscribe legality evaluation rules, provides legality evaluation results, and stores them. For example, this embodiment provides results such as "Topic B published by software X is legal," "Topic C subscribed by software X is legal," "Topic D published by software X conflicts with topic D published by software Y," and "Topic E published by software X is not within the design scope" for all publish-subscribe topics of all nodes. The complete test flowchart of a publish-subscribe legality testing and evaluation method for a ship information system in this embodiment is shown below. Figure 2 As shown.

[0027] Example 2 This application provides a method for testing and evaluating the legality of publishing and subscribing in a ship information system. The method provided in this embodiment is basically the same as the method in embodiment 1, except that: In this embodiment, the publish-subscribe relationship of each node in the ship information system is defined by importing a formatted file. First, the designed publish-subscribe relationship is edited into a formatted file. The formatted file includes two types: one is a publish-subscribe relationship table, including publishers, subscribers, subject strings, and domain identifiers; the other is a data correspondence table, including strings and Chinese names. Then, a format conversion tool is developed to import the formatted file data and convert it into structured data for easy querying.

[0028] Specifically, this embodiment uses Excel or similar files to quickly import the publish-subscribe relationships of each node in the system. First, the publish-subscribe relationships are edited into two files: one is a publish-subscribe relationship table, with headers including "Publisher," "Subscriber," "Topic String," and "Domain Identifier," where "Publisher Software Name," "Subscriber Software Name," "Topic English String," and "Domain ID" are filled in, respectively; the other is a data mapping table, with headers including "String Name" and "Chinese Name." The string name is filled with the node IP and the English name of the topic, and the Chinese name is filled with the software name corresponding to the node IP and the Chinese name corresponding to the English name of the topic. Then, the data in the Excel or similar files is converted into structured data and stored in a database.

[0029] Another aspect of this application provides a system for testing and evaluating the legality of publish-subscribe behavior in a ship information system, including: The publish-subscribe relationship design module is used to define the publish-subscribe relationships of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and store them as structured data; The publish-subscribe data acquisition module is used to detect and acquire the actual publish-subscribe relationships of each node in the local area network where the ship information system is running in real time through the built-in topics of the publish-subscribe mechanism, including the actual publishers, subscribers, and topic strings, and store them as structured data. The publish / subscribe legality assessment module is used to compare the actual publish / subscribe relationship with the defined design publish / subscribe relationship item by item, and to determine the legality of each actual published or subscribed topic according to the predetermined publish / subscribe legality judgment rules, and output the assessment results. The data storage module stores the defined publish-subscribe relationships, the collected actual publish-subscribe relationship information, and the evaluation results. Specifically, in this embodiment, a complete test flowchart of a publish-subscribe legality testing and evaluation system for a ship information system is shown below. Figure 3As shown.

[0030] In summary, this invention, through the aforementioned systematic testing methods and evaluation models, achieves standardized and quantitative evaluation of the biological effects of S-band high-power microwaves, and is particularly adept at revealing non-thermal effects and parameter thresholds, thus possessing significant scientific research and application value.

[0031] It should be noted that, depending on the implementation needs, the various steps described in this application can be broken down into more steps, or two or more steps or parts of the steps can be combined into new steps to achieve the purpose of this invention.

[0032] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for testing and evaluating the legality of publishing and subscribing in a ship information system, characterized in that, include: Define the publish-subscribe relationship of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and store them as structured data; In the local area network where the ship information system operates, the actual publish-subscribe relationship of each node in the local area network is detected and obtained in real time through the built-in topics of the publish-subscribe mechanism, including the actual publisher, subscriber, and topic string, and stored as structured data; The actual publish-subscribe relationship is compared with the defined publish-subscribe relationship item by item, and the legality of each actual published or subscribed topic is judged according to the predetermined publish-subscribe legality judgment rules, and the evaluation result is output.

2. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 1, characterized in that, The publish-subscribe relationships of each node in the ship information system are defined through graphical design, including: The system's software nodes are defined through a visual interface, and the publish-subscribe relationships between the nodes are defined in a topology graph.

3. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 1, characterized in that, Defining the publish-subscribe relationships of each node in the ship information system using formatted file import methods includes: The publish-subscribe relationship is imported by parsing a formatted file, which includes a publish-subscribe relationship table and a data mapping relationship table.

4. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 3, characterized in that, The publish-subscribe relationship table includes fields for publisher, subscriber, topic string, and domain identifier; the data mapping relationship table records the correspondence between topic strings, software node names, and their Chinese identifiers.

5. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 1, characterized in that, The definition of the publish-subscribe relationship among nodes in the ship information system includes: Define the string name and Chinese name of the topic; Define all participating nodes in the system; Define the publish topics and subscribe topics for each node.

6. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 1, characterized in that, The built-in topics include domain participant information, publisher information, and subscriber information.

7. The method for testing and evaluating the legality of publishing and subscribing in a ship information system according to claim 1, characterized in that, The published / subscribed legality judgment rules include three categories: Category 1: When the publisher, subscriber, and topic strings in the detected publish-subscribe relationship all exactly match one of the elements in the designed publish-subscribe relationship, it is considered valid. The second category: When the detected topic string published by the publisher is not within the topic range defined by the publisher in the design of the publish-subscribe relationship, or when the detected topic string subscribed by the subscriber is not within the topic range defined by the subscriber in the design of the publish-subscribe relationship, it is judged as illegal; The third category: When the topic string published by the detected publisher is not within the scope of the designed publish-subscribe relationship, and the topic string is the same as the topic string published by another detected publisher, it is judged as a conflict.

8. A system for testing and evaluating the legality of publishing and subscribing in a ship information system, characterized in that, include: The publish-subscribe relationship design module is used to define the publish-subscribe relationships of each node in the ship information system through graphical design or formatted file import, including publishers, subscribers, and topic strings, and store them as structured data; The publish-subscribe data acquisition module is used to detect and acquire the actual publish-subscribe relationships of each node in the local area network in which the ship information system operates, including the actual publishers, subscribers, and topic strings, and store them as structured data in real time through the built-in topics of the publish-subscribe mechanism. The publish / subscribe legality assessment module is used to compare the actual publish / subscribe relationship with the defined designed publish / subscribe relationship item by item, and to determine the legality of each actual published or subscribed topic according to the predetermined publish / subscribe legality judgment rules, and output the assessment result. The data storage module is used to store the defined design publish-subscribe relationships, the collected actual publish-subscribe relationship information, and the evaluation results.

9. A ship information system publish / subscribe legality testing and evaluation system according to claim 8, characterized in that, The publish-subscribe relationship design module has a file import interface, which parses and imports a formatted file containing a publish-subscribe relationship table and a topic-name mapping table, converting it into structured data for internal system use.

10. A ship information system publish / subscribe legality testing and evaluation system according to claim 8, characterized in that, The publish-subscribe legality assessment module encodes the publish-subscribe legality judgment rules into a function, takes the defined design publish-subscribe relationship data and the collected actual publish-subscribe relationship data as input, and outputs the assessment result.