Message bus system management method and device, equipment and storage medium

By obtaining the input character in the management bus system management and determining the matching level according to its format, extracting or completing the target parameters, the problems of management errors in existing technologies have been solved, and efficient and accurate message bus system management has been achieved.

CN119376983AActive Publication Date: 2025-01-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411537463.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-28
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

In the prior art, when managing the message bus system through command line tools, it is necessary to manually input accurate commands, which easily leads to errors and cannot achieve effective management.

Method used

By obtaining the input character, determine the minimum level as the matching level according to its format. If the matching level is the storage layer of the tree structure, the target parameter is extracted; if it is the parameter layer, the input character is used to obtain the target parameters. The corresponding relationship of the tree structure level determines the target storage layer of the target parameter, and fills the complete command based on the data to manage the message bus system.

Benefits of technology

The efficiency and accuracy of the management of the message bus system is improved. By directly querying the tree structure of the message bus system, the speed of command completion is increased, and the possibility of input error is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376983A_ABST
    Figure CN119376983A_ABST
Patent Text Reader

Abstract

The invention discloses a message bus system management method and device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring an input character, and determining the lowest level corresponding to the input character as a matching level according to the format of the input character; the tree structure is used for storing data of the message bus system; if the matching hierarchy is a storage layer of a tree structure, extracting a target parameter from a parameter layer field in the input character according to the format of the input character; the parameter field represents a method function; if the matching level is a parameter layer, determining a matching parameter corresponding to the input character, and complementing the input character based on the matching parameter to obtain a target parameter; determining a target storage layer corresponding to the parameter field by querying a corresponding relationship between a method function and a tree structure hierarchy; and based on the data of the target storage layer, filling the input characters to obtain a complete command, and managing the message bus system by using the complete command. The management efficiency and accuracy of the message bus system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a message bus system management method, device, equipment and storage medium. Background Art

[0002] D-BUS (a message bus system) is used for communication between different processes on the same computer. It supports low-latency, low-overhead, high-availability inter-process communication (IPC) mechanism, and supports object and method calls.

[0003] In the related art, the message bus system is managed through a command line tool, through which the services, interfaces and object paths in the message bus system can be viewed, as well as method calls and signal monitoring can be performed. However, it is necessary to manually enter precise commands in the command line tool, such as the services, interfaces and object paths to be called, etc. Manual input is prone to errors and cannot achieve effective management of the message bus system. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a message bus system management method, device, equipment and storage medium, which can improve the efficiency and accuracy of message bus system management. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a message bus system management method, comprising:

[0006] Obtaining an input character, and determining the lowest level corresponding to the input character according to the format of the input character as a matching level; the matching level includes a parameter level and each storage level of a tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system;

[0007] If the matching level is the storage layer of the tree structure, extracting the target parameter from the parameter layer field in the input character according to the format of the input character; the parameter field is used to represent the method function;

[0008] If the matching level is the parameter level, determining a matching parameter corresponding to the input character, and completing the input character based on the matching parameter to obtain the target parameter;

[0009] Determine the target storage layer corresponding to the target parameter by querying the corresponding relationship between the method function and the tree structure level;

[0010] Based on the data of the target storage layer, the input characters are filled to obtain a complete command, so as to manage the message bus system by using the complete command.

[0011] Optionally, determining the lowest level corresponding to the input character according to the format of the input character includes:

[0012] The lowest level corresponding to the input character is determined according to the number of spaces contained in the input character; the input characters use spaces to separate different levels, and the input characters are from high level to low level.

[0013] Optionally, before filling the input characters to obtain a complete command based on the data of the target storage layer, the method further includes:

[0014] comparing the matching level with the target storage tier;

[0015] If the matching level is higher than the target storage level, an alarm is generated;

[0016] If the matching level is lower than or equal to the target storage layer, the operation of filling the input characters based on the data of the target storage layer to obtain a complete command is performed.

[0017] Optionally, determining a matching parameter corresponding to the input character includes:

[0018] Turn off the case matching function, and obtain the matching parameters corresponding to the input characters based on sample matching;

[0019] Enable case matching.

[0020] Optionally, filling the input characters based on the data of the target storage layer to obtain a complete command includes:

[0021] Obtain a filter list set by a user; the filter list includes one or more filter items;

