Communication protocol dynamic generation method and device, equipment and storage medium

By obtaining and processing the protocol content input by the user, performing hierarchical division and generating objective function relationships, the problem of low protocol reuse rate in smart wearable devices is solved, achieving high reusability and flexibility of the protocol and adapting to multiple functions. need.

CN118869832APending Publication Date: 2024-10-29GOERTEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411035655.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

When adding functions to existing smart wearable devices, the reuse rate of communication protocols in the software is low, making maintenance difficult, and protocol modifications are cumbersome and difficult to adapt to changes.

Method used

By obtaining the original protocol content input by the user, classifying the content format and dividing the hierarchy, determining the target function relationship, and converting it into a target file, the protocol data can be dynamically generated and updated to avoid underlying modifications.

Benefits of technology

It improves the reusability and flexibility of the software, simplifies protocol management, reduces code modification and testing time, and adapts to the needs of multiple health monitoring functions and audio processing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869832A_ABST
    Figure CN118869832A_ABST
Patent Text Reader

Abstract

The invention discloses a communication protocol dynamic generation method and device, equipment and a storage medium, relates to the technical field of data processing, and discloses a communication protocol dynamic generation method which comprises the following steps: acquiring original protocol content input to communication protocol generation software by a user, and determining a content format corresponding to the original protocol content; when the content format is a data format, determining all protocol version contents in the original protocol contents, and classifying all the protocol version contents to obtain a plurality of types of protocol version contents; performing hierarchical division processing on the protocol version contents of the plurality of categories to obtain first module protocol data of different hierarchies; and according to the number of added modules of different levels and the first module protocol data of different levels, determining an objective function relational expression satisfying all protocol version contents, and converting the objective function relational expression into an objective file to be output. According to the method and the device, the reuse rate of software can be improved in a communication protocol generation link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for dynamically generating a communication protocol. Background Art

[0002] With the rapid development of smart wearable devices, people have higher and higher requirements for the quality of life, and pay more attention to their own health status and spiritual pursuits. Various devices for measuring blood pressure, blood sugar and heart rate are emerging in an endless stream. However, these devices will invest high costs in software and algorithms in the early stages of research and development. The communication protocol between the application tools and the algorithm often requires the addition of a new protocol with the addition of a small module, or even the modification of the protocol as a whole. That is, when adding new application functions to the device, it is necessary to use the corresponding software and the corresponding communication protocol to add functions. When more functions need to be added to the device, the software that needs to be applied will also increase, making subsequent maintenance very difficult. Therefore, how to use one software to generate multiple communication protocols and improve the software reuse rate has become an urgent problem that needs to be solved.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for dynamically generating a communication protocol, aiming to solve the technical problem of how to improve the reuse rate of software in the communication protocol generation link.

[0005] To achieve the above objectives, the present application proposes a method for dynamically generating a communication protocol, the method comprising:

[0006] Acquire the original protocol content input by the user into the communication protocol generation software, and determine the content format corresponding to the original protocol content, wherein the content format includes a data format;

[0007] When the content format is a data format, determining all protocol version contents in the original protocol content, and classifying all the protocol version contents to obtain multiple categories of protocol version contents;

[0008] Performing hierarchical division processing on the protocol version contents of multiple categories to obtain first module protocol data of different hierarchies;

[0009] According to the number of modules at different levels added and the first module protocol data at different levels, determine the objective function relationship that satisfies the contents of all protocol versions, and convert the objective function relationship into a target file for output.

[0010] In one embodiment, the steps of hierarchically dividing the protocol version contents of multiple categories to obtain the first module protocol data of different hierarchies include:

[0011] Performing hierarchical division processing on the protocol version contents belonging to the same category, and taking the protocol version contents belonging to the same category as the first module protocol data of the first layer;

[0012] According to different preset application functions, the protocol version contents belonging to the same category are divided into sub-levels to obtain first module protocol data of at least one sub-level.

[0013] In one embodiment, the step of determining the objective function relational expression satisfying the contents of all the protocol versions according to the number of modules at different levels added and the first module protocol data at different levels includes:

[0014] Determining the number of modules and the first module protocol data belonging to the same level according to the number of modules at different levels added and the first module protocol data at different levels;

[0015] The number of modules belonging to the same level is associated with the first module protocol data to generate a first coordinate, and the objective function relationship is determined according to the first coordinate, wherein the horizontal coordinate of the first coordinate is the first module protocol data, and the vertical coordinate of the first coordinate is the number of modules.

[0016] In one embodiment, the step of determining the objective function relational expression according to the first coordinate comprises:

[0017] Perform linear regression processing on all first coordinates at the same level to generate the original function relationship;

[0018] The target function relationship is determined according to the original function relationship.

[0019] In one embodiment, the step of determining the target function relationship according to the original function relationship includes:

[0020] All first coordinates of the same level are arranged in a staggered manner to obtain the first determinant matrix;

[0021] Performing a left multiplication transformation process on the first determinant matrix according to a preset determinant matrix to obtain a second determinant matrix; wherein the value of the determinant matrix is ​​not equal to 0;

[0022] Determine a second coordinate after transforming the first coordinate based on the second row-column matrix;

[0023] Updating the original functional relationship according to the second coordinate to obtain an updated functional relationship;

[0024] Performing a comparison check between the first module protocol data and the module number according to the updated functional relationship;

