Visualization method and device of data packet publishing and subscribing mapping relation and electronic equipment

By analyzing the configuration files of the autonomous driving software system to generate a data mapping relationship table, the problem of difficult to determine the flow of data packets between software components is solved, rapid fault location and repair is achieved, and software development efficiency is improved.

CN119065935APending Publication Date: 2024-12-03DEEPAL AUTOMOBILE TECH CO LTD

Patent Information

Application Number
CN202310629877.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the autonomous driving software system, there are a large number of data packets transmitted between software components, making it difficult to determine the data flow direction, resulting in low fault location and repair efficiency during software development.

Method used

By analyzing the configuration files of all components, a data mapping relationship table consisting of component name-send data packet-receive component names is generated, and a visual data is provided to display the transmission and reception relationship of data packets is supported, and data flow analysis, software component coupling analysis and interface modification are supported. Workload assessment.

Benefits of technology

It shortens the problem location time, improves the software repair rate, and provides quantitative evaluation of the degree of coupling of software components and support for real-time data transmission and reception relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065935A_ABST
    Figure CN119065935A_ABST
Patent Text Reader

Abstract

The invention relates to a visualization method and device for a data packet publishing and subscribing mapping relation and electronic equipment. The method comprises the following steps: acquiring configuration files of all components, and analyzing the configuration files to obtain each component name, at least one sending data packet corresponding to each component name and at least one receiving component name corresponding to each sending data packet, and according to each component name, the at least one sending data packet corresponding to each component name and the at least one receiving component name corresponding to each sending data packet, generating a data mapping relation table formed by component name-sending data packet-receiving component name, so as to provide visual data for a user. Therefore, the problems that the number of data packets transmitted between the software components is large, and the data flow direction is difficult to determine are solved, and the receiving and transmitting relation of the data packets between the software components can be visually displayed; powerful support is provided for data packet flow analysis, software component coupling analysis, interface modification workload evaluation and software Bug rapid positioning and modification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software tool chain development, and in particular to a visualization method, device and electronic device for data packet publish-subscribe mapping relationship. Background Art

[0002] As the functions of autonomous driving systems continue to improve, autonomous driving software systems are becoming increasingly complex. Software systems are divided into at least a dozen small components, and the number of data packets (also called software signals) transmitted between small components can easily reach thousands. Faced with such complex software data relationships, if a fault occurs during the software development process, a method is urgently needed to quickly locate the problem and speed up the repair process.

[0003] In the related technology, patent [CN202110091240.7] proposes a data visualization system and method based on an adaptive platform automobile open system architecture, the system comprising: an external data acquisition module, an autonomous driving domain controller connected to the external data acquisition module, and a host computer connected to the autonomous driving domain controller, the host computer comprising a data visualization interface electrically connected to the autonomous driving domain controller, and a display unit electrically connected to the data visualization interface. The present invention converts the external data collected by the external data acquisition module and the vehicle's own data into visualized data through the visualization interface of the autonomous driving domain controller and the host computer, and displays them to the staff through the display unit, thereby solving the problem that the existing external data conversion equipment has complex data conversion due to different specifications, which not only takes a long time, but also causes data loss, resulting in a long system application development time.

[0004] However, this technology only ensures the efficiency of autonomous driving software data collection and the integrity and correctness of the data itself. It is unable to visualize the data flow and the data sending and receiving relationship between software components, which needs to be solved urgently. Summary of the invention

[0005] One of the purposes of the present invention is to provide a method for visualizing the publish-subscribe mapping relationship of data packets, so as to solve the problem in the prior art that a large number of data packets are transmitted between software components and it is difficult to determine the data flow direction; a second purpose is to provide a device for visualizing the publish-subscribe mapping relationship of data packets; a third purpose is to provide an electronic device; and a fourth purpose is to provide a computer-readable storage medium.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0007] A visualization method for data packet publish-subscribe mapping relationship includes the following steps:

[0008] Get the configuration files of all components;

[0009] Parsing the configuration file to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet; and

[0010] A data mapping relationship table consisting of component name-sending data packet-receiving component name is generated according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet to provide visual data to users.