[0022] Filtering the data of the target storage layer using the filter list to obtain filtered data;

[0023] The input characters are filled with the filtered data to obtain a complete command.

[0024] Optionally, the message bus system management method further includes:

[0025] Obtain historical query records, and count the popularity values ​​of different query commands according to the historical query records;

[0026] Filter out query commands with a value less than a preset value threshold according to the value of heat as the filter items;

[0027] The filter list is generated based on all filter items.

[0028] Optionally, determining a matching parameter corresponding to the input character, and completing the input character based on the matching parameter to obtain the target parameter includes:

[0029] Extracting some characters belonging to the parameter layer field from the input characters;

[0030] Compare the partial characters with standard parameters; the standard parameters are all types of parameters included in the parameter layer;

[0031] Filtering out a first target standard parameter matching the partial character from all the standard parameters;

[0032] adding the first target standard parameter to the associative array;

[0033] Comparing the partial characters with a custom parameter; the custom parameter is a parameter abbreviation preset for a standard parameter;

[0034] Filtering out a target custom parameter matching the partial characters from all the custom parameters;

[0035] Querying the mapping relationship between the preset standard parameters and the custom parameters, and determining the second target standard parameters corresponding to the target custom parameters;

[0036] adding the second target standard parameter to the associative array;

[0037] Obtaining matching parameters corresponding to the input characters based on the associative array, and displaying the matching parameters;

[0038] According to the selection instruction for the target matching parameter, the target matching parameter is used to complete the partial characters to obtain the target parameter.

[0039] In a second aspect, the present application discloses a message bus system management device, comprising:

[0040] A matching level determination module, used to obtain an input character, and determine the lowest level corresponding to the input character according to the format of the input character as a matching level; the matching level includes a parameter level and each storage level of a tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system;

[0041] a target parameter extraction module, configured to extract target parameters from a parameter layer field in the input character according to a format of the input character if the matching level is a storage layer of the tree structure; the parameter field is used to characterize a method function;

[0042] a target parameter completion module, configured to determine the matching parameters corresponding to the input characters if the matching level is the parameter level, and complete the input characters based on the matching parameters to obtain the target parameters;

[0043] A target storage layer determination module, used to determine the target storage layer corresponding to the target parameter by querying the corresponding relationship between the method function and the tree structure level;

[0044] A command filling module is used to fill the input characters based on the data of the target storage layer to obtain a complete command, so as to manage the message bus system by using the complete command.

[0045] In a third aspect, the present application discloses an electronic device, comprising:

[0046] Memory, used to store computer programs;

[0047] The processor is used to execute the computer program to implement the aforementioned message bus system management method.

[0048] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned message bus system management method when executed by a processor.

[0049] In the present application, an input character is obtained, and the lowest level corresponding to the input character is determined according to the format of the input character as a matching level; the matching level includes a parameter level and each storage level of a tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system; if the matching level is the storage level of the tree structure, the target parameter is extracted from the parameter level field in the input character according to the format of the input character; the parameter field is used to characterize a method function; if the matching level is the parameter level, the matching parameter corresponding to the input character is determined, and the input character is completed based on the matching parameter to obtain the target parameter; the target storage level corresponding to the target parameter is determined by querying the correspondence between the method function and the tree structure level; based on the data of the target storage level, the input character is filled to obtain a complete command, so as to manage the message bus system using the complete command. Since the fields in the command follow a hierarchical order and the command needs to follow a certain format, the input characters are obtained and the lowest level to which the input characters can correspond is determined as a matching layer according to the format; if the matching level is the storage layer of the message bus system, it indicates that the input characters already contain parameter layer fields, which represent method functions, and the storage layer corresponding to the method functions of the parameter layer fields is directly determined at this time; if the matching level is the parameter layer, it indicates that the current input characters are only input to the parameter layer, and the parameter layer input is incomplete, so the parameter layer fields need to be completed to obtain the target parameters; the corresponding relationship between the method function and the tree structure level is queried to determine the target storage layer corresponding to the target parameter, and based on the data of the target storage layer, the input characters are filled to obtain a complete command, so that the message bus system can be managed using the complete command. Through command completion, the efficiency and accuracy of message bus system management are improved, and by directly querying the tree structure of the message bus system, the speed of command completion is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0051] FIG1 is a flow chart of a message bus system management method provided by the present application;