[0025] If the comparison check passes, the second determinant is left-multiplied according to the inverse determinant matrix corresponding to the preset determinant matrix to obtain the restored first coordinate, and the updated function relationship is restored according to the restored first coordinate to obtain the target function relationship.

[0026] In one embodiment, the content format also includes a file format, and after the step of determining the content format corresponding to the original protocol content, the following steps are included:

[0027] When the content format is a file format, determining an original file containing the original protocol content;

[0028] Parsing the original file to obtain an analytical function relationship corresponding to the original protocol content;

[0029] The preset application function is executed according to the analytical function relationship.

[0030] In one embodiment, the step of executing a preset application function according to the analytical function relationship includes:

[0031] When the content format is a data format, determining the obtained target function relationship formula and comparing it with the analytical function relationship formula;

[0032] If the objective function relational expression is consistent with the analytical function relational expression, executing a preset application function according to the analytical function relational expression;

[0033] If the objective function relational expression is inconsistent with the analytical function relational expression, an alarm message is outputted, and the steps of obtaining the original protocol content input by the user into the communication protocol generation software and determining the content format corresponding to the original protocol content are executed.

[0034] In addition, to achieve the above purpose, the present application also proposes a communication protocol dynamic generation device, including:

[0035] An acquisition unit, used to acquire original protocol content input by a user into the communication protocol generation software, and determine a content format corresponding to the original protocol content, wherein the content format includes a data format;

[0036] a determination unit, configured to determine, when the content format is a data format, all protocol version contents in the original protocol content, and classify all the protocol version contents to obtain multiple categories of protocol version contents;

[0037] A division unit, used for performing hierarchical division processing on the protocol version contents of multiple categories to obtain first module protocol data of different hierarchies;

[0038] The output unit is used to determine the objective function relationship that satisfies the contents of all the protocol versions according to the number of modules at different levels added and the first module protocol data at different levels, and convert the objective function relationship into a target file for output.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a communication protocol dynamic generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the communication protocol dynamic generation method as described above.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the communication protocol dynamic generation method described above are implemented.

[0041] In the present application, by obtaining the original protocol content input by the user into the communication protocol generation software, when the content format of the original protocol content is a data format, all the protocol version contents in the original protocol content are classified and processed to obtain multiple categories of protocol version contents, and then hierarchical division is performed to obtain the first module protocol data of different levels; according to the number of modules of different levels added and the first module protocol data of different levels, the target function relationship that satisfies all protocol version contents is determined, and the target function relationship is converted into a target file for output. That is, the user can input the original protocol content to the corresponding software by autonomously inputting or redefining the protocol, and the protocol data is directly processed on the upper layer of the device where the software is located, and it is converted into a target function relationship for output, so that the user does not need to modify the communication protocol at the bottom layer. And when the user autonomously inputs the protocol or redefines the protocol, the existing project can be left unchanged, and the contents of each protocol version can be reasonably divided on the upper layer of the device, so that the generated target function relationship can meet the corresponding protocol requirements of all protocol version contents, thereby improving the reusability and flexibility of the software, that is, it is realized in the communication protocol generation link, and the reuse rate of the software is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 A flowchart of the first embodiment of the method for dynamically generating a communication protocol of the present application is provided;

[0045] Figure 2 This is a schematic diagram of the interface for the user to input the protocol in the method for dynamically generating the communication protocol of this application;

[0046] Figure 3 A flowchart diagram of the third embodiment of the method for dynamically generating a communication protocol of the present application;

[0047] Figure 4 This is a schematic diagram of the overall process of the dynamic generation method of the communication protocol in this application;

[0048] Figure 5 This is a schematic diagram of the unit structure of the communication protocol dynamic generation device of this application;

[0049] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the method for dynamically generating a communication protocol in an embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] By analyzing the communication protocol, this embodiment can manually change or add the communication protocol in real time, so as to adapt to different application tools without the need to modify and adjust the underlying logic as a whole. For example, in the audio industry, when adjusting the audio, multiple algorithm modules are often required to work together to achieve the expected audio effect. Therefore, according to the scheme in this embodiment, the communication protocol can be modified or newly adjusted in the upper-layer device, and the overall communication protocol can be adjusted without adjusting the communication protocol, such as ensuring that the header protocol content of the communication protocol remains unchanged, thereby improving the high reusability and flexibility of the communication protocol and avoiding the waste of software development resources. And the data addition operation is performed in the upper-layer device, including two methods of manually inputting data and importing files, and the imported data information associated with the communication protocol is reasonably divided. The data is hierarchically divided by modularization, and the data is re-analyzed to update the communication protocol data, and the updated communication protocol data is simulated and calculated and transmitted to the back end to establish communication. Therefore, it is possible to improve the reuse rate of the protocol and make the protocol more streamlined. It can also solve the problem of fixed protocols and difficulty in adapting to changes encountered in the development process of smart wearable devices and other related software systems.

[0054] For example, for the development of smart wearable devices, developing a new smart watch requires integrating multiple health monitoring functions, such as blood pressure, heart rate, and blood sugar monitoring. Based on this embodiment, developers can quickly define and adjust communication protocols based on multiple health monitoring functions, so as to easily integrate communication protocols related to multiple health monitoring functions without having to rewrite the communication protocols. For another example, for the scenario of upgrading the audio processing system, the audio processing system needs to be updated to support multi-channel mixing and real-time audio enhancement. Based on this embodiment, its communication protocol can be dynamically adjusted to efficiently manage the interaction of multiple audio algorithm modules, ensuring high-quality audio output while reducing code changes and testing time.