[0011] According to the above technical means, the present invention parses the configuration files of all components to obtain the component name, the sending data packet corresponding to the component name, and the receiving component name corresponding to the sending data packet, and then generates a data mapping relationship table consisting of the three. This solves the problem that a large number of data packets are transmitted between software components and it is difficult to determine the data flow direction. It can visualize the sending and receiving relationship of data packets between each software component, and provide strong support for data packet flow analysis, software component coupling analysis, interface modification workload assessment, and rapid location and modification of software bugs.

[0012] Further, the generating of a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet includes:

[0013] Constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sent data packet;

[0014] Constructing the first column of the data mapping relationship table according to at least one sending data packet corresponding to each component name;

[0015] The data mapping relationship table is generated according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each transmitted data packet.

[0016] According to the above technical means, the present invention constructs a data mapping relationship table, with the receiving component name corresponding to the sent data packet as the first row and the sending data packet corresponding to the component name as the first column. The data mapping relationship table thus constructed is clear and intuitive, which can shorten the time for problem locating and thus speed up the rate of software repair.

[0017] Further, after generating the data mapping relationship table according to the first row and the first column, the method further includes:

[0018] Determine the text alignment attribute of the first row, the fill attributes of the first row and the first column, the border attribute of the data mapping relationship table, and the freeze attribute of the first row, the first column, and the columns adjacent to the first column;

[0019] The text of the first row is adjusted according to the text alignment attribute, the first fill color of the first row and the second fill color of the first column are set according to the fill attribute, the border parameters of the data mapping relationship table are set according to the border attribute, and the first row, the first column and the columns adjacent to the first column are frozen according to the freeze attribute.

[0020] According to the above technical means, the present invention can adjust the style of the generated data mapping relationship table so that the data mapping relationship table looks clearer and is convenient for users to view.

[0021] Further, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the method further includes:

[0022] The data mapping relationship table is stored and uploaded to a preset hosting server for users to download and browse.

[0023] According to the above technical means, the present invention stores the generated data mapping relationship table and uploads it to a preset hosting server, so that users can directly download and view it, thereby accelerating the speed of software repair.

[0024] Further, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the method further includes:

[0025] Verifying whether the data mapping relationship table meets the preset generation requirements;

[0026] If the data mapping relationship table does not meet the preset generation requirement, the configuration files of all components are re-acquired until the data mapping relationship table meets the preset generation requirement.

[0027] According to the above technical means, the present invention improves the accuracy of the data mapping relationship table by verifying the generated data mapping relationship table, provides maximum support for evaluating the workload of software interface modification, quantitatively displaying the degree of coupling between software components, and obtaining the data receiving and sending relationship of each version of software in real time, and assists in problem location.

[0028] A visualization device for data packet publish-subscribe mapping relationship, comprising:

[0029] Get module, used to get configuration files of all components;

[0030] a parsing module, configured to parse the configuration file to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet; and

[0031] A generation module is used to generate a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, so as to provide visual data for users.

[0032] Furthermore, the generating module is specifically used for:

[0033] Constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sent data packet;

[0034] Constructing the first column of the data mapping relationship table according to at least one sending data packet corresponding to each component name;

[0035] The data mapping relationship table is generated according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each transmitted data packet.

[0036] Further, after generating the data mapping relationship table according to the first row and the first column, the generating module is further used to:

[0037] Determine the text alignment attribute of the first row, the fill attributes of the first row and the first column, the border attribute of the data mapping relationship table, and the freeze attribute of the first row, the first column, and the columns adjacent to the first column;

[0038] The text of the first row is adjusted according to the text alignment attribute, the first fill color of the first row and the second fill color of the first column are set according to the fill attribute, the border parameters of the data mapping relationship table are set according to the border attribute, and the first row, the first column and the columns adjacent to the first column are frozen according to the freeze attribute.

[0039] Further, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the generating module is further used to:

[0040] The data mapping relationship table is stored and uploaded to a preset hosting server for users to download and browse.

[0041] Further, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the generating module is further used to:

[0042] Verifying whether the data mapping relationship table meets the preset generation requirements;