[0052] Figure 2 A specific parameter layer field completion method flow chart provided in this application;

[0053] Figure 3 A specific flow chart of a message bus system management method provided by this application;

[0054] Figure 4 A specific command completion method flow chart provided for this application;

[0055] Figure 5 A schematic diagram of a specific configuration file deployment structure provided for this application;

[0056] FIG6 is a schematic diagram of the structure of a message bus system management device provided by the present application;

[0057] FIG. 7 is a structural diagram of an electronic device provided in the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] In the related art, the message bus system is managed through a command line tool (busctl), through which the services, interfaces and object paths in the message bus system can be viewed, as well as method calls and signal monitoring can be performed. Although busctl is a powerful command line tool, it still has some defects when used; for example, the exact names of services, interfaces and object paths must be remembered when using it, and manual input may lead to errors; and, for complex D-Bus messages and calls, commands and parameters need to be correctly combined; there is also the problem of slow queries, especially when a large number of services are running on the system, which may affect the efficiency of development and debugging. In order to overcome the above technical problems, the present application proposes a message bus system management method that can improve the efficiency and accuracy of message bus system management.

[0060] The present application embodiment discloses a message bus system management method. Referring to FIG1 , the method may include the following steps:

[0061] Step S11: Obtain input characters, and determine the lowest level corresponding to the input characters according to the format of the input characters as a matching level; the matching level includes a parameter level and storage levels of a tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system.

[0062] In this embodiment, the characters input by the user are first obtained. It is understandable that the user should enter a complete command. However, due to the accuracy requirements of the input command, in order to avoid management failure caused by input errors, this embodiment directly completes the current input content during the user input process. Since the fields in the command are in a hierarchical order, that is, the command line tool field (busctl) is the first to call the tool, then the parameter (param) layer, and the storage layers of the tree structure corresponding to the message bus system, the storage layers are in order from high to low: SERVICE, OBJECT, INTERFACE, METHOD, SIGNATURE, and the hierarchical levels correspond to 2 to 6 layers, and the param layer is 1 layer. The data stored in the memory of D-Bus is in the form of a structure, specifically a tree structure. The active SERVICE contains multiple OBJECTs, and the OBJECT contains multiple INTERFACEs, the INTERFACE contains multiple METHODs, and the METHOD contains multiple SIGNATUREs.

[0063] The above-mentioned determining the lowest level corresponding to the input character according to the format of the input character may include: determining the lowest level corresponding to the input character according to the number of spaces contained in the input character; the input character separates different levels with spaces, and the input character is from high level to low level. It can be understood that a space will be entered after each level of parameter is entered in the input character, that is, the parameters of different levels are separated by spaces; for example, if the input character contains 2 spaces, the current parameter level is entered, that is, the current parameter level is 1; if the input character contains 3 spaces, the current input is to the SERVICE level, that is, the current parameter level is 2.

[0064] In addition, this application supports judging whether to enable the message bus system management proposed in this application according to the user level, that is, before determining the lowest level corresponding to the input character according to the format of the input character, obtain user information, and judge whether the user has the authority according to the user information. If the user has the authority, the operation of determining the lowest level corresponding to the input character according to the format of the input character is performed. If the user does not have the authority, the original process is followed. In this way, the needs of different users are met, and the function switch is customized according to the user level. The administrator can set which users can turn on or off this intelligent association completion function according to the needs, realizing a personalized user experience.

[0065] Step S12: If the matching level is the storage layer of the tree structure, extracting target parameters from the parameter layer field in the input characters according to the format of the input characters; the parameter field is used to characterize a method function.

[0066] After determining the matching level, if the matching level is any storage level in the tree structure of the message management system, it indicates that the user input characters contain parameter layer fields, so the parameter layer fields can be directly extracted from the second field of the input characters to obtain the target parameters. The target parameters are method functions such as tree and introspect.

[0067] Step S13: If the matching level is the parameter level, then determining the matching parameters corresponding to the input characters, and completing the input characters based on the matching parameters to obtain the target parameters.

[0068] If the matching level is the parameter layer, it means that only the parameter layer is currently input and the parameter layer is not fully input. Therefore, it is necessary to first associate the complete input of the parameter layer through matching, that is, the above-mentioned matching input, and then use the parameter layer field of the incomplete current input character of the matched parameter to obtain the complete target parameter.