[0055] The present application embodiment provides a method for dynamically generating a communication protocol. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for dynamically generating a communication protocol of the present application.

[0056] In this embodiment, the communication protocol dynamic generation method is applied to an upper layer device, including steps S10 to S40.

[0057] Step S10, obtaining the original protocol content input by the user into the communication protocol generation software, and determining the content format corresponding to the original protocol content;

[0058] It should be noted that the content format includes the data format. Optionally, the data format can be a text, code or character format.

[0059] Optionally, the communication protocol generation software may be applied to an upper layer device, which may be an upper layer device of a wearable device, such as a smart watch, etc. The original protocol content may include all communication protocols that the upper layer device needs to apply, including communication protocol content that needs to be added or modified.

[0060] Optionally, in the communication protocol generation software, after detecting that the user triggers the corresponding communication protocol generation instruction, a corresponding first interface for the user to input the original protocol content can be generated, and the first interface can be displayed in the form of a window or a web page.

[0061] Optionally, in one scenario embodiment, after detecting that a user triggers an instruction generated by a corresponding communication protocol, a permission check is performed on the user, such as a permission check is performed on a user account belonging to the user, to determine whether the user has permission to modify the communication protocol, and when it is determined that the user has permission to modify the communication protocol, a first interface is generated for the user to input the original protocol content, and displayed in the form of a window or a web page.

[0062] Optionally, in one scenario embodiment, before adding or modifying a communication protocol, it is also necessary to detect the upper-layer device to determine whether the upper-layer device supports adding or modifying a communication protocol. If supported, after detecting that the user triggers an instruction to generate a corresponding communication protocol, a corresponding first interface for the user to input the original protocol content can be generated to receive the corresponding communication protocol that needs to be added or modified input by the user.

[0063] Optionally, the upper-layer device may receive the original protocol content input by the user and determine the content format corresponding to the original protocol content, which may be a data format, that is, the user directly enters data related to the communication protocol to be added or modified, such as code data, in the input box in the first interface of the upper-layer device. Optionally, in a scenario implementation, after obtaining the original protocol content input by the user, the upper-layer device may also perform a form check on the original protocol content to determine whether there are obvious form problems. If so, a corresponding prompt message is output to remind the user that modifications and adjustments are required.

[0064] Step S20, when the content format is a data format, determining all protocol version contents in the original protocol content, and classifying all protocol version contents to obtain multiple categories of protocol version contents;

[0065] Optionally, after obtaining the original protocol content input by the user, all protocol version contents contained in the original protocol content may be classified and processed. After the corresponding processing, the protocol data corresponding to the protocol version content is no longer sent to the underlying device in digital form, but is passed to the underlying device in the form of a function.

[0066] Optionally, the user enters the original protocol content containing protocol data through the input box in the first interface displayed by the upper-layer device. And the appropriate number of sub-input boxes can be added according to the existing modules, and the sub-input box can be divided into three parts, namely the header part, the module part and the data part. Enter the protocol data content corresponding to the header part in the sub-input box corresponding to the header part. The protocol data content corresponding to the header part contains the basic control information of the protocol data and is an indispensable part of any communication protocol. For example, metadata such as source address, destination address and protocol version. Enter the protocol data content corresponding to the module part in the sub-input box corresponding to the module part. The protocol data content corresponding to the module part is the data and control information related to a specific function or module in the communication protocol. For example, module identifier, parameter configuration, status information and control instructions for controlling module behavior. Enter the protocol data content corresponding to the data part in the sub-input box corresponding to the data part. The protocol data content corresponding to the data part contains actual business data. For example, measurement data collected from sensors (such as temperature, pressure, and heart rate), data processed by algorithms (such as filtered signals, analysis results, and predicted values), updated information on device or system status, and feedback on the results of responses to control instructions (such as successful execution and reasons for failure).

[0067] Optionally, in a complete communication protocol, the protocol data content corresponding to the header part can provide basic control and routing information, the protocol data content corresponding to the module part can allow customized communication for different functions or algorithms, and the protocol data content corresponding to the data part can transmit actual business data, such as business data of different application functions.

[0068] Optionally, in this embodiment, only the protocol data content of the module part needs to be processed, and the protocol data content corresponding to the header part does not need to be changed. In addition, the protocol data content corresponding to the data part and the protocol data content corresponding to the module part can be strongly associated, for example, data information related to the protocol data content corresponding to the data part is added to the protocol data content corresponding to the module part.

[0069] Optionally, when the upper layer device determines the original protocol content input by the user and the original protocol content is in data format, it needs to determine all protocol version content contained in the original protocol content. The protocol version content includes the communication protocol that needs to be added or modified to the upper layer device.

[0070] Optionally, all protocol version contents can be classified according to preset classification rules, and protocol version contents belonging to the same category can be classified as the same category to obtain protocol version contents of multiple categories. Optionally, the classification rules can be determined according to the application function. For example, protocol version contents belonging to the same application function can be classified as one category, such as all protocol version contents related to health monitoring can be classified as one category, and all protocol version contents related to audio playback can be classified as one category.

[0071] Step S30, hierarchical division processing is performed on the protocol version contents of multiple categories to obtain first module protocol data of different hierarchies;