[0043] If the data mapping relationship table does not meet the preset generation requirement, the configuration files of all components are re-acquired until the data mapping relationship table meets the preset generation requirement.

[0044] An electronic device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the visualization method of data packet publish-subscribe mapping relationship as described in the above embodiment.

[0045] A computer-readable storage medium stores a computer program, which is executed by a processor to implement the visualization method of data packet publish-subscribe mapping relationship as described in the above embodiment.

[0046] Beneficial effects of the present invention:

[0047] The present invention can efficiently obtain the publish-subscribe mapping relationship of data packets in the process of developing an autonomous driving software system under the ARM-aarch64 hardware platform, and provide a mapping relationship table for technical personnel in related fields, so as to assist in problem location and provide maximum support in evaluating the workload of modifying software interfaces (in autonomous driving research and development, the data sent by each component is often called an interface), quantifying the degree of coupling between software components, and obtaining the data sending and receiving relationship of each version of software in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A flowchart of a method for visualizing a data packet publish-subscribe mapping relationship according to an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of a mapping relationship table generated according to an embodiment of the present invention;

[0050] Figure 3 A flowchart of a method for visualizing a data packet publish-subscribe mapping relationship according to an embodiment of the present invention;

[0051] Figure 4A block diagram of a device for visualizing a data packet publish-subscribe mapping relationship according to an embodiment of the present invention;

[0052] Figure 5 FIG. 4 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention.

[0053] Among them, 10-a visualization device for data packet publish-subscribe mapping relationship, 100-an acquisition module, 200-a parsing module, 300-a generation module, 501-a memory, 502-a processor, and 503-a communication interface. DETAILED DESCRIPTION

[0054] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0055] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0056] Specifically, Figure 1 The present invention provides a flowchart of a method for visualizing a data packet publish-subscribe mapping relationship.

[0057] like Figure 1 As shown, the visualization method of the data packet publish-subscribe mapping relationship includes the following steps:

[0058] In step S101, configuration files of all components are obtained.

[0059] Among them, the configuration file is essentially a file containing the information required for the successful operation of the program. This information is constructed in a specific way. It is not hard-coded in the program, but is user-customizable and usually stored in a plain text file. In this embodiment, the configuration files of all components include yaml files and proto files.

[0060] Specifically, first, the yaml file and proto file of the software component are written. The autonomous driving software component writes the corresponding interface file according to the current mainstream protobuf, and writes multiple data into a message for packaging, thereby forming a data packet in the yaml file; the yaml file of the software component is used to define which messages the component receives and sends in the autonomous driving software system, so the yaml file needs to be developed in advance and uploaded to a code hosting server, such as gitlab.

[0061] Among them, protobuf is an interface management protocol developed by Google and applied in the communication field.

[0062] Furthermore, the Jenkins pipeline is built. First, a pipeline for generating a data mapping relationship table is created in Jenkins. The trigger mode is selected as merge trigger, and Webhook is configured to listen to the upload warehouse of component yaml files and proto files; secondly, the regular expression that triggers the Jenkins pipeline is configured. According to the actual needs of the R&D project, only the source and sink branches with specific names can be configured to be triggered by merge; finally, Jenkinsfile is written to define two stages, one for pulling the script for generating the data mapping relationship table, and the other for calling the method of generating the data mapping relationship table script to generate and upload the data mapping relationship table to the gitlab server.

[0063] In step S102, the configuration file is parsed to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet.

[0064] It should be noted that all scripts in the embodiments of the present invention are developed in Python language, and the scripts are executed by the second stage after the Jenkins pipeline is triggered by a merge request, and the running process is in the container of the Jenkins server.

[0065] Specifically, parse the YAML files of all components to obtain the component name-sent data packet list dictionary: first use the git clone command to clone the component interface repository (that is, the repository that stores all component YAML files and proto files) into the Jenkins container, then traverse all YAML files to obtain each component name in the YAML file and use it as the key of the dictionary data structure. At least one sent data packet (that is, all messages) corresponding to each component name of the component is stored in the dictionary as a value until all components are stored.