[0069] Specifically, determining the matching parameter corresponding to the input character, and completing the input character based on the matching parameter to obtain the target parameter may include:

[0070] S201: Extract some characters belonging to the parameter layer field from the input characters.

[0071] For example, the current input characters are: "busctl tr", and some characters in the parameter layer field are: "tr".

[0072] S202: Compare the partial characters with standard parameters; the standard parameters are all types of parameters included in the parameter layer.

[0073] S203: Filter out a first target standard parameter matching the partial characters from all the standard parameters.

[0074] That is, multiple types of standard parameters are stored in advance, and the closest standard parameter is selected as the first target standard parameter by matching some characters with the standard parameters.

[0075] S204: Add the first target standard parameter to the associative array.

[0076] The first target standard parameter is added to the associative array, which is used to store all parameters associated with the above partial characters.

[0077] S205: Compare the partial characters with a custom parameter; the custom parameter is a parameter abbreviation preset for a standard parameter.

[0078] It is understandable that in order to further simplify the complexity of user input, it is supported to pre-customize parameter abbreviations, such as replacing the parameter with the letter "A"; and create a mapping relationship between standard parameters and parameter abbreviations.

[0079] S206: Filter out target custom parameters matching the partial characters from all the custom parameters.

[0080] S207: Query the mapping relationship between the preset standard parameters and the custom parameters to determine the second target standard parameters corresponding to the target custom parameters.

[0081] By matching partial characters with custom parameters, target custom parameters identical to the partial characters are determined, and then, by searching a pre-built mapping relationship, standard parameters represented by the target custom parameters are determined as second target standard parameters.

[0082] S208: Add the second target standard parameter to the associative array.

[0083] For example Figure 2 As shown, the standard param is matched first. Since all params are defined in the module, the array is directly traversed, and the array containing the input characters will be filled into the associative array. Then the personalized param is matched. Since the configuration file is loaded and the relevant data is stored, the array is directly traversed, and the array containing the input characters will be filled into the associative array. Finally, if the current input characters completely match a personalized param, the user input is replaced and the customized command is filled into the command line.

[0084] S209: Obtain matching parameters corresponding to the input characters based on the associative array, and display the matching parameters.

[0085] S210: According to a selection instruction for a target matching parameter, the target matching parameter is used to complete the partial characters to obtain the target parameter.

[0086] It is understandable that if multiple matching parameters are screened out, the matching parameters can be displayed in a human-computer interaction interface, and the user can select the parameters actually required, and then use the target matching parameters to complete some characters to obtain the complete target parameters.

[0087] In some embodiments, commands can also be customized, that is, users are allowed to rename a long string of complex message bus commands into short aliases. That is, the input characters are compared with the custom command abbreviations; the custom command abbreviations are the command abbreviations preset for the message bus commands; from all the custom command abbreviations, the target command abbreviations that match the input characters are screened out; the mapping relationship between the message bus commands and the command abbreviations is queried to determine the target message bus command corresponding to the target command abbreviation; the target message bus command is directly used to manage the message bus system. That is, through custom preset commands, users can rename a long string of complex D-Bus commands into short aliases, and the mapping relationship is stored in the configuration file in the form of key-value pairs (i.e., a=b), so that when needed, only the alias needs to be entered to execute the original command, which greatly simplifies the operation process.

[0088] In some embodiments, the above-mentioned comparison of the partial characters with the standard parameters includes: comparing the partial characters with the standard parameters based on the inclusion matching rule; the above-mentioned comparison of the partial characters with the custom parameters includes: comparing the partial characters with the custom parameters based on the inclusion matching rule. That is, in order to avoid omissions and improve the flexibility of matching, it is not limited to matching with the beginning characters, but adopts a more flexible inclusion matching strategy; that is, the user only needs to enter some keywords, and the system can quickly locate them in the memorized matching items based on these keywords, such as entering "busctl ll" and automatically completing it to "busctlcall", which greatly improves the convenience of input.

[0089] In some embodiments, determining the matching parameters corresponding to the input characters includes: disabling the case matching function, obtaining the matching parameters corresponding to the input characters based on sample matching; and enabling the case matching function. Figure 3 As shown, it can be understood that the case-sensitivity mode will be turned off before performing smart association, so that users can perform smart association without having to remember the case of matching characters; it will be turned on again after smart association to avoid problems with other functions that require case matching.