[0072] Optionally, the hierarchical division processing rules can be determined first, and the protocol version content of each category can be hierarchically divided according to the hierarchical division processing rules to obtain the protocol version content of different levels, and use them as the first module protocol data of different levels. Optionally, the hierarchical division processing rules can be rules set according to user needs, or can be default rules. For example, hierarchical division is performed according to the depth of the functions that can be used by the application. For example, the WeChat application, the chat function in the WeChat application, and the image input function in the chat function. Therefore, the protocol version content corresponding to the WeChat application can be used as the first module protocol data of the first level. The protocol version content corresponding to the chat function is used as the first module protocol data of the second level. The protocol version content corresponding to the image input function is used as the first module protocol data of the third level.

[0073] In a feasible embodiment, in step S30, the steps of hierarchically dividing the protocol version contents of multiple categories to obtain first module protocol data of different levels include steps a10-a20.

[0074] Step a10, performing hierarchical division processing on the protocol version contents belonging to the same category, and taking the protocol version contents belonging to the same category as the first module protocol data of the first layer;

[0075] Step a20, dividing the protocol version contents belonging to the same category into sub-levels according to different preset application functions, and obtaining at least one sub-level of first module protocol data.

[0076] Optionally, the same operation is performed for each category of protocol version content, and only one example of protocol version content of the same category is used here for illustration.

[0077] Optionally, the protocol version content belonging to the same category can be divided into layers. Optionally, the hierarchical division process can be divided according to different application functions. For example, for all the protocol version content belonging to the health detection application, the protocol version content used for blood pressure monitoring, the protocol version content used for heart rate monitoring, and the protocol version content used for blood sugar monitoring in these protocol version contents are determined, and they are regarded as the same level. A further level of refinement can also be performed, such as hierarchical division according to specific application functions. Optionally, the protocol version content belonging to the same category can be divided into multiple different levels of protocol version content, and used as the first module protocol data. For example, the first module protocol data of the first level, the first module protocol data of the second level, and the first module protocol data of the third level. The first module protocol data of the first level are the various protocol version contents after classification processing. The first module protocol data of the second level may include the protocol version content of the specific application function under each category.

[0078] Optionally, first module protocol data of different levels corresponding to all categories of protocol version content may be determined.

[0079] Optionally, the hierarchical division processing rules can be determined according to the application functions, such as taking the highest level function as the first level, the next level function as the second level, and the next level function as the third level. Optionally, other levels after the first level are taken as sub-levels, such as the second level and the third level.

[0080] In this embodiment, the protocol version contents belonging to the same category are divided into levels and used as the first module protocol data of the first level. The sub-levels are then divided according to different application functions to obtain the first module protocol data of at least one sub-level, thereby ensuring the effectiveness of the hierarchical division process.

[0081] Step S40, determining the objective function relational expression that satisfies all protocol version contents according to the number of modules at different levels added and the first module protocol data at different levels, and converting the objective function relational expression into a target file for output.

[0082] Optionally, the upper-layer device may determine the number of modules at different levels added by the user, such as the number of modules at the first level, the number of modules at the second level, and the number of modules at the third level.

[0083] Optionally, the number of modules at different levels and the first module protocol data at different levels can be processed jointly to obtain an objective function relationship that satisfies the content of all protocol versions, and then the objective function relationship is converted into a target file, such as a Json file. The Json file is exported, such as sending the Json file to the underlying device, and the underlying device performs corresponding application function tests based on the Json file to achieve normal use of the application function and to achieve the addition or modification of the underlying communication protocol.

[0084] In addition, an example is given of an interface scenario displayed by the upper-layer device when the upper-layer device receives original protocol content input by a user.

[0085] For example, Figure 2 As shown, in the upper device, the following can be displayed: Figure 2 The first interface shown in the figure can display multiple input boxes in the first interface. For example, the input box corresponding to the input interface, and the sub-input box corresponding to each module. For example, module 1, module 1.1 and module 1.2 in module 1. Module 2, module 2.1 and module 2.2 in module 2. Module 3, module 1.1 and module 1.2 in module 3. ⊕ represents the key 5 for adding this type of module. Optionally, module 1, module 2 and module 3 can represent the protocols of the parent class or different APPs. Module 1.1, module 1.2, module 2.1 and module 2.2 can represent subclass modules. And module 1, module 2 and module 3 are at the same level, such as the first level. Module 1.1, module 1.2, module 2.1 and module 2.2 are at the same level, such as the second level.

[0086] In this embodiment, by obtaining the original protocol content input by the user to the communication protocol generation software, when the content format of the original protocol content is a data format, all the protocol version contents in the original protocol content are classified and processed to obtain multiple categories of protocol version contents, and then hierarchical division is performed to obtain the first module protocol data of different levels; the target function relationship that satisfies all protocol version contents is determined according to the number of modules of different levels added and the first module protocol data of different levels, and the target function relationship is converted into a target file for output. That is, the user can input the original protocol content to the corresponding software by autonomously inputting or redefining the protocol, and the protocol data is directly processed on the upper layer of the device where the software is located, and it is converted into a target function relationship for output, so that the user does not need to modify the communication protocol at the bottom layer. And when the user autonomously inputs the protocol or redefines the protocol, the existing project can be left unchanged, and the contents of each protocol version can be reasonably divided on the upper layer of the device, so that the generated target function relationship can meet the corresponding protocol requirements of all protocol version contents, thereby improving the reusability and flexibility of the software, that is, achieving the communication protocol generation link and improving the reuse rate of the software.