[0066] Furthermore, parse the YAML files of all components to obtain a dictionary of sent data packets and received component names: Similarly, traverse the YAML files of all components, use each sent data packet as the key of the dictionary, and at least one receiving component name corresponding to each sent data packet as the value, and store them in another dictionary.

[0067] It is understandable that the above two dictionaries are generated to obtain the relationship between each sent data packet and each component, that is, which data packets are sent by each component and which other components receive each data packet in these data packets, so as to finally generate a data mapping relationship table.

[0068] In step S103, a data mapping relationship table consisting of component name-sending data packet-receiving component name is generated according to each component name, at least one sending data packet corresponding to each component name and at least one receiving component name corresponding to each sending data packet to provide visual data for the user.

[0069] It can be understood that the embodiment of the present invention can generate a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name obtained, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, such as Figure 2 As shown, it shows the user which data packets are sent by each component and which other components receive each data packet in these data packets. This helps to evaluate the workload of software interface modification, quantify the degree of coupling between software components, and obtain the data sending and receiving relationship of each version of software in real time, thus assisting in problem location and providing maximum support.

[0070] Further, in some embodiments, a data mapping relationship table consisting of component name-transmitting data packet-receiving component name is generated according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, including: constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sending data packet; constructing the first column of the data mapping relationship table according to at least one sending data packet corresponding to each component name; generating the data mapping relationship table according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each sending data packet.

[0071] Specifically, the embodiment of the present invention can use Python's third-party library openpyxl to create an Excel object WorkSheet (i.e., a data mapping relationship table), use the list of all component names as parameters, call the append method to construct the first row of Excel, and then construct each row of the sent data packet according to the sent data packet-received component name list dictionary. If a component receives the data packet, the cell value of the column where the component is located and the row where the data packet is located is 1, otherwise it is empty; the next step is to construct the first column, and construct the component name cell in the first column of the WorkSheet object according to the component name-sent data packet list dictionary, and each component name needs to be merged, and the merged length is the same as the length of the sent data packet. Finally, count how many components each sent data packet is received, use the fill formula and translation function of the WorkSheet object (similar to dragging a cell with a formula downward with the mouse, and the same calculation result appears in the cell below), and write the number of receiving component names corresponding to each sent data packet in each cell of the last column.

[0072] Among them, in some embodiments, after generating the data mapping relationship table according to the first row and the first column, it also includes: determining the text alignment attributes of the first row, the fill attributes of the first row and the first column, the border attributes of the data mapping relationship table, and the freeze attributes of the first row, the first column, and the columns adjacent to the first column; adjusting the text of the first row according to the text alignment attributes, setting the first fill color of the first row and the second fill color of the first column according to the fill attributes, setting the border parameters of the data mapping relationship table according to the border attributes, and freezing the first row, the first column, and the columns adjacent to the first column according to the freeze attributes.

[0073] Specifically, the embodiment of the present invention can also adjust the style of the data mapping relationship table, that is, use the alignment attribute (i.e., alignment attribute) of the WorkSheet cell object to adjust the text of the first row, and set the text of the first row to be vertically and centered; use the fill attribute (i.e., fill attribute) of the WorkSheet cell object to set the first fill color of the first row and the second fill color of the first column, and fill the first row and the first column with a custom background color; use the border attribute (i.e., border attribute) of the WorkSheet cell object to set the border parameters of the data mapping relationship table, and set the border of the Excel worksheet to all borders; finally, freeze the pane setting, use the freeze_panes attribute (i.e., freeze attribute) of the WorkSheet object to freeze the first row, the first column, and the columns adjacent to the first column (i.e., the component name column and the sent data packet name column).

[0074] Furthermore, in some embodiments, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, it also includes: storing the data mapping relationship table, and uploading the data mapping relationship table to a preset hosting server for users to download and browse.

[0075] Specifically, in this embodiment, the save method of the WorkSheet object can be used to generate a data mapping relationship table consisting of component name-sending data packet-receiving component name, and the upload method can be used to upload the data mapping relationship table to a preset hosting server, such as a specified branch of a specified repository of a gitlab server, for users to download and browse.

[0076] In addition, in some embodiments, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, it also includes: verifying whether the data mapping relationship table meets the preset generation requirements; if the data mapping relationship table does not meet the preset generation requirements, re-obtaining the configuration files of all components until the data mapping relationship table meets the preset generation requirements.

[0077] It is understandable that after the data mapping relationship table is generated, acceptance testing, as an important link in product development, cannot be omitted, that is, to verify whether the data mapping relationship table meets the preset generation requirements. First, two test branches are established in the interface warehouse of gitlab, one is the source branch citest_develop, and the other is the destination branch citest_release. Then create a merge request to observe whether the Jenkins pipeline is triggered normally. If there is no need to check whether the Webhook and regular expression meet the triggering conditions, wait for the pipeline to execute, open the citest_develop branch of the interface warehouse, and observe whether a data mapping relationship table is generated. If so, download the data mapping relationship table to the local computer, open the file, and observe whether the file format, mapping content, and sum are correct. If the file format, mapping content, and sum are correct, it indicates that the data mapping relationship table meets the preset generation requirements. Otherwise, if any one of them is incorrect, it is necessary to re-obtain the configuration files of all components until the data mapping relationship table meets the preset generation requirements.

[0078] To facilitate those skilled in the art to further understand the visualization method of data packet publish-subscribe mapping relationship proposed in the embodiment of the present application, the following is a combined Figure 3 Provide further explanation.

[0079] like Figure 3 As shown, the visualization method of the data packet publish-subscribe mapping relationship includes the following steps:

[0080] Step S301, read the configuration files of all components, and parse out the sending data packet of each component.

[0081] Step S302, read the configuration files of all components, and parse out which components receive each data packet.

[0082] Step S303: Create an Excel file object to record the mapping relationship between the sending interface and the received data packet.

[0083] Step S304, using an Excel file object to design and record the total number of components receiving each data packet.

[0084] Step S305, store the Excel file object as a file and upload it to the gitlab code management server.

[0085] In summary, the data mapping relationship table provided in the embodiment of the present invention can help in the following aspects of the autonomous driving software development process:

[0086] (1) Evaluate the completeness and workload of software interface changes

[0087] In the industry, the modification of the autonomous driving software interface has always been a top priority in the research and development process. The modification of the interface often means the addition of new functions or the optimization of old functions, the resolution of major problems, etc. However, in complex autonomous driving software systems, the modification of the software interface often "changes the whole system if one part is changed". For example, if the sending interface of an upstream component is modified, there are ten components receiving the interface data, but one component forgets to make the corresponding adaptation, there will be unpredictable risks, thus affecting the normal operation of the software function; at the same time, there are often more than one scheme for modifying the interface in the research and development process. It is conceivable that the fewer the modules are modified, the lower the uncontrollability of the software. Therefore, it is necessary to know how many components need to be changed in each interface modification scheme, and then compare and select the scheme with the least modification. Therefore, the software data packet mapping table provided in the embodiment of the present invention records the data packets sent by each component and which components receive each data packet, which meets the needs of identifying the affected components and evaluating the modification workload when modifying a data packet.

[0088] (2) Quantifying the degree of coupling of software components

[0089] A good software architecture generally follows the design concept of high cohesion and low coupling. In simple terms, after the software system is divided into multiple components, these components should have high logic and data dependencies, and the logic and data dependencies between components should be as few as possible. The software developed by such software architecture design is easier to maintain and expand. In the development process of the autonomous driving software system, after the software architecture engineer gives the initial version of the software architecture design, the developers will complete the initial version of the software development. At this time, the software has the characteristics of high cohesion and low coupling. However, an autonomous driving software development project takes at least one year and at most two years. During this period, there are not only functional implementations, but also a lot of problem solving, performance optimization and other work, which all rely on the adjustment of the software interface. After the software interface adjustment becomes more, it is difficult for the software to continue to maintain the characteristics of high cohesion and low coupling. Therefore, on the basis of the mapping table of the sending and receiving relationship of the component data packets, the embodiment of the present invention also adds the statistics of how many components each data packet of each component is received by in total, so that it can be known which components have the most communication data packets, and the architecture personnel can quickly identify and analyze the current design, and then make a decision on whether to make adjustments. For the software, the earlier the discovery, the lower the adjustment cost.

[0090] (3) Quickly locate software problems

[0091] In many software development processes, there are often problems with outdated documents and incompatibility with the software. Due to project progress, developers usually complete the coding first and then supplement the documents, so the real-time and quality of the documents are difficult to guarantee. When there are system-level problems (i.e., cross-component problems), in addition to the participation of experts who are very familiar with the entire system, it is generally necessary to re-sort the logic lines and consult the source code of multiple components to analyze the problems, which is time-consuming and laborious. Therefore, the mapping relationship table provided in the embodiment of the present invention is automatically generated by the software script after the development of the autonomous driving software interface, and does not require manual participation by developers, which greatly improves the real-time and high quality. In this way, when any developer analyzes and locates the problem, he can only look at the component code of the related part based on the latest data mapping relationship table, shortening the time for problem location, thereby accelerating the rate of software repair.

[0092] According to the visualization method of data packet publishing and subscription mapping relationship proposed in the embodiment of the present invention, by parsing the configuration files of all components, according to each component name, at least one sending data packet corresponding to each component name and at least one receiving component name corresponding to each sending data packet, a data mapping relationship table consisting of component name-sending data packet-receiving component name is generated to provide visualized data to the user. Thus, the problem that there are many data packets transmitted between software components and it is difficult to determine the data flow direction is solved, and the sending and receiving relationship of data packets between various software components can be visualized, which provides strong support for data packet flow analysis, software component coupling analysis, interface modification workload evaluation, and rapid location and modification of software bugs.

[0093] Next, a visualization device for data packet publish-subscribe mapping relationship according to an embodiment of the present invention is described with reference to the accompanying drawings.

[0094] Figure 4 A block diagram of a device for visualizing a publish-subscribe mapping relationship of a data packet according to an embodiment of the present invention.

[0095] like Figure 4 As shown, the visualization device 10 for data packet publish-subscribe mapping relationship includes: an acquisition module 100 , a parsing module 200 and a generation module 300 .

[0096] Wherein, the acquisition module 100 is used to obtain configuration files of all components;

[0097] A parsing module 200, configured to parse the configuration file to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet; and

[0098] The generation module 300 is used to generate a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, so as to provide visual data for users.

[0099] Furthermore, in some embodiments, the generating module 300 is specifically configured to:

[0100] Constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sent data packet;

[0101] Constructing a first column of a data mapping relationship table according to at least one sending data packet corresponding to each component name;

[0102] A data mapping relationship table is generated according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each transmitted data packet.

[0103] Furthermore, in some embodiments, after generating the data mapping relationship table according to the first row and the first column, the generating module 300 is further used to:

[0104] Determine the text alignment properties of the first row, the fill properties of the first row and the first column, the border properties of the data mapping relationship table, and the freeze properties of the first row, the first column, and the columns adjacent to the first column;

[0105] Adjust the text of the first row according to the text alignment properties, set the first fill color of the first row and the second fill color of the first column according to the fill properties, set the border parameters of the data mapping relationship table according to the border properties, and freeze the first row, the first column, and the adjacent columns of the first column according to the freeze properties.

[0106] Further, in some embodiments, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the generating module 300 is further used to:

[0107] The data mapping relationship table is stored and uploaded to a preset hosting server for users to download and browse.

[0108] Further, in some embodiments, after generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the generating module 300 is further used to:

[0109] Verify whether the data mapping relationship table meets the preset generation requirements;

[0110] If the data mapping relationship table does not meet the preset generation requirements, the configuration files of all components are re-obtained until the data mapping relationship table meets the preset generation requirements.

[0111] It should be noted that the explanation of the embodiment of the method for visualizing the publish-subscribe mapping relationship of data packets is also applicable to the apparatus for visualizing the publish-subscribe mapping relationship of data packets of this embodiment, and will not be repeated here.

[0112] According to the visualization device of the data packet publishing and subscription mapping relationship proposed in the embodiment of the present invention, by parsing the configuration files of all components, according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, a data mapping relationship table consisting of component name-sending data packet-receiving component name is generated to provide visualized data to the user. Thus, the problem that the number of data packets transmitted between software components is large and it is difficult to determine the data flow direction is solved, and the sending and receiving relationship of data packets between various software components can be visualized, which provides strong support for data packet flow analysis, software component coupling analysis, interface modification workload evaluation, and rapid location and modification of software bugs.

[0113] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include:

[0114] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0115] When the processor 502 executes the program, the method for visualizing the data packet publish-subscribe mapping relationship provided in the above embodiment is implemented.

[0116] Furthermore, the electronic device further comprises:

[0117] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0118] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0119] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0120] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0121] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0122] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0123] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for visualizing the publishing and subscribing mapping relationship of data packets as described above is implemented.

[0124] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.

Claims

1. A method for visualizing the mapping relationship between data packet publishing and subscription, characterized in that: The following steps are involved: Get the configuration files of all components; Parsing the configuration file to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet; as well as A data mapping relationship table consisting of component name-sending data packet-receiving component name is generated according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet to provide visual data to users.

2. The method according to claim 1, characterized in that The step of generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet comprises: Constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sent data packet; Constructing the first column of the data mapping relationship table according to at least one sending data packet corresponding to each component name; The data mapping relationship table is generated according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each transmitted data packet.

3. The method according to claim 2, characterized in that After generating the data mapping relationship table according to the first row and the first column, the method further includes: Determine the text alignment attribute of the first row, the fill attributes of the first row and the first column, the border attribute of the data mapping relationship table, and the freeze attribute of the first row, the first column, and the columns adjacent to the first column; The text of the first row is adjusted according to the text alignment attribute, the first fill color of the first row and the second fill color of the first column are set according to the fill attribute, the border parameters of the data mapping relationship table are set according to the border attribute, and the first row, the first column and the columns adjacent to the first column are frozen according to the freeze attribute.

4. The method according to claim 1, characterized in that: After generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the method further includes: The data mapping relationship table is stored and uploaded to a preset hosting server for users to download and browse.

5. The method according to claim 1, characterized in that After generating a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, the method further includes: Verifying whether the data mapping relationship table meets the preset generation requirements; If the data mapping relationship table does not meet the preset generation requirement, the configuration files of all components are re-acquired until the data mapping relationship table meets the preset generation requirement.

6. A visualization device for data packet publish-subscribe mapping relationship, characterized in that: include: Get module, used to get configuration files of all components; A parsing module, used to parse the configuration file to obtain each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet; as well as A generation module is used to generate a data mapping relationship table consisting of component name-sending data packet-receiving component name according to each component name, at least one sending data packet corresponding to each component name, and at least one receiving component name corresponding to each sending data packet, so as to provide visual data for users.

7. The device according to claim 6, characterized in that The generation module is specifically used for: Constructing the first row of the data mapping relationship table according to at least one receiving component name corresponding to each sent data packet; Constructing the first column of the data mapping relationship table according to at least one sending data packet corresponding to each component name; The data mapping relationship table is generated according to the first row and the first column, wherein the last column of the data mapping relationship table is the number of receiving component names corresponding to each transmitted data packet.

8. The device according to claim 7, characterized in that After generating the data mapping relationship table according to the first row and the first column, the generating module is further used to: Determine the text alignment attribute of the first row, the fill attributes of the first row and the first column, the border attribute of the data mapping relationship table, and the freeze attribute of the first row, the first column, and the columns adjacent to the first column; The text of the first row is adjusted according to the text alignment attribute, the first fill color of the first row and the second fill color of the first column are set according to the fill attribute, the border parameters of the data mapping relationship table are set according to the border attribute, and the first row, the first column and the columns adjacent to the first column are frozen according to the freeze attribute.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for visualizing the publish-subscribe mapping relationship of data packets as described in any one of claims 1 to 5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the visualization method of the data packet publish-subscribe mapping relationship as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Data visualization system and method based on adaptive platform automobile open system architecture

    CN112810553A

Cited By

  • System design multi-view dynamic generation and conversion method and system based on publish-subscribe relationship

    CN120670624A