Software middleware analysis method and device and electronic equipment
By creating send and receive threads in the middleware, recording timestamps, and calculating the duration of each level, the problem of accurately locating low-performance levels in the middleware is solved, improving the accuracy and automation of testing.
Patent Information
- Application Number
- CN202510854449.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-17
AI Technical Summary
When there are multiple forwarding layers in the middleware, it is difficult to accurately locate the low-performance forwarding layer, and the lack of a unified evaluation standard leads to inaccurate test results.
By creating sending, receiving, and processing threads, and using the first publish and first subscribe interfaces, sending and receiving timestamps are recorded, the duration of each level is calculated, and the low-performance level is determined.
It enables accurate location of low-performance layers in middleware, improves the accuracy and automation of testing, and enhances the efficiency of large-scale performance testing.
Smart Images

Figure CN120803918A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of software analysis, and particularly relates to a software middleware analysis method and device and an electronic device. BACKGROUND
[0002] In related technologies for analyzing software middleware, since the middleware contains more than one forwarding level, in the case where the middleware has many forwarding levels, when the performance of the middleware as a whole is tested, it is difficult to evaluate the performance of each forwarding level, so that the low-performance forwarding level cannot be accurately located, that is, it cannot be accurately located that the performance of which forwarding level restricts the performance of the tested middleware.
[0003] On the other hand, since there are many types of software middleware, when the performance of each different type of middleware is tested, there is a lack of unified evaluation standard, and in the case where there is no unified evaluation standard, it is more difficult to accurately locate the low-performance forwarding level in different middleware. SUMMARY
[0004] The embodiments of the present application provide a software middleware analysis method, device and electronic device, which can accurately locate the low-performance forwarding level.
[0005] In a first aspect, the embodiments of the present application provide a software middleware analysis method applied to an analysis program connected with middleware, wherein the middleware is provided with a first publishing interface and a first subscribing interface, used to access information through the first publishing interface and transmit the information to the first subscribing interface through multiple forwarding levels of the middleware; the method comprises:
[0006] creating a sending thread and a receiving thread for controlling the middleware to transmit information, and a processing thread for analyzing the information;
[0007] in response to starting the sending thread, calling the first publishing interface to create a first sending timestamp for the information, and transmitting the information and the first sending timestamp to the first subscribing interface;
[0008] in response to starting the receiving thread, calling the information, the first sending timestamp and multiple first level time lengths from the first subscribing interface, each first level time length representing a time length consumed when the corresponding forwarding level transmits the information, and creating a first receiving timestamp for the information;
[0009] in response to starting the processing thread, determining a difference between the first sending timestamp and the first receiving timestamp as a first transmission time length of the middleware for transmitting the information, calculating an average time length consumed by the first transmission time length in the multiple forwarding levels, and determining a level with a first level time length greater than the average time length as a low-performance level.
[0010] The middleware includes a filter; before creating a sending thread and a receiving thread for controlling the middleware to transmit information, and a processing thread for analyzing the information, the method further includes:
[0011] configuring a communication protocol, a test duration, a sending rate, and a filter for the middleware;
[0012] creating at least two interfaces for the middleware, and determining a first end and a second end from the at least two interfaces, the first end being used to send information when the middleware transmits information, and the second end being used to receive or forward information when the middleware transmits information.
[0013] Further, creating at least two interfaces for the middleware, and determining a first end and a second end from the at least two interfaces, includes:
[0014] in a case where the middleware is used to transmit information within a same process of a same operating system, creating a first publishing interface and a first subscribing interface connected to the same process for the middleware;
[0015] determining the first publishing interface as the first end, and determining the first subscribing interface as the second end.
[0016] Further, creating at least two interfaces for the middleware, and determining a first end and a second end from the at least two interfaces, further includes:
[0017] in a case where the middleware is used to transmit information between a first process and a second process of a same operating system, creating a first publishing interface and a first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process for the middleware;
[0018] determining the first publishing interface as the first end, and determining the second publishing interface and the second subscribing interface as the second end.
[0019] Further, creating at least two interfaces for the middleware, and determining a first end and a second end from the at least two interfaces, further includes:
[0020] in a case where the middleware is used to transmit information between a first process and a second process of different operating systems, creating a first publishing interface and a first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process for the middleware;
[0021] determining the first publishing interface as the first end, and determining the second publishing interface and the second subscribing interface as the second end.
[0022] Further, after determining a difference between the first sending timestamp and the first receiving timestamp as a first transmission duration of the middleware to transmit information, the method further includes:
[0023] determining whether a test time length is reached for the middleware;
[0024] in the case where the test time length is not reached, starting a sending thread, calling the first publishing interface to create a second sending timestamp for the information, and transmitting the information and the second sending timestamp to the first subscribing interface;
[0025] in response to starting the receiving thread, calling the information, the second sending timestamp and a plurality of second level time lengths from the first subscribing interface, each second level time length representing a time length consumed by a corresponding forwarding level in transmitting the information, and creating a second receiving timestamp for the information;
[0026] in response to starting the processing thread, determining a difference between the second sending timestamp and the second receiving timestamp as a second transmission time length of the middleware in transmitting the information, calculating a transmission average of the first transmission time length and the second transmission time length, calculating an average time length consumed by the transmission average in the plurality of forwarding levels, and calculating a level average of each first level time length and second level time length, and determining a level whose level average is greater than the average time length as a low-performance level.
[0027] wherein the information includes a plurality of information data and an order identifier of each information data;
[0028] Further, after responding to starting the processing thread, the method further includes:
[0029] identifying the order identifier of each information data;
[0030] determining whether the order of each order identifier is out of order;
[0031] in the case where the order of each order identifier is out of order, determining that the order of each information data in the information is out of order, and determining that the middleware has a performance problem.
[0032] wherein the information includes a plurality of information data and an order identifier of each information data;
[0033] Further, after responding to starting the processing thread, the method further includes:
[0034] identifying the order identifier of each information data;
[0035] determining whether the order identifier is missing;
[0036] in the case where the order identifier is missing, determining that an information data is missing in the information, and determining that the middleware has a performance problem.
[0037] In a second aspect, an embodiment of the present application provides an analysis device of software middleware, the device comprising:
[0038] The creating module is configured to create a sending thread and a receiving thread for controlling middleware to transmit information, and a processing thread for analyzing the information;
[0039] The sending module is configured to, in response to starting the sending thread, invoke the first publishing interface to create a first sending timestamp for the information, and transmit the information and the first sending timestamp to the first subscribing interface;
[0040] The receiving module is configured to, in response to starting the receiving thread, call the information, the first sending timestamp, and a plurality of first level time lengths from the first subscribing interface, each first level time length representing a time length consumed when the information is transmitted at a corresponding forwarding level, and create a first receiving timestamp for the information;
[0041] The processing module is configured to, in response to starting the processing thread, determine a difference between the first sending timestamp and the first receiving timestamp as a first transmission time length of the middleware for transmitting the information, calculate an average time length of the first transmission time length consumed in a plurality of forwarding levels, and determine a level with a first level time length greater than the average time length as a low-performance level.
[0042] In a third aspect, an electronic device is provided, and the device includes:
[0043] a processor and a memory storing computer program instructions;
[0044] The processor implements the analysis method of the software middleware according to any one of the preceding aspects when executing the computer program instructions.
[0045] In a fourth aspect, a computer storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the analysis method of the software middleware according to any one of the preceding aspects.
[0046] In a fifth aspect, an instruction in a computer program product is executed by a processor of an electronic device, so that the electronic device executes the analysis method of the software middleware according to any one of the preceding aspects.
[0047] In a sixth aspect, the embodiments of the present application further provide a vehicle, and the vehicle includes an analysis device of software middleware or an electronic device, and the electronic device executes the analysis method of the software middleware according to any one of the preceding aspects.
[0048] The analysis method, device and electronic device of the software middleware according to the embodiments of the present application can control the middleware to be tested by executing the sending thread and the receiving thread based on the created sending thread and receiving thread, and can analyze the information obtained from the middleware based on the created processing thread.
[0049] Specifically, due to the first publishing interface and the first subscription interface of the middleware, the first publishing interface can be directly called when executing the sending thread, so that the information that needs to be transmitted by the middleware can be sent to the middleware through the first publishing interface, and when executing the sending thread, the middleware can also add the sending timestamp when the transmission of the information starts.
[0050] Furthermore, when executing the receiving thread, the information transmitted by the middleware together with the sending timestamp can be obtained from the middleware by directly calling the first subscription interface. In addition, since the middleware includes multiple forwarding levels, the information will be forwarded by multiple forwarding levels when transmitted by the middleware. Therefore, when using the receiving thread to obtain the information and the sending timestamp, the time consumed by each forwarding level to transmit the information is also obtained, that is, the time length of each level. At the same time, when executing the receiving thread, the receiving timestamp of the received information is also created.
[0051] Based on this, the sending timestamp and receiving timestamp can be used to determine the transmission time of the middleware to transmit the information, wherein the transmission time specifically represents the transmission delay of the middleware. When the number of forwarding levels of the middleware is determined, the average time consumed by each forwarding level can be calculated. By comparing the average time with the actual time of each level, the level whose level time is greater than the average time can be determined. In other words, the level whose level time is greater than the average time belongs to the low-performance level among the forwarding levels, thereby achieving the purpose of locating the low-performance level. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 This is a flowchart of a software middleware analysis method provided in an embodiment of the present application;
[0054] Figure 2 This is a schematic diagram of a first scenario of a software middleware analysis method provided in an embodiment of the present application;
[0055] Figure 3 This is a schematic diagram of a second scenario of a software middleware analysis method provided in an embodiment of the present application;
[0056] Figure 4 This is a schematic diagram of a third scenario of a software middleware analysis method provided in an embodiment of the present application;
[0057] Figure 5is a structural schematic diagram of an analysis device for software middleware provided by an embodiment of the present application.
[0058] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0059] Features and exemplary embodiments of various aspects of the present application will be described below in detail, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0060] It should be noted that, in this paper, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0061] As described in the background section, the related software middleware analysis technology is also difficult to meet the needs in actual work.
[0062] In the communication process of the vehicle system, software middleware needs to be used to complete the communication.
[0063] Software middleware, also referred to as middleware, is arranged between an upper application program and a lower operating system, and is specifically used to connect two different threads to realize the interactive behavior of information sending and receiving between the two threads.
[0064] Specifically, the two different threads can be, for example, two different threads in the same process of the same application program belonging to the same operating system, wherein a process includes multiple threads, and the process can be considered as a task executed by the application program, and the thread can be considered as each operation in the execution of the task.
[0065] The two different threads can be, for example, two threads respectively belonging to two different processes of the same operating system, wherein one application program can include multiple different processes, and thus the two different processes can be, for example, the same application program or two different application programs belonging to the same operating system.
[0066] The two different threads can also be, for example, one process respectively belonging to two different operating systems, wherein multiple different operating systems can run in one electronic device, and thus the two different operating systems can be set in the same electronic device or in two different electronic devices.
[0067] In the analysis of the middleware, an analysis program is used to obtain, from the middleware, an interaction result of interaction between the two threads.
[0068] The analysis program is set in a process to which the thread sending the information belongs.
[0069] In the implementation of the present application, it is found that in the analysis technology of related software middleware, the middleware is often composed of multiple forwarding levels, and thus when the performance of the whole middleware is tested, only the performance test result of the whole middleware can be obtained, and the low-performance forwarding level cannot be accurately located, that is, the performance of the tested middleware cannot be accurately located to be restricted by which low-performance forwarding level.
[0070] On the other hand, because of the large variety of middleware, each analysis program often lacks a unified performance evaluation standard when analyzing each different middleware, and thus it is difficult to obtain a standardized test result for different middleware, which leads to inaccurate test results after testing different middleware, and the non-uniform evaluation standard makes it more difficult to accurately locate the low-performance forwarding level in different middleware.
[0071] The current analysis technology of middleware also has other problems, for example, because the current middleware often does not have real-time scheduling and information filtering functions, the related middleware analysis program cannot analyze the software performance of the middleware with the above two functions.
[0072] Moreover, the related analysis technology has low automation, which further leads to low test efficiency in large-scale performance testing.
[0073] In order to solve the problems in the prior art, the embodiments of the present application provide a software middleware analysis method, device and electronic device.
[0074] The analysis method of the software middleware provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0075] Figure 1 A flowchart of the analysis method of the software middleware provided by an embodiment of the present application is shown.
[0076] Reference Figure 1 The analysis method of the software middleware of the embodiment of the present application is specifically applied to an analysis program, which is arranged in a process of an application program and can call relevant interfaces of middleware connected with the process.
[0077] The middleware to be tested sends and receives information through a publish-subscribe mode, and accordingly, the middleware is provided with a first publishing interface and a first subscribing interface and is connected with the process provided with the analysis program through the first publishing interface and the first subscribing interface. The middleware is used to access information from the process through the first publishing interface and transmit the information to the first subscribing interface through multiple forwarding levels of the middleware.
[0078] The method can specifically include the following steps S101 to S104.
[0079] S101, creating a sending thread and a receiving thread for controlling the middleware to transmit the information, and a processing thread for analyzing the information.
[0080] When information interaction between two threads is performed using the middleware, the information is transmitted through multiple forwarding levels in the middleware. The sending thread is used to instruct the middleware to send the information received by the sending thread using the first publishing interface. The receiving thread is used to instruct the middleware to receive the information using the first subscribing interface and obtain the interaction result from the middleware. The processing thread is used to analyze the interaction result, thereby obtaining the software performance of the middleware.
[0081] The interaction result can specifically include the information transmitted in the middleware and relevant interaction data of the information.
[0082] In one example, before starting the middleware to be tested, the analysis program can create the sending thread, the receiving thread and the processing thread described above.
[0083] Based on this, in the following test, the middleware can control the process of sending information by the middleware through the sending thread and the receiving thread, and perform performance analysis on the middleware through the processing thread.
[0084] S102, in response to starting the sending thread, calling the first publishing interface to create a first sending time stamp for the information, and transmitting the information and the first sending time stamp to the first subscribing interface.
[0085] The first sending timestamp specifically records a specific time when the middleware under test sends information to the first subscription interface using the first publishing interface.
[0086] In an example, based on the sending thread created in the foregoing steps, the sending thread can be started when the analysis program initiates the test on the middleware.
[0087] By executing the sending thread, the analysis program can call the first publishing interface of the middleware.
[0088] Further, the analysis program can input preset information to the middleware by calling the first publishing interface.
[0089] Further, after the information is accessed by the first publishing interface, the information can be sent in the middleware.
[0090] When the middleware starts to transmit the information, the analysis tool can create a first sending timestamp by calling the first publishing interface, and transmit the first sending timestamp and the information in the form of a structure to the first subscription interface.
[0091] S103, in response to starting the receiving thread, calling the information, the first sending timestamp and a plurality of first hierarchical time lengths from the first subscription interface, each first hierarchical time length representing a time length consumed when the information is transmitted at a corresponding forwarding level, and creating a first receiving timestamp for the information.
[0092] The first receiving timestamp specifically records a specific time when the middleware under test transmits the information to the first subscription interface.
[0093] In an example, the plurality of forwarding levels in the middleware can be, for example, a data distribution service (DDS) layer, a read-modify-write (RMW) layer, a radio link control (RCL) layer, a second generation robot programming framework (ROS2) layer, and a middleware improvement layer, etc., wherein the middleware improvement layer is a forwarding level obtained by improving the functions of ROS2 and / or DDS according to specific requirements.
[0094] When the information is sent in the middleware, the information is forwarded through each level in order and reaches the first subscription interface.
[0095] In one specific example, when sending information in the middleware, the order of forwarding the information in the middleware by each forwarding level can be, for example, first forwarded by the DDS layer to the RWM layer, then forwarded by the RWM layer to the RCL layer, then forwarded by the RCL layer to the ROS2 layer, then forwarded by the ROS2 layer to the improvement layer, and then forwarded by the improvement layer to the first subscription layer.
[0096] In this example, when each forwarding level forwards the information, a first level duration is added to the information.
[0097] In this example, when each forwarding level forwards the information, a first level duration is added to the information.
[0098] In a specific example, the information forwarded between each forwarding level can be tracked by a pre-set tracking tool or tracking plug-in program, and the first level duration is added to the information, and the information, the first sending timestamp, and each first level duration are formed into a structure.
[0099] In one example, each first level duration can be represented by a time length.
[0100] In another example, each first level duration can also be composed of a level receiving timestamp added by each forwarding level when receiving the information, and a level sending timestamp added by the forwarding level when sending the information.
[0101] Based on this, when the middleware sends information from the first publication interface to the first subscription interface, the information carries not only the first sending timestamp, but also the first level duration of each forwarding level.
[0102] In one example, based on the receiving thread created in the foregoing step, the analysis program can start the receiving thread in order to obtain the interaction result from the middleware.
[0103] By executing the receiving thread, the analysis program can call the first subscription interface of the middleware.
[0104] Further, the analysis program can create and mark a first receiving timestamp for the information when the middleware transmits the information to the first subscription interface by calling the first subscription interface.
[0105] Based on this, the analysis program can obtain the information transmitted by the middleware, the first sending timestamp of the information, the first forwarding duration of each forwarding level, and the first receiving timestamp created by the first subscription interface for the information by calling the first subscription interface after starting the receiving thread.
[0106] S104, in response to starting the processing thread, determining a difference between the first sending timestamp and the first receiving timestamp as a first transmission duration of the middleware transmitting the information, calculating an average duration of the first transmission duration consumed in the multiple forwarding levels, and determining a level with a first level duration greater than the average duration as a low-performance level.
[0107] In one example, based on the processing thread created in the foregoing steps, the analysis program can start the processing thread for analyzing the interaction result obtained from the processing middleware.
[0108] The interaction result can include, for example, the information transmitted by the middleware, the first sending timestamp annotated by the first publishing interface for the information, the first receiving timestamp annotated by the first subscription interface for the information, and the first level duration annotated by each forwarding level, and the information, the first sending timestamp, the first receiving timestamp, and each first level duration form a structure.
[0109] In one example, when the processing thread analyzes the interaction result, the difference between the first sending timestamp and the first receiving timestamp can be calculated.
[0110] The difference can be considered as the duration consumed by the middleware for single transmission of the information in this test, and is determined as the first transmission duration.
[0111] In one example, based on the first transmission duration determined in the foregoing and based on the number of forwarding levels in the middleware known in advance, the average duration of each forwarding level forwarding the information can be calculated, and the average duration is compared with the size of each level duration.
[0112] Further, after comparing the average duration with each first level duration, the forwarding level with the first level duration greater than the average duration can be determined, and it is considered that the duration consumed by the forwarding level for forwarding information is higher than that of other forwarding levels, that is, the forwarding level restricts the performance of the middleware as a whole, so that the forwarding level can be determined as a low-performance level.
[0113] Based on this, the embodiment creates a sending thread calling the first publishing interface and a receiving thread calling the first subscription interface based on the first publishing interface and the first subscription interface possessed by the middleware to be tested.
[0114] Thus, the analysis program can control the middleware through the receiving thread of the sending thread, so as to test the middleware.
[0115] The analysis program can cause the middleware to obtain the information to be transmitted from the first publishing interface by starting a sending thread, and cause the first publishing interface to add a first sending timestamp to the information when the first publishing interface starts to transmit the information.
[0116] Further, the analysis program can call the first subscribing interface by starting a receiving thread, so that the first subscribing interface can add a first receiving timestamp to the information when the first subscribing interface receives the information, and obtain the interaction result between the two threads from the first subscribing interface of the middleware.
[0117] Further, based on the created processing thread, the analysis program can calculate the transmission duration of the middleware for transmitting the information according to the first receiving timestamp and the first sending timestamp after obtaining the interaction result, so as to calculate the average duration consumed by each forwarding level, and then compare the average duration with the actual duration of each level to determine the low-performance forwarding level that restricts the overall performance of the middleware from each forwarding level.
[0118] In another embodiment of the present application, the middleware can also be configured with parameters and interfaces before the analysis program creates the sending thread, the receiving thread and the processing thread.
[0119] The middleware can include a filter for filtering the information.
[0120] In an example, the parameters of the middleware can include, for example, the communication protocol of DDS for transmitting information in the middleware, the test duration, the sending rate of the middleware for transmitting information, and the parameters of the filter.
[0121] The test duration is used to control the continuous message transmission of the middleware. After the middleware completes the transmission of information once, if the test duration has not been reached, the next information transmission is continued, and if the test duration has been reached, the next information transmission is not performed.
[0122] The sending rate is used to control the speed of information transmission. For example, the middleware can transmit 1, 5, 10 or 1000 pieces of information at a time when transmitting information each time.
[0123] The interface configuration for the middleware can be, for example, configuring the middleware with at least two interfaces, i.e., at least one first publishing interface and one first subscribing interface.
[0124] Accordingly, the first end and the second end can be determined from the multiple interfaces configured for the middleware.
[0125] The first end is the starting point of the information transmission in the middleware and is used to send the information, and the second end is the end point of the actual transmission of the information by the middleware.
[0126] In the actual transmission of the information, the second end is the end of the transmission of the information. In the test of the middleware, the second end is not the end of the transmission of the information, and the second end is used to forward the information to the process from which the information is sent.
[0127] On the other hand, when the middleware transmits information within the same process, the second end is the end of the transmission of the information in the test of the middleware and in the actual transmission of the information by the middleware.
[0128] In another example, the parameter configuration for the middleware can also include, for example, setting the format of the output information; when the middleware can implement the functions of different types of middleware, the middleware can be set to run in different functions according to the function of the middleware to be tested, for example, to run in the function of the improved layer, to run in the function of the ROS2 layer, or to run in the function of the DDS layer; and the communication behavior between the first publishing interface and the first subscribing interface of the middleware can be set according to the different functions of the middleware.
[0129] Based on this, by configuring the test duration for the middleware, the middleware can be caused to continuously transmit information until the test duration is reached, so that the analysis program can analyze the continuously output interactive results of the middleware, thereby realizing the automatic testing of multiple interactive results of the middleware.
[0130] On the other hand, based on different test environments, that is, when the middleware transmits information between two threads in the same process or different processes, different test strategies can be set according to different test environments, that is, different numbers of interfaces, corresponding first ends and second ends are set, so as to realize the testing in different use scenarios.
[0131] In another embodiment of the present application, when the interfaces of the middleware are created and the first end and the second end are configured, different numbers of interfaces can be created for the middleware according to different use scenarios of the middleware, and the corresponding first end and the second end are configured.
[0132] In one example, when the middleware is used to transmit information between two different threads in the same process belonging to the same operating system, two interfaces, that is, a first publishing interface and a first subscribing interface, can be created for the middleware.
[0133] The middleware is connected with the process through two interfaces, that is, connected with one of the two threads through the first publishing interface and connected with the other thread through the first subscribing interface.
[0134] Further, the first publishing interface is set as a first end and a starting point of the information transmission in the middleware, and is used for sending the information in the middleware; and the first subscribing interface is set as a second end and a terminal point of the information transmission in the middleware, and is used for receiving the information and outputting the interaction result of the information to the analysis program.
[0135] In one specific example, as shown in FIG. 1, a process 1 is running in an operating system 1, and an analysis program is set in the process 1. When information transmission is performed for two threads in the process 1, a first Pub interface, that is, a first publishing interface, and a first Sub interface, that is, a first subscribing interface, can be created for the middleware. Figure 2
[0136] The first Pub interface is set as the first end, and the first Sub interface is set as the second end.
[0137] Accordingly, the analysis program can send the information to be transmitted to the middleware through the first Pub interface by calling the first Pub interface, and the information is sent by the first Pub interface as the first end, and is transmitted to the second end through each forwarding level of the middleware until the information is transmitted.
[0138] Further, the analysis program can obtain the interaction result of the information interaction between the two threads by the middleware by calling the first Sub interface.
[0139] Based on this, the analysis program can test the information transmission of the middleware in the process by creating two interfaces and setting them as the first end and the second end, respectively.
[0140] In another embodiment of the present application, when the interfaces for the middleware are created and the first end and the second end are configured, different numbers of interfaces can be created for the middleware according to different use scenarios of the middleware, and the corresponding first end and second end are configured.
[0141] In one example, when the middleware is used to perform information transmission between two different threads belonging to two different processes of the same operating system, the middleware can be created with a first publishing interface, a first subscribing interface, a second publishing interface and a second subscribing interface.
[0142] The middleware is connected with one process through the first publishing interface and the first subscribing interface, and is connected with the other process through the second publishing interface and the second subscribing interface.
[0143] The first publishing interface is used to obtain information from a process and send it to the second subscription interface, which is forwarded to the second publishing interface. The second publishing interface then forwards the information back to the first subscription interface connected to the previous process.
[0144] In an example, an interface having both subscription and publication functions may be used to replace the second publication interface and the second subscription interface.
[0145] Furthermore, the first publishing interface is set as the first end and serves as the starting point for information transmission within the middleware, and is used to send information within the middleware. The second subscription interface and the second publishing interface form the second end and serve as the end point for the information transmission within the middleware, and are used to receive the information and forward the information back to the process that sent the information.
[0146] Furthermore, when the information is forwarded back to the process that sent the information, the first subscription interface of the process receives the information and outputs the interaction result of the information to the analysis program.
[0147] In a specific example, Figure 3 As shown, process 1 and process 2 are run in operating system 1, and the analysis program is set in process 1. When information is transmitted between the two threads of process 1 and process 2, a first Pub interface connected to process 1 can be created for the middleware, that is, a first publishing interface, and a first Sub interface, that is, a first subscription interface, and a Pub&Sub interface connected to process 2 can be created. The Pub&Sub interface has both publishing and subscribing functions, and can be used to receive information sent by the first Pub interface and forward it back to the first Sub interface.
[0148] The first Pub interface is set as the first end, and the Pub&Sub interface is set as the second end.
[0149] Accordingly, the analysis program can call the first Pub interface to send the information to be transmitted to the middleware through the first Pub interface, and start sending information from the first Pub interface as the first end, and transmit the information to the second end through the various forwarding levels of the middleware.
[0150] Furthermore, in order for the analysis program set in process 1 to obtain the interaction result, the second end forwards the information back to the first Sub interface of process 1.
[0151] Furthermore, the analysis program may obtain from the middleware an interaction result of the middleware performing information interaction between the two threads by calling the first Sub interface.
[0152] Based on this, the analysis program can implement the test of the middleware when transmitting information between processes by creating interfaces in two different processes and setting them as the first end and the second end respectively.
[0153] In another embodiment of the present application, when creating an interface for the middleware and configuring the first end and the second end, different numbers of interfaces can be created for it and the corresponding first end and second end can be configured according to different usage scenarios of the middleware.
[0154] In one example, when middleware is used to transmit information between two different threads of two different processes belonging to different operating systems, a first publishing interface, a first subscribing interface, a second publishing interface, and a second subscribing interface may be created for the middleware.
[0155] The middleware is connected to a process of one operating system through a first publishing interface and a first subscription interface, and is connected to a process of another operating system through a second publishing interface and a second subscription interface.
[0156] The first publishing interface is used to obtain information from a process and send it to the second subscription interface, which is forwarded to the second publishing interface. The second publishing interface then forwards the information back to the first subscription interface connected to the previous process.
[0157] In an example, an interface having both subscription and publication functions may be used to replace the second publication interface and the second subscription interface.
[0158] Furthermore, the first publishing interface is set as the first end and serves as the starting point for information transmission within the middleware, and is used to send information within the middleware. The second subscription interface and the second publishing interface form the second end and serve as the end point for the information transmission within the middleware, and are used to receive the information and forward the information back to the process that sent the information.
[0159] Furthermore, when the information is forwarded back to the process that sent the information, the first subscription interface of the process receives the information and outputs the interaction result of the information to the analysis program.
[0160] In a specific example, Figure 4 As shown, process 1 is run in operating system 1, process 2 is run in operating system 2, and the analysis program is set in process 1. When information is transmitted between the two threads of process 1 and process 2, a first Pub interface connected to process 1 can be created for the middleware, that is, a first publishing interface, and a first Sub interface, that is, a first subscription interface, and a Pub&Sub interface connected to process 2 can be created. The Pub&Sub interface has both publishing and subscribing functions, and can be used to receive information sent by the first Pub interface and forward it back to the first Sub interface.
[0161] The first Pub interface is set as a first end, and the Pub & Sub interface is set as a second end.
[0162] Accordingly, the analysis program can send the information to be transmitted to the middleware through the first Pub interface by calling the first Pub interface, and the information is transmitted to the second end through each forwarding level of the middleware by starting to send the information from the first Pub interface as the first end.
[0163] Further, in order for the analysis program set in the process 1 to obtain the interaction result, the second end forwards the information back to the first Sub interface of the process 1.
[0164] Further, the analysis program can obtain the interaction result of the information interaction between the two threads by the middleware by calling the first Sub interface to obtain the interaction result from the middleware.
[0165] Based on this, the analysis program can create interfaces in processes belonging to two different operating systems respectively, and set them as the first end and the second end respectively, to realize the test of the middleware when transmitting information between processes.
[0166] In another embodiment of the present application, after determining the difference between the first sending timestamp and the first receiving timestamp as the first transmission duration of the information transmitted by the middleware, whether to continue transmitting the information can also be determined according to the test duration set in the foregoing embodiment based on the test duration. When the duration consumed in the test process of the middleware does not reach the test duration, the test of the middleware continues.
[0167] In one example, after determining the first transmission duration, it is judged whether the duration consumed in the test of the middleware is greater than or equal to the test duration. When it is less than the test duration, the sending thread created in the foregoing embodiment is started, so that the first Pub interface is called to create a second sending timestamp for the information, and the information and the second sending timestamp are transmitted to the first Sub interface.
[0168] Further, when the middleware transmits the information to the first Sub interface, the receiving thread is started.
[0169] In response to starting the receiving thread, the information, the second sending timestamp and a plurality of second level durations are called from the first Sub interface, each second level duration representing a duration consumed when transmitting the information through a corresponding forwarding level, and a second receiving timestamp is created for the information.
[0170] The information, the second sending timestamp, the second receiving timestamp and each second level duration can be constructed into an interaction result in the form of a structure.
[0171] Further, after the interaction result is acquired, the processing thread can be started.
[0172] In response to starting the processing thread, a difference between the second sending timestamp and the second receiving timestamp is determined as a second transmission duration of the middleware passing information, a transmission average of the first transmission duration and the second transmission duration is calculated, an average duration consumed by the transmission average in the multiple forwarding levels is calculated, and a level average of the first level duration and the second level duration is calculated, and a level whose level average is greater than the average duration is determined as a low-performance level.
[0173] In one specific example, based on the determined second transmission duration, an average of the first transmission duration and the second transmission duration can be calculated and used as the transmission average.
[0174] In another example, if in addition to the first transmission duration and the second transmission duration, multiple transmission durations such as a third transmission duration, a fourth transmission duration, and a fifth transmission duration are acquired due to multiple transmissions of the middleware when the test duration is reached, the variance or mean square deviation of each transmission duration can be calculated and used as the transmission average when the test duration is reached.
[0175] In one example, for each forwarding level, an average of the first level duration and the second level duration of the forwarding level can be calculated and used as the level average of the forwarding level.
[0176] In one example, for each forwarding level, an average of the first level duration and the second level duration of the forwarding level can be calculated and used as the level average of the forwarding level.
[0177] Accordingly, based on the set test duration, the middleware can be caused to continuously transmit information until the test duration is reached after the first transmission duration is acquired, so that continuous automatic testing of the middleware can be realized.
[0178] In another embodiment of the present application, after the processing thread is started, the middleware can also be analyzed for performance problems based on the received information.
[0179] The information acquired by the analysis program from the middleware can include multiple information data, each information data being provided with a corresponding sequence identifier.
[0180] In one example, after each information data and the corresponding sequence identifier are acquired, each sequence identifier can be identified.
[0181] Further, after identifying each sequence identifier, it can be determined whether the sequence of each sequence identifier is out of order.
[0182] Further, in the case that any sequence identifier is out of order, it can be considered that the sequence of the corresponding information data is also out of order, and accordingly, it can be considered that the middleware has performance problems when transmitting information.
[0183] In a specific example, if there are 10 pieces of information data in the information, each corresponding sequence identifier is set, and arranged in the order of identifier 1, identifier 2, identifier 3, identifier 4, identifier 5, identifier 6, identifier 7, identifier 8, identifier 9, and identifier 10.
[0184] In this example, if any sequence identifier is out of order, for example, the sequence identifiers of the 10 pieces of information data are arranged in the order of identifier 1, identifier 2, identifier 3, identifier 5, identifier 4, identifier 6, identifier 7, identifier 8, identifier 9, and identifier 10, it is considered that the information data corresponding to identifier 5 and identifier 4 is out of order, and it can be considered that the middleware has performance problems.
[0185] Based on this, the overall performance of the middleware when transmitting multiple pieces of information data can be evaluated by determining whether the sequence identifier is out of order based on the preset sequence identifier.
[0186] In another embodiment of the present application, after starting the processing thread, the middleware can also be analyzed for performance problems based on the received information.
[0187] The information obtained by the analysis program from the middleware can include multiple pieces of information data, each piece of information data being provided with a corresponding sequence identifier.
[0188] In an example, after obtaining each piece of information data and the corresponding sequence identifier, each sequence identifier can be identified.
[0189] Further, after identifying each sequence identifier, it can be determined whether the sequence of each sequence identifier is out of order.
[0190] Further, in the case that any sequence identifier is out of order, it can be considered that the sequence of the corresponding information data is also out of order, and accordingly, it can be considered that the middleware has performance problems when transmitting information.
[0191] In a specific example, if there are 11 pieces of information data in the information, each corresponding sequence identifier is set, and arranged in the order of identifier 1, identifier 2, identifier 3, identifier 4, identifier 5, identifier 6, identifier 7, identifier 8, identifier 9, identifier 10, and identifier 11.
[0192] In this example, if any order identifier is missing, for example, 10 pieces of information data are obtained: identifier 1, identifier 2, identifier 3, identifier 5, identifier 4, identifier 6, identifier 7, identifier 8, identifier 9 and identifier 11, it is considered that the information data corresponding to identifier 104 is missing, and it can be considered that the middleware has performance problems.
[0193] Based on this, the overall performance of the middleware when transmitting multiple pieces of information data can be evaluated by judging whether the order identifier is missing based on the pre-set order identifier.
[0194] Based on the same inventive concept, the embodiments of the present application also provide an analysis device of software middleware corresponding to the method of any of the above embodiments.
[0195] Reference Figure 5 The analysis device of software middleware comprises:
[0196] A creating module 501 is configured to create a sending thread and a receiving thread for controlling the middleware to transmit information, and a processing thread for analyzing the information;
[0197] A sending module 502 is configured to, in response to starting the sending thread, call a first publishing interface to create a first sending timestamp for the information, and transmit the information and the first sending timestamp to a first subscribing interface;
[0198] A receiving module 503 is configured to, in response to starting the receiving thread, call the information, the first sending timestamp and a plurality of first hierarchical time lengths from the first subscribing interface, each first hierarchical time length representing a time length consumed when the information is transmitted at a corresponding forwarding level, and create a first receiving timestamp for the information;
[0199] A processing module 504 is configured to, in response to starting the processing thread, determine a first transmission time length of the middleware to transmit the information as a difference between the first sending timestamp and the first receiving timestamp, calculate an average time length consumed by the first transmission time length in a plurality of forwarding levels, and determine a level with a first hierarchical time length greater than the average time length as a low-performance level.
[0200] In one embodiment, the middleware comprises a filter, and the creating module 501 is specifically configured to:
[0201] Before creating the sending thread and the receiving thread for controlling the middleware to transmit the information, and the processing thread for analyzing the information, the following is performed:
[0202] A communication protocol, a test time length, a sending rate and a filter are configured for the middleware;
[0203] The creating module 501 creates at least two interfaces for the middleware, and determines a first end and a second end from the at least two interfaces, the first end is used to send information when the middleware transmits information, and the second end is used to receive or forward information when the middleware transmits information.
[0204] The creating module 501 creates at least two interfaces for the middleware, and determines a first end and a second end from the at least two interfaces, and specifically:
[0205] In a case where the middleware is used to transmit information in a same process of a same operating system, the creating module 501 creates a first publishing interface and a first subscribing interface connected to the same process for the middleware;
[0206] The creating module 501 determines the first publishing interface as the first end, and determines the first subscribing interface as the second end.
[0207] Further, the creating module 501 creates at least two interfaces for the middleware, and determines a first end and a second end from the at least two interfaces, and specifically:
[0208] In a case where the middleware is used to transmit information between a first process and a second process of a same operating system, the creating module 501 creates a first publishing interface and a first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process for the middleware;
[0209] The creating module 501 determines the first publishing interface as the first end, and determines the second publishing interface and the second subscribing interface as the second end.
[0210] Further, the creating module 501 creates at least two interfaces for the middleware, and determines a first end and a second end from the at least two interfaces, and specifically:
[0211] In a case where the middleware is used to transmit information between a first process and a second process of different operating systems, the creating module 501 creates a first publishing interface and a first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process for the middleware;
[0212] The creating module 501 determines the first publishing interface as the first end, and determines the second publishing interface and the second subscribing interface as the second end.
[0213] In an embodiment, the processing module 504 is specifically configured to:
[0214] After determining the difference between the first sending timestamp and the first receiving timestamp as the first transmission duration of the middleware transmitting information, the processing module 504 is further configured to:
[0215] determine whether the test on the middleware reaches a test duration;
[0216] In the case that the test duration is not reached, the processing module 504 starts the sending thread, in response to starting the sending thread, the sending module 502 calls the first publishing interface to create a second sending timestamp for the information, and transmits the information and the second sending timestamp to the first subscribing interface;
[0217] The processing module 504 starts the receiving thread, in response to starting the receiving thread, the receiving module 503 calls the information, the second sending timestamp and a plurality of second hierarchical durations from the first subscribing interface, each second hierarchical duration represents a duration consumed when the corresponding forwarding level transmits the information, and creates a second receiving timestamp for the information;
[0218] In response to starting the processing thread, the processing module 504 determines the difference between the second sending timestamp and the second receiving timestamp as a second transmission duration of the middleware transmitting the information, calculates a transmission average of the first transmission duration and the second transmission duration, calculates an average duration consumed by the transmission average in the plurality of forwarding levels, and calculates a hierarchical average of each first hierarchical duration and second hierarchical duration, and determines the level whose hierarchical average is greater than the average duration as a low-performance level.
[0219] The information includes a plurality of information data and a sequence identifier of each information data.
[0220] The processing module 504 can further execute the following after responding to starting the processing thread:
[0221] Identify the sequence identifier of each information data;
[0222] Determine whether the order of each sequence identifier is out of order;
[0223] In the case that the order of each sequence identifier is out of order, it is determined that the order of each information data in the information is out of order, and the middleware is determined to have a performance problem.
[0224] The processing module 504 can further execute the following after responding to starting the processing thread:
[0225] Identify the sequence identifier of each information data;
[0226] Determine whether the sequence identifier is missing;
[0227] In the case that the sequence identifier is missing, it is determined that the information data is missing in the information, and the middleware is determined to have a performance problem.
[0228] For the convenience of description, the above device is described as various modules respectively described in function. Of course, in the implementation of the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0229] The apparatus of the above embodiments is used to implement the analysis method of the corresponding software middleware in any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiments, which are not repeated here.
[0230] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the embodiments of the present application also provide an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the analysis method of the software middleware of any of the above embodiments when executing the program.
[0231] Figure 6 A hardware structure schematic diagram of an electronic device provided by the embodiments of the present application is shown.
[0232] The electronic device can include a processor 601 and a memory 602 storing computer program instructions.
[0233] Specifically, the processor 601 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement the embodiments of the present application.
[0234] The memory 602 can include a mass storage for data or instructions. By way of example and not limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 can include removable or non-removable (or fixed) media. Where appropriate, the memory 602 can be internal or external to the electronic device. In certain embodiments, the memory 602 is a non-volatile solid-state memory.
[0235] The memory 602 can include read-only memory (ROM), random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software that includes computer-executable instructions that, when executed (e.g., by one or more processors), are operable to perform the operations described with reference to the methods according to an aspect of the present disclosure.
[0236] The processor 601 implements the analysis method of any one of the software middlewares in the above-described embodiments by reading and executing computer program instructions stored in the memory 602.
[0237] In one example, the electronic device can further include a communication interface 603 and a bus 610. As shown, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and complete communication with each other. Figure 6
[0238] The communication interface 603 is mainly used to realize the communication between the modules, devices, units and / or equipment in the embodiments of the present application.
[0239] The bus 610 includes hardware, software or both to couple components of the electronic device to each other. By way of example, and without limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, the bus 610 can include one or more buses. Although the present embodiments describe and show a particular bus, the present application contemplates any suitable bus or interconnect.
[0240] The electronic device can execute the analysis method of the software middleware in the embodiments of the present application based on the set first publishing interface and first subscribing interface by starting a sending thread, a receiving thread and a processing thread, thereby realizing Figure 1 the analysis method of the software middleware described above.
[0241] In addition, in combination with the analysis method of the software middleware in the above-described embodiments, the embodiments of the present application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by the processor to implement the analysis method of any one of the software middlewares in the above-described embodiments.
[0242] The embodiment of the present application further provides a computer program product comprising a computer program, which, when executed by a processor, implements the analysis method of any one of the software middlewares in the above embodiment.
[0243] It should be noted that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, the detailed descriptions of known methods are omitted herein. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.
[0244] The functional blocks shown in the structural block diagrams described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine readable medium" can include any medium capable of storing or transmitting information. Examples of the machine readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.
[0245] Based on the same inventive concept, the present application further provides a vehicle comprising the analysis device of the software middleware of any one of the above embodiments and / or the electronic device executing the analysis method of the software middleware according to any one of the above embodiments.
[0246] It should be further noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be executed simultaneously.
[0247] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0248] The above only is a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.
Claims
1. A method for analyzing software middleware, characterized in that: The middleware is provided with a first publishing interface and a first subscription interface, for accessing information through the first publishing interface and transmitting the information to the first subscription interface through multiple forwarding levels of the middleware; the method includes: Creating a sending thread and a receiving thread for controlling the middleware to transmit the information, and a processing thread for analyzing the information; In response to starting the sending thread, calling the first publishing interface to create a first sending timestamp for the information, and transmitting the information and the first sending timestamp to the first subscription interface; In response to starting the receiving thread, retrieving the information, the first sending timestamp, and a plurality of first-level durations from the first subscription interface, each first-level duration representing a duration consumed when a corresponding forwarding level transmits the information, and creating a first receiving timestamp for the information; In response to starting the processing thread, the difference between the first sending timestamp and the first receiving timestamp is determined as the first transmission duration for the middleware to transmit the information, the average duration consumed by the first transmission duration in the multiple forwarding levels is calculated, and the level whose first level duration is greater than the average duration is determined as a low-performance level.
2. The software middleware analysis method according to claim 1, characterized in that: The middleware includes a filter; before creating a sending thread and a receiving thread for controlling the middleware to transmit the information, and a processing thread for analyzing the information, the method further includes: Configuring a communication protocol, a test duration, a sending rate and the filter for the middleware; At least two interfaces are created for the middleware, and a first end and a second end are determined from the at least two interfaces, wherein the first end is used to send the information when the information is transmitted within the middleware, and the second end is used to receive or forward the information when the information is transmitted within the middleware.
3. The software middleware analysis method according to claim 2, characterized in that: The step of creating at least two interfaces for the middleware and determining a first end and a second end from the at least two interfaces includes: In a case where the middleware is used to transmit the information within the same process of the same preset operating system, creating the first publishing interface and the first subscribing interface connected to the same process for the middleware; The first publishing interface is determined as the first end, and the first subscription interface is determined as the second end.
4. The software middleware analysis method according to claim 2, characterized in that: The step of creating at least two interfaces for the middleware and determining a first end and a second end from the at least two interfaces further includes: In a case where the middleware is used to transmit the information between a first process and a second process of the same operating system, creating, for the middleware, the first publishing interface and the first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process; The first publishing interface is determined as the first end, and the second publishing interface and the second subscription interface are combined into the second end.
5. The software middleware analysis method according to claim 2, characterized in that: The step of creating at least two interfaces for the middleware and determining a first end and a second end from the at least two interfaces further includes: In a case where the middleware is used to transmit the information between a first process and a second process of different operating systems, creating, for the middleware, the first publishing interface and the first subscribing interface connected to the first process, and a second publishing interface and a second subscribing interface connected to the second process; The first publishing interface is determined as the first end, and the second publishing interface and the second subscription interface are combined into the second end.
6. The software middleware analysis method according to claim 2, characterized in that: After determining the difference between the first sending timestamp and the first receiving timestamp as a first transmission duration for the middleware to transmit the information, the method further includes: Determining whether the test of the middleware reaches the test duration; If the test duration has not been reached, starting the sending thread, calling the first publishing interface to create a second sending timestamp for the information, and transmitting the information and the second sending timestamp to the first subscription interface; In response to starting the receiving thread, retrieving the information, the second sending timestamp, and a plurality of second-level durations from the first subscription interface, each second-level duration representing a duration consumed when a corresponding forwarding level transmits the information, and creating a second receiving timestamp for the information; In response to starting the processing thread, the difference between the second sending timestamp and the second receiving timestamp is determined as the second transmission duration for the middleware to transmit the information, the transmission mean of the first transmission duration and the second transmission duration is calculated, the average duration consumed by the transmission mean in the multiple forwarding levels is calculated, and the level mean of each first-level duration and second-level duration is calculated, and the level whose level mean is greater than the average duration is determined as a low-performance level.
7. The software middleware analysis method according to claim 1, characterized in that: The information includes a plurality of information data and a sequence identifier of each information data; after the response to starting the processing thread, the method further includes: Identify the sequence of each piece of information data; Determine whether the order of each sequence identifier is disordered; In the case that the order of the sequence identifiers is out of order, it is determined that the order of the pieces of information data in the information is out of order, and the middleware is determined to have a performance problem.
8. The software middleware analysis method according to claim 1, characterized in that: The information includes multiple pieces of information data and a sequence identifier of each piece of information data; After the response to starting the processing thread, the method further includes: Identify the sequence of each piece of information data; Determine whether each sequence identifier is missing; In the case where the sequence identifier is missing, it is determined that information data is missing from the information, and the middleware is determined to have a performance problem.
9. A software middleware analysis device, characterized in that: The device comprises: A creation module, configured to create a sending thread and a receiving thread for controlling the middleware to transmit information, and a processing thread for analyzing the information; a sending module, configured to, in response to starting the sending thread, call a first publishing interface to create a first sending timestamp for the information, and transmit the information and the first sending timestamp to a first subscription interface; a receiving module, configured to, in response to starting the receiving thread, retrieve the information, the first sending timestamp, and a plurality of first-level durations from the first subscription interface, each first-level duration representing a duration consumed when a corresponding forwarding level transmits the information, and create a first receiving timestamp for the information; A processing module is used to, in response to starting the processing thread, determine the difference between the first sending timestamp and the first receiving timestamp as the first transmission duration for the middleware to transmit the information, calculate the average duration consumed by the first transmission duration in the multiple forwarding levels, and determine the level whose first level duration is greater than the average duration as a low-performance level.
10. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the software middleware analysis method according to any one of claims 1 to 8 is implemented.