[0087] Based on the first embodiment of the present application, a second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those in the above embodiment can be referred to the above description and will not be described in detail later. On this basis, in step S40, according to the number of modules of different levels added and the protocol data of the first modules of different levels, the steps of determining the objective function relational formula that satisfies the contents of all protocol versions include steps b10-b20.

[0088] Step b10, determining the number of modules and the first module protocol data belonging to the same level according to the added number of modules of different levels and the first module protocol data of different levels;

[0089] Step b20, associating the number of modules belonging to the same level with the first module protocol data, generating a first coordinate, and determining the objective function relationship according to the first coordinate.

[0090] It should be noted that the abscissa of the first coordinate is the first module protocol data, and the ordinate of the first coordinate is the number of modules.

[0091] Optionally, after determining the number of modules at different levels and the first module protocol data at different levels, classification processing may be performed to determine the number of modules and the first module protocol data belonging to the same level.

[0092] Optionally, the number of modules belonging to the same level may be associated with the first module protocol data and converted into a coordinate form to obtain a first coordinate.

[0093] For example, if A is the specific data in the module, that is, the first module protocol data. N is the number of first-level modules. M is the number of second-level modules. L is the number of third-level modules. Since the first module protocol data can correspond to the module number one by one, the module number and the first module protocol data belonging to the same level can be associated and converted into the form of coordinates, that is, the first coordinates, such as (A1, N1), (A2, N2), (A2, N2), etc.

[0094] Optionally, after determining a plurality of first coordinates, function transformation may be performed on each first coordinate to generate a corresponding objective function relational expression.

[0095] In this embodiment, the number of modules at the same level and the first module protocol data are determined, and then associated with them to generate the first coordinates, and then the objective function relationship is determined according to the first coordinates, thereby ensuring the validity of the objective function relationship.

[0096] In a feasible embodiment, in step b20, the step of determining the objective function relationship according to the first coordinate includes steps c10-c20.

[0097] Step c10, performing linear regression processing on all first coordinates at the same level to generate an original function relationship;

[0098] Optionally, linear regression processing can be performed on all first coordinates at the same level to obtain a corresponding linear regression function, and the linear regression function is used as the original functional relationship. Optionally, curve generation can also be performed on all first coordinates in the same coordinate system, and the corresponding linear regression function is determined according to the generated curve, and the linear regression function is used as the original functional relationship.

[0099] Alternatively, the original functional relation can be as follows:

[0100] f(x)=A0+A1X 1 +A2X 2 +A3X 3 +A4X 4 +...+A n X n ;

[0101] Where n is the number of coordinates of the first coordinate. X is the horizontal coordinate of the first coordinate. F(x) is the vertical coordinate of the first coordinate. n The parameters can be calculated by inputting each first coordinate into the above primitive functional relationship.

[0102] Step c20, determining the target function relationship based on the original function relationship.

[0103] Optionally, after determining the original functional relationship, the first module protocol data and the number of modules can be directly compared and verified according to the original functional relationship, and after the verification is passed, it is used as the target functional relationship. Optionally, the original functional relationship can be simplified according to certain rules, and then compared and verified, and after the comparison and verification is passed, it is restored to obtain the target functional relationship.

[0104] In this embodiment, linear regression processing is performed on all first coordinates at the same level to generate an original function relationship, and then the target function relationship is determined based on the original function relationship, thereby ensuring the validity of the determined target function relationship.

[0105] In a feasible embodiment, step c20, the step of determining the target functional relationship based on the original functional relationship, includes steps d10-d60.

[0106] Step d10, performing staggered arrangement on all first coordinates of the same level to obtain a first determinant matrix;

[0107] Step d20, performing a left multiplication transformation process on the first determinant matrix according to a preset determinant matrix to obtain a second determinant matrix;

[0108] Step d30, determining a second coordinate after transforming the first coordinate based on the second row-column matrix;

[0109] Step d40, updating the original functional relationship according to the second coordinate to obtain an updated functional relationship;

[0110] Step d50, performing a comparison check of the first module protocol data and the module number according to the updated functional relationship;

[0111] Step d60, if the comparison check passes, the second determinant is left-multiplied according to the inverse determinant matrix corresponding to the preset determinant matrix to obtain the restored first coordinate, and the updated function relationship is restored according to the restored first coordinate to obtain the target function relationship.

[0112] It should be noted that the value of the determinant matrix is ​​not equal to 0.

[0113] Optionally, in order to reduce the complexity of the protocol relationship, the first coordinate may be converted, and after the conversion, the first module protocol data and the module number may be compared and checked, and the multiple relationship or several simple coordinates may be compared and checked first.

[0114] Optionally, when converting the first coordinates, each first coordinate may be arranged in a staggered manner to obtain a first determinant matrix. For example, the first coordinate (A, N) is converted to the coordinate (N, A), a matrix is ​​formed according to each coordinate (N, A), and the matrix is ​​used as the first determinant matrix.

[0115] Optionally, the first determinant matrix may be subjected to column transformation or row transformation. The steps of the two are similar, and only one is used as an example for illustration.

[0116] Optionally, a preset determinant matrix may be obtained first. It should be noted that the absolute value of the preset determinant matrix cannot be 0, so that an inverse determinant matrix corresponding to the preset determinant matrix can be generated later and recovery processing can be performed according to the inverse determinant matrix.

[0117] Optionally, the first determinant matrix may be subjected to a left multiplication transformation process according to a preset determinant matrix to obtain a second determinant matrix. For example, if the preset determinant matrix is ​​an N x N determinant matrix, then after the left multiplication transformation process, the first determinant matrix will become the second determinant matrix, and the corresponding coordinates will also be converted to (N, Z). That is, the first coordinate (A, N) will be converted to the second coordinate (N, Z).

[0118] Optionally, after determining the second coordinate after the transformation of the first coordinate, the relationship between the data can be more easily identified. Optionally, a new functional relationship can be re-determined for each second coordinate, and the new functional relationship can be determined as the functional relationship after updating the original functional relationship, that is, the updated functional relationship.

[0119] Optionally, the updated functional relationship is a simplified relationship of the original functional relationship. The updated functional relationship can reflect the mathematical relationship between the first module protocol data and the number of modules. Therefore, the first module protocol data and the number of modules can be compared and verified by the updated functional relationship to identify the potential law between the two. Then, the communication protocol generation process is optimized according to the identification result, and the communication protocol can be dynamically optimized.

[0120] Optionally, after determining that the comparison check of the first module protocol data and the number of modules has passed, the updated functional relationship can be restored. The second determinant can be left-multiplied according to the inverse matrix of the determinant to obtain the restored first coordinate, and the updated functional relationship can be restored according to the restored first coordinate to obtain the restored functional relationship, which is used as the target functional relationship.

[0121] In this embodiment, the first coordinates of the same level are staggered and then left-multiplied according to the determinant matrix to convert the first coordinates and update the original functional relationship to obtain an updated functional relationship. A comparison check is performed on the first module protocol data and the number of modules according to the updated functional relationship, and after the comparison check passes, the data is restored according to the inverse determinant matrix to obtain the target functional relationship, thereby ensuring the validity of the target functional relationship.

[0122] Based on the first or second embodiment of the present application, a third embodiment of the present application is proposed. In the third embodiment of the present application, the same or similar contents as those in the above embodiment can be referred to the above introduction, and will not be repeated in the following. Figure 3 , after the step of determining the content format corresponding to the original protocol content in step S10, steps S50-S70 are included.

[0123] Step S50, when the content format is a file format, determining an original file containing the original protocol content;

[0124] Step S60, parsing the original file to obtain an analytical function relationship corresponding to the original protocol content;

[0125] Step S70, executing a preset application function according to the analytical function relationship.

[0126] It should be noted that content format includes data format and file format.

[0127] Optionally, when the content format is a file format, it can be determined that what the user uploaded is a file, such as a Json file, so the original file containing the original protocol content can be determined.

[0128] Optionally, after the original file is determined, the original file may be parsed by underlying logic to obtain a corresponding functional relationship expression, which is used as the parsed functional relationship expression.

[0129] Optionally, after the analytical function relationship is determined, it can be directly exchanged with the application layer according to the analytical function relationship to execute relevant application functions in the application layer.

[0130] In this embodiment, by determining the original file and parsing it when the file format of the content format of the original protocol content is in the file format, a parsing function relationship is generated, and the corresponding application function is executed by exchanging with the application layer according to the parsing function relationship, thereby achieving operations such as function expansion directly according to the protocol content in the file to meet the user's design requirements.

[0131] In a feasible embodiment, step S70, the step of executing a preset application function according to the analytical function relationship, includes steps e10-e30.

[0132] Step e10, when the content format is a data format, determining the obtained objective function relationship and comparing it with the analytical function relationship;

[0133] Step e20, if the objective function relation is consistent with the analytical function relation, then executing the preset application function according to the original function relation;

[0134] Step e30: if the objective function relational expression is inconsistent with the analytical function relational expression, an alarm message is outputted, and the steps of obtaining the original protocol content input by the user and determining the content format corresponding to the original protocol content are executed.

[0135] Optionally, the objective function relational expression may be determined and compared with the analytical function relational expression. If the two are consistent, the original function relational expression may be directly exchanged with the application layer to execute the relevant application functions in the application layer.

[0136] Optionally, if the two are inconsistent, it is determined that there is an error and a corresponding alarm message needs to be output, such as by voice reminder, image display, etc. Optionally, the step of obtaining the original protocol content input by the user and determining the content format corresponding to the original protocol content can also be re-executed.

[0137] In this embodiment, by comparing the objective function relationship with the analytical function relationship, when the two are consistent, the application function is run normally, and when they are inconsistent, an alarm message is output, thereby avoiding the occurrence of protocol errors.

[0138] In addition, to assist in understanding the overall process of this application, examples are given below.

[0139] For example, Figure 4 As shown, before entering the communication protocol, the user can choose different ways to input. The data input box of the device receives the original protocol content entered by the user. When the content format of the original protocol content is a data format, the data can be divided to generate coordinates. That is, all protocol version contents in the original protocol content are classified and hierarchical, and the first coordinate is generated based on the obtained first module protocol data and the number of modules at different levels. Then change the first coordinate, such as multiplying it by a determinant matrix A on the left to generate a new coordinate, and exchange the appropriate vertical coordinate Y coordinate, that is, stagger the first coordinate and perform a left multiplication transformation, and use the new coordinate obtained as the second coordinate. Generate a new relationship, generate the converted protocol equation, and then perform the underlying analysis, through the determinant inverse matrix A -1 Perform restoration processing to generate the correct protocol equation, i.e., the objective function relationship. Then convert it into a Json file for export. Optionally, when the content format of the original protocol content is a file format, determine to import an existing file, and perform underlying parsing of the file to generate a protocol equation, i.e., a parsing function relationship. When the generated protocol equation is consistent with the generated correct protocol equation, the parsing function relationship can be used to interact with the application layer to execute related application functions.

[0140] In addition, the present application also provides a communication protocol dynamic generation device, referring to Figure 5 , the communication protocol dynamic generation device includes:

[0141] The acquisition unit A10 is used to acquire the original protocol content input by the user into the communication protocol generation software, and determine the content format corresponding to the original protocol content, wherein the content format includes the data format;

[0142] The determination unit A20 is used to determine all protocol version contents in the original protocol content when the content format is a data format, and classify all protocol version contents to obtain multiple categories of protocol version contents;

[0143] The division unit A30 is used to perform hierarchical division processing on the protocol version contents of multiple categories to obtain the first module protocol data of different hierarchies;

[0144] The output unit A40 is used to determine the target function relationship that satisfies all protocol version contents according to the number of modules at different levels added and the first module protocol data at different levels, and convert the target function relationship into a target file for output.

[0145] In one embodiment, the division unit A30 is used to:

[0146] Performing hierarchical division processing on the protocol version contents belonging to the same category, and taking the protocol version contents belonging to the same category as the first module protocol data of the first layer;

[0147] According to different preset application functions, the protocol version contents belonging to the same category are divided into sub-levels to obtain first module protocol data of at least one sub-level.

[0148] In one embodiment, the output unit A40 is used to:

[0149] According to the added number of modules at different levels and the first module protocol data at different levels, the number of modules and the first module protocol data belonging to the same level are determined;

[0150] The number of modules belonging to the same level is associated with the first module protocol data to generate a first coordinate, and the objective function relationship is determined according to the first coordinate, wherein the horizontal coordinate of the first coordinate is the first module protocol data, and the vertical coordinate of the first coordinate is the number of modules.

[0151] In one embodiment, the output unit A40 is used to:

[0152] Perform linear regression processing on all first coordinates at the same level to generate the original function relationship;

[0153] The objective function relationship is determined based on the original function relationship.

[0154] In one embodiment, the output unit A40 is used to:

[0155] All first coordinates of the same level are arranged in a staggered manner to obtain the first determinant matrix;

[0156] Performing a left multiplication transformation process on the first determinant matrix according to a preset determinant matrix to obtain a second determinant matrix; wherein the value of the determinant matrix is ​​not equal to 0;

[0157] Determine a second coordinate after transforming the first coordinate based on the second row-column matrix;

[0158] The original functional relationship is updated according to the second coordinate to obtain an updated functional relationship;

[0159] Performing a comparison check of the first module protocol data and the module number according to the updated functional relationship;

[0160] If the comparison check passes, the second determinant is left-multiplied according to the inverse determinant matrix corresponding to the preset determinant matrix to obtain the restored first coordinate, and the updated function relationship is restored according to the restored first coordinate to obtain the target function relationship.

[0161] In one embodiment, the content format also includes a file format, and the acquisition unit A10 is used to:

[0162] When the content format is a file format, determine the original file containing the original protocol content;

[0163] Parse the original file to obtain a parsing function relationship corresponding to the original protocol content;

[0164] Execute the preset application function according to the analytical function relationship.

[0165] In one embodiment, the acquisition unit A10 is used to:

[0166] When the content format is a data format, determining the obtained objective function relationship and comparing it with the analytical function relationship;

[0167] If the objective function relation is consistent with the analytical function relation, the preset application function is executed according to the analytical function relation;

[0168] If the objective function relational expression is inconsistent with the analytical function relational expression, an alarm message is output, and the steps of obtaining the original protocol content input by the user into the communication protocol generation software and determining the content format corresponding to the original protocol content are executed.

[0169] The communication protocol dynamic generation device provided by the present application adopts the communication protocol dynamic generation method in the above embodiment, which can solve the technical problem of how to improve the reuse rate of software in the communication protocol generation link. Compared with the prior art, the beneficial effects of the communication protocol dynamic generation device provided by the present application are the same as the beneficial effects of the communication protocol dynamic generation method provided by the above embodiment, and other technical features in the communication protocol dynamic generation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0170] The present application provides a communication protocol dynamic generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication protocol dynamic generation method in the above-mentioned embodiment 1.

[0171] Reference below Figure 6 , which shows a schematic diagram of the structure of a communication protocol dynamic generation device suitable for implementing the embodiment of the present application. The communication protocol dynamic generation device in the embodiment of the present application may include but is not limited to mobile terminals such as wearable devices, mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The communication protocol dynamic generation device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0172] like Figure 6 As shown, the communication protocol dynamic generation device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the communication protocol dynamic generation device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the communication protocol dynamic generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a communication protocol dynamic generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0173] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0174] The communication protocol dynamic generation device provided by the present application adopts the communication protocol dynamic generation method in the above embodiment, which can solve the technical problem of how to improve the reuse rate of software in the communication protocol generation link. Compared with the prior art, the beneficial effects of the communication protocol dynamic generation device provided by the present application are the same as the beneficial effects of the communication protocol dynamic generation method provided by the above embodiment, and other technical features in the communication protocol dynamic generation device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0175] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0176] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0177] The present application provides a storage medium, which is a computer-readable storage medium, having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the communication protocol dynamic generation method in the above-mentioned embodiment.

[0178] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0179] The computer-readable storage medium may be included in the communication protocol dynamic generation device; or may exist independently without being assembled into the communication protocol dynamic generation device.

[0180] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the communication protocol dynamic generation device, the communication protocol dynamic generation device can execute the step flow in the communication protocol dynamic generation method.

[0181] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0184] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned communication protocol dynamic generation method, and can solve the technical problem of how to improve the reuse rate of software in the communication protocol generation link. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the communication protocol dynamic generation method provided by the above-mentioned embodiment, and will not be repeated here.

[0185] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned communication protocol dynamic generation method when executed by a processor.

[0186] The computer program product provided by the present application can solve the technical problem of how to improve the reuse rate of software in the communication protocol generation link. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the communication protocol dynamic generation method provided by the above embodiment, which will not be repeated here.

[0187] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for dynamically generating a communication protocol, characterized in that: The method comprises: Acquire the original protocol content input by the user into the communication protocol generation software, and determine the content format corresponding to the original protocol content, wherein the content format includes a data format; When the content format is a data format, determining all protocol version contents in the original protocol content, and classifying all the protocol version contents to obtain multiple categories of protocol version contents; Performing hierarchical division processing on the protocol version contents of multiple categories to obtain first module protocol data of different hierarchies; According to the number of modules at different levels added and the first module protocol data at different levels, determine the objective function relationship that satisfies the contents of all protocol versions, and convert the objective function relationship into a target file for output.

2. The method according to claim 1, characterized in that The step of hierarchically dividing the protocol version contents of the multiple categories to obtain the first module protocol data of different hierarchies includes: Performing hierarchical division processing on the protocol version contents belonging to the same category, and taking the protocol version contents belonging to the same category as the first module protocol data of the first layer; According to different preset application functions, the protocol version contents belonging to the same category are divided into sub-levels to obtain first module protocol data of at least one sub-level.

3. The method according to claim 1, characterized in that The step of determining the objective function relational expression satisfying the contents of all the protocol versions according to the number of modules at different levels added and the first module protocol data at different levels comprises: Determining the number of modules and the first module protocol data belonging to the same level according to the number of modules at different levels added and the first module protocol data at different levels; The number of modules belonging to the same level is associated with the first module protocol data to generate a first coordinate, and the objective function relationship is determined according to the first coordinate, wherein the horizontal coordinate of the first coordinate is the first module protocol data, and the vertical coordinate of the first coordinate is the number of modules.

4. The method according to claim 3, characterized in that The step of determining the objective function relational expression according to the first coordinate comprises: Perform linear regression processing on all first coordinates at the same level to generate the original function relationship; The target function relationship is determined according to the original function relationship.

5. The method according to claim 4, characterized in that The step of determining the target function relationship according to the original function relationship comprises: All first coordinates of the same level are arranged in a staggered manner to obtain the first determinant matrix; Performing a left multiplication transformation process on the first determinant matrix according to a preset determinant matrix to obtain a second determinant matrix; wherein the value of the determinant matrix is ​​not equal to 0; Determine a second coordinate after transforming the first coordinate based on the second row-column matrix; updating the original functional relationship according to the second coordinate to obtain an updated functional relationship; Performing a comparison check between the first module protocol data and the module number according to the updated functional relationship; If the comparison check passes, the second determinant is left-multiplied according to the inverse determinant matrix corresponding to the preset determinant matrix to obtain the restored first coordinate, and the updated function relationship is restored according to the restored first coordinate to obtain the target function relationship.

6. The method according to any one of claims 1 to 5, characterized in that: The content format also includes a file format. After the step of determining the content format corresponding to the original protocol content, the method further includes: When the content format is a file format, determining an original file containing the original protocol content; Parsing the original file to obtain an analytical function relationship corresponding to the original protocol content; The preset application function is executed according to the analytical function relationship.

7. The method according to claim 6, characterized in that The step of executing a preset application function according to the analytical function relationship comprises: When the content format is a data format, determining the obtained target function relationship formula and comparing it with the analytical function relationship formula; If the objective function relational expression is consistent with the analytical function relational expression, executing a preset application function according to the analytical function relational expression; If the objective function relational expression is inconsistent with the analytical function relational expression, an alarm message is outputted, and the steps of obtaining the original protocol content input by the user into the communication protocol generation software and determining the content format corresponding to the original protocol content are executed.

8. A communication protocol dynamic generation device, characterized in that: The communication protocol dynamic generation device comprises: An acquisition unit, used to acquire original protocol content input by a user into the communication protocol generation software, and determine a content format corresponding to the original protocol content, wherein the content format includes a data format; a determination unit, configured to determine, when the content format is a data format, all protocol version contents in the original protocol content, and classify all the protocol version contents to obtain multiple categories of protocol version contents; A division unit, used for performing hierarchical division processing on the protocol version contents of multiple categories to obtain first module protocol data of different hierarchies; The output unit is used to determine the objective function relationship that satisfies the contents of all the protocol versions according to the number of modules at different levels added and the first module protocol data at different levels, and convert the objective function relationship into a target file for output.

9. A communication protocol dynamic generation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for dynamically generating a communication protocol according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the communication protocol dynamic generation method according to any one of claims 1 to 7 are implemented.