[0090] In some embodiments, before the input characters are filled with the data of the target storage layer to obtain a complete command, the process further includes: comparing the matching level with the target storage layer; if the matching level is higher than the target storage layer, generating an alarm; if the matching level is lower than or equal to the target storage layer, performing the operation of filling the input characters with the data of the target storage layer to obtain a complete command. It is understandable that if the matching level is higher than the target storage layer, there may be a problem with the user's input, in which case an alarm is generated and the process ends directly.

[0091] Step S14: Determine the target storage layer corresponding to the target parameter by querying the correspondence between the method function and the tree structure level.

[0092] It is understandable that different method functions correspond to different tree structure levels. For example, some method functions need to be called to the OBJECT layer, while others need to be called to the SIGNATURE layer, which is the bottom layer. Therefore, the corresponding relationship between method functions and tree structure levels is pre-built. By querying this relationship, the target storage layer corresponding to the target parameter can be determined, that is, the layer in SERVICE, OBJECT, INTERFACE, METHOD, and SIGNATURE. If the current match is 2 layers, namely SERVICE, all data of the SERVICE layer will be accessed and recorded in the memory, and the queried data will be filled into the command line.

[0093] In this way, the corresponding parameter level can be accurately determined, providing users with accurate suggestions, greatly improving operational efficiency; and by directly accessing the data structure in the memory of the D-Bus bus, the query results can be retrieved from its internal storage and returned, thereby improving the query speed.

[0094] Step S15: Based on the data of the target storage layer, fill in the input characters to obtain a complete command, so as to manage the message bus system using the complete command.

[0095] Finally, the input characters are filled in using the data of the target storage layer to obtain a complete command, so that the message bus system can be managed using the complete command. If multiple commands are filled in, the user can be allowed to select the command actually needed by displaying it, and then the message bus system can be managed using the selected command. In view of the diversity of commands, the currently input parameter command can be intelligently identified, and corresponding completion suggestions can be provided based on its characteristics to help users quickly complete the input.

[0096] For example Figure 4As shown, the process of filling the input characters based on the data of the target storage layer to obtain a complete command may include: obtaining a filter list set by the user; the filter list contains one or more filter items; filtering the data of the target storage layer using the filter list to obtain filtered data; and filling the input characters using the filtered data to obtain a complete command. The process of generating the filter list includes: obtaining historical query records, and counting the heat values ​​of different query commands according to the historical query records; filtering out query commands less than a preset heat threshold according to the heat values ​​as the filter items; and generating the filter list based on all filter items. It is understandable that some commands have extremely low usage rates, so these commands are excluded and the filtered data is filled; by intelligently filtering and selecting the matching items that the user really needs. For example, automatically ignoring system-level, non-application-related queries, focusing on the most commonly used types in users' daily operations, and ensuring that every association is accurate and efficient.

[0097] As can be seen from the above, in this embodiment, input characters are obtained, and the lowest level corresponding to the input characters is determined according to the format of the input characters as the matching level; the matching level includes a parameter layer and each storage level of the tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system; if the matching level is the storage level of the tree structure, the target parameters are extracted from the parameter layer field in the input characters according to the format of the input characters; the parameter field is used to characterize the method function; if the matching level is the parameter layer, the matching parameters corresponding to the input characters are determined, and the input characters are completed based on the matching parameters to obtain the target parameters; the target storage layer corresponding to the target parameters is determined by querying the correspondence between the method function and the tree structure level; based on the data of the target storage layer, the input characters are filled to obtain a complete command, so as to manage the message bus system using the complete command. It can be seen that the fields in the command are in hierarchical order, and the command needs to be in a certain format. Therefore, the input characters are obtained and the lowest level to which the input characters can correspond is determined as the matching layer according to the format; if the matching level is the storage layer of the message bus system, it indicates that the input characters already contain parameter layer fields, and this field represents the method function. At this time, the storage layer corresponding to the method function of the parameter layer field is directly determined; if the matching level is the parameter layer, it indicates that the current input characters are only input to the parameter layer, and the parameter layer input is incomplete, so it is necessary to complete the parameter layer field to obtain the target parameter; query the correspondence between the method function and the tree structure level, determine the target storage layer corresponding to the target parameter, and fill in the input characters based on the data of the target storage layer to obtain a complete command, so as to use the complete command to manage the message bus system. Through command completion, the efficiency and accuracy of message bus system management are improved, and by directly querying the tree structure of the message bus system, the speed of command completion is improved.

[0098] This method can be added to the system through a configuration file (.config), for example Figure 5 As shown, when a user (user) logs in to the system (system), the system will load (login) the current user's configuration file (.profile, bashrc, .config) and then start the command line shell and apply the current configuration to this shell, and the user will log in successfully. Each user's configuration file is saved separately. This application exists in the configuration file as a system execution command; this method of injecting user configuration files moves with the system and does not depend on other modules. Since the method exists in the system as a user configuration, the persistent file of the function configuration is also created in the user-level directory, which can easily realize the configuration of user personalized functions. At the same time, there are preset function configuration files in the system's file system, so that users can easily configure according to the module. When the module starts, the corresponding configuration will be read from this configuration file, and the function will be implemented according to the configuration when it is executed. The functions supported by this application are system-level applications, which do not depend on other external modules, making installation and uninstallation simpler; at the same time, unnecessary memory usage is reduced, making the system run more smoothly. It can greatly improve the user experience, especially in system management and server operations; it can reduce input errors and command search time, allowing users to enter correct commands and parameters more quickly; new users can more easily become familiar with and master commands and options, improving the usability of command line tools; intelligent association can help users avoid input errors, ensure the correctness of commands and parameters, and reduce failures caused by spelling errors; by providing instant feedback, it helps users understand the available command and parameter options, improving the intuitiveness and convenience of operations. It not only optimizes the user operation process, but also improves the overall efficiency and reliability of system management. It helps developers or operation and maintenance personnel better master and use tools, and significantly improves the efficiency and accuracy of D-Bus bus debugging and management in actual applications.

[0099] Correspondingly, the embodiment of the present application also discloses a message bus system management device, as shown in FIG6 , the device includes:

[0100] A matching level determination module 11 is used to obtain an input character, and determine the lowest level corresponding to the input character according to the format of the input character as a matching level; the matching level includes a parameter level and each storage level of a tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system;

[0101] A target parameter extraction module 12 is used to extract target parameters from a parameter layer field in the input character according to the format of the input character if the matching level is a storage layer of the tree structure; the parameter field is used to represent a method function;

[0102] a target parameter completion module 13, configured to determine the matching parameters corresponding to the input characters if the matching level is the parameter level, and complete the input characters based on the matching parameters to obtain the target parameters;

[0103] A target storage layer determination module 14 is used to determine the target storage layer corresponding to the target parameter by querying the corresponding relationship between the method function and the tree structure level;

[0104] The command filling module 15 is used to fill the input characters based on the data of the target storage layer to obtain a complete command, so as to manage the message bus system by using the complete command.

[0105] As can be seen from the above, in this embodiment, input characters are obtained, and the lowest level corresponding to the input characters is determined according to the format of the input characters as the matching level; the matching level includes a parameter layer and each storage level of the tree structure corresponding to the message bus system; the tree structure is used to store data of the message bus system; if the matching level is the storage level of the tree structure, the target parameters are extracted from the parameter layer field in the input characters according to the format of the input characters; the parameter field is used to characterize the method function; if the matching level is the parameter layer, the matching parameters corresponding to the input characters are determined, and the input characters are completed based on the matching parameters to obtain the target parameters; the target storage layer corresponding to the target parameters is determined by querying the correspondence between the method function and the tree structure level; based on the data of the target storage layer, the input characters are filled to obtain a complete command, so as to manage the message bus system using the complete command. It can be seen that the fields in the command are in hierarchical order, and the command needs to be in a certain format. Therefore, the input characters are obtained and the lowest level to which the input characters can correspond is determined as the matching layer according to the format; if the matching level is the storage layer of the message bus system, it indicates that the input characters already contain parameter layer fields, and this field represents the method function. At this time, the storage layer corresponding to the method function of the parameter layer field is directly determined; if the matching level is the parameter layer, it indicates that the current input characters are only input to the parameter layer, and the parameter layer input is incomplete, so it is necessary to complete the parameter layer field to obtain the target parameter; query the correspondence between the method function and the tree structure level, determine the target storage layer corresponding to the target parameter, and fill in the input characters based on the data of the target storage layer to obtain a complete command, so as to use the complete command to manage the message bus system. Through command completion, the efficiency and accuracy of message bus system management are improved, and by directly querying the tree structure of the message bus system, the speed of command completion is improved.

[0106] In some specific embodiments, the matching level determination module 11 may specifically include:

[0107] The matching level determination unit is used to determine the lowest level corresponding to the input character according to the number of spaces contained in the input character; the input characters separate different levels with spaces, and the input characters are from high level to low level.

[0108] In some specific embodiments, the message bus system management device may specifically include:

[0109] a level comparison unit, configured to compare the matching level with the target storage layer before filling the input characters to obtain a complete command based on the data of the target storage layer;

[0110] a prompting unit, configured to generate an alarm prompt if the matching level is higher than the target storage level;

[0111] An execution unit is used for executing the operation of filling the input characters with data based on the target storage layer to obtain a complete command if the matching level is lower than or equal to the target storage layer.

[0112] In some specific embodiments, the target parameter completion module 13 may specifically include:

[0113] A function closing unit, used to close the case matching function, and obtain matching parameters corresponding to the input characters based on sample matching;

[0114] Function enabling unit, used to enable the case matching function.

[0115] In some specific embodiments, the command filling module 15 may specifically include:

[0116] A filter list acquisition unit, used to acquire a filter list set by a user; the filter list includes one or more filter items;

[0117] A filtering unit, configured to filter the data of the target storage layer using the filtering list to obtain filtered data;

[0118] A filling unit is used to fill the input characters with the filtered data to obtain a complete command.

[0119] In some specific embodiments, the message bus system management device may further include:

[0120] A historical query record acquisition unit, used to acquire historical query records and count the popularity values ​​of different query commands according to the historical query records;

[0121] A filter item determination unit, configured to filter out query commands with a value less than a preset value threshold value according to the heat value as the filter item;

[0122] The filter list generating unit is used to generate the filter list based on all filter items.

[0123] In some specific embodiments, the target parameter completion module 13 may specifically include:

[0124] A character extraction unit, used to extract some characters belonging to the parameter layer field from the input characters;

[0125] A first comparison unit is used to compare the partial characters with standard parameters; the standard parameters are all types of parameters included in the parameter layer;

[0126] A first target standard parameter screening unit, used for screening out a first target standard parameter matching the partial characters from all the standard parameters;

[0127] A first adding unit, used for adding the first target standard parameter to the associative array;

[0128] A second comparison unit is used to compare the partial characters with a custom parameter; the custom parameter is a parameter abbreviation preset for a standard parameter;

[0129] A target custom parameter screening unit, used to screen out a target custom parameter matching the partial characters from all the custom parameters;

[0130] A second target standard parameter screening unit, used to query the mapping relationship between the preset standard parameter and the custom parameter, and determine the second target standard parameter corresponding to the target custom parameter;

[0131] A second adding unit, used for adding the second target standard parameter to the associative array;

[0132] a matching parameter determination unit, configured to obtain matching parameters corresponding to the input characters based on the associative array, and display the matching parameters;

[0133] The target parameter completion unit is used to complete the partial characters using the target matching parameters according to the selection instruction for the target matching parameters to obtain the target parameters.

[0134] Furthermore, an embodiment of the present application also discloses an electronic device, as shown in FIG7 . The content in the figure cannot be regarded as any limitation on the scope of use of the present application.

[0135] FIG7 is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the message bus system management method disclosed in any of the aforementioned embodiments.

[0136] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0137] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including input characters, etc. The storage method can be temporary storage or permanent storage.

[0138] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the message bus system management method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0139] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the message bus system management method disclosed in any of the aforementioned embodiments are implemented.

[0140] Furthermore, an embodiment of the present application also discloses a computer program product, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the message bus system management method disclosed in any of the aforementioned embodiments are implemented.

[0141] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0142] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0144] The message bus system management method, device, equipment and storage medium provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A message bus system management method, characterized in that: include: Obtaining an input character, and determining the lowest level corresponding to the input character according to the format of the input character as a matching level; The matching level includes a parameter layer and storage layers of a tree structure corresponding to the message bus system; The tree structure is used to store data of the message bus system; If the matching level is the storage layer of the tree structure, extracting the target parameter from the parameter layer field in the input character according to the format of the input character; the parameter field is used to represent the method function; If the matching level is the parameter level, determining a matching parameter corresponding to the input character, and completing the input character based on the matching parameter to obtain the target parameter; Determine the target storage layer corresponding to the target parameter by querying the corresponding relationship between the method function and the tree structure level; Based on the data of the target storage layer, the input characters are filled to obtain a complete command, so as to manage the message bus system by using the complete command.

2. The message bus system management method according to claim 1, characterized in that: The determining, according to the format of the input character, the lowest level corresponding to the input character comprises: The lowest level corresponding to the input character is determined according to the number of spaces contained in the input character; the input characters use spaces to separate different levels, and the input characters are from high level to low level.

3. The message bus system management method according to claim 1, characterized in that: Before filling the input characters based on the data of the target storage layer to obtain a complete command, the method further includes: comparing the matching level with the target storage tier; If the matching level is higher than the target storage level, an alarm is generated; If the matching level is lower than or equal to the target storage layer, the operation of filling the input characters based on the data of the target storage layer to obtain a complete command is performed.

4. The message bus system management method according to claim 1, characterized in that: The determining of the matching parameter corresponding to the input character includes: Turn off the case matching function, and obtain the matching parameters corresponding to the input characters based on sample matching; Enable case matching.

5. The message bus system management method according to claim 1, characterized in that: The step of filling the input characters based on the data of the target storage layer to obtain a complete command includes: Obtain a filter list set by a user; the filter list includes one or more filter items; Filtering the data of the target storage layer using the filter list to obtain filtered data; The input characters are filled with the filtered data to obtain a complete command.

6. The message bus system management method according to claim 5, characterized in that: Also includes: Obtain historical query records, and count the popularity values ​​of different query commands according to the historical query records; Filter out query commands with a value less than a preset value threshold according to the value of heat as the filter items; The filter list is generated based on all filter items.

7. The message bus system management method according to any one of claims 1 to 6, characterized in that: The determining the matching parameter corresponding to the input character, and completing the input character based on the matching parameter to obtain the target parameter, includes: Extracting some characters belonging to the parameter layer field from the input characters; Comparing the partial characters with standard parameters; the standard parameters are all types of parameters included in the parameter layer; Filtering out a first target standard parameter matching the partial character from all the standard parameters; adding the first target standard parameter to the associative array; Comparing the partial characters with a custom parameter; the custom parameter is a parameter abbreviation preset for a standard parameter; Filtering out a target custom parameter matching the partial characters from all the custom parameters; Querying the mapping relationship between the preset standard parameters and the custom parameters, and determining the second target standard parameters corresponding to the target custom parameters; adding the second target standard parameter to the associative array; Obtaining matching parameters corresponding to the input characters based on the associative array, and displaying the matching parameters; According to the selection instruction for the target matching parameter, the target matching parameter is used to complete the partial characters to obtain the target parameter.

8. A message bus system management device, characterized in that: include: A matching level determination module, used to obtain an input character, and determine the lowest level corresponding to the input character according to the format of the input character as a matching level; The matching level includes a parameter layer and storage layers of a tree structure corresponding to the message bus system; The tree structure is used to store data of the message bus system; a target parameter extraction module, configured to extract target parameters from a parameter layer field in the input character according to a format of the input character if the matching level is a storage layer of the tree structure; the parameter field is used to characterize a method function; a target parameter completion module, configured to determine the matching parameters corresponding to the input characters if the matching level is the parameter level, and complete the input characters based on the matching parameters to obtain the target parameters; A target storage layer determination module, used to determine the target storage layer corresponding to the target parameter by querying the corresponding relationship between the method function and the tree structure level; A command filling module is used to fill the input characters based on the data of the target storage layer to obtain a complete command, so as to manage the message bus system by using the complete command.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the message bus system management method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein when the computer programs are executed by a processor, the message bus system management method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Multi-bus protocol testing and simulation method based on ICD database and platform

    CN106980560A

  • Automatic query completion method and device

    CN110750704A

  • Universal service-oriented high-reliability bus system

    CN114531316A

  • Data analysis method and device and computer readable storage medium

    CN115086449A

  • Networked test instrument integration method based on message format description

    CN117971206A