A method and system for realizing cross-layer communication of intercom module based on Hongmeng system

By configuring and optimizing the development environment in the Hongmeng system, determining the data type and format, designing the communication protocol, and encapsulating it through the NAPI interface, the problem of unstable data transmission and resource occupation in cross-layer communication of the intercom module has been solved, and the system performance has been improved. and user experience.

CN118550841BActive Publication Date: 2024-10-15SHENZHEN AUGOO COMM EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411030581.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-15
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In the Hongmeng system, when the intercom module communicates across layers, data transmission is unstable and resources are occupied, which affects system performance and user experience. The protocol parsing efficiency is low, resulting in poor communication results.

Method used

By selecting the target Hongmeng development environment, configuring and debugging a qualified development environment, determining the data type and format between the underlying intercom module and the application, designing the communication protocol, and encapsulating the protocol through the NAPI interface so that the underlying module and application can call it. Conduct communication and performance testing to optimize the system.

Benefits of technology

Ensure system stability, performance and security, provide high-quality user experience, realize cross-layer communication between upper-layer applications and underlying modules, and optimize data transmission efficiency and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550841B_ABST
    Figure CN118550841B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of cross-layer communication, and discloses a method and system for implementing cross-layer communication of an intercom module based on a Hongmeng system, including the following steps: constructing a qualified Hongmeng development environment suitable for configuring and testing cross-layer communication of an intercom module, and designing a communication protocol in the qualified Hongmeng development environment, while defining a NAPI interface; encapsulating a target communication protocol through a NAPI interface to obtain a target communication system, and optimizing communication tests and performance tests on the target communication system to obtain a qualified target communication system. The present invention can achieve the purpose of cross-layer communication between upper-layer applications and underlying modules by encapsulating underlying intercom modules using upper-layer Hongmeng applications in a Hongmeng development environment in combination with NAPI interfaces, thereby ensuring the stability, performance, and security of the system and providing a high-quality user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cross-layer communication, and in particular to a method and system for implementing cross-layer communication of an intercom module based on the Hongmeng system. Background Art

[0002] Hongmeng system is a distributed operating system for the Internet of Things developed by Huawei. Based on Hongmeng system, applications can be developed to achieve seamless experience across devices. At the same time, the development of applications in Hongmeng system can improve development efficiency, simplify development process, and enhance user experience. Hongmeng system enables applications to communicate with the underlying intercom module, namely DMR\PDT intercom module, improve the performance, stability and user experience of the communication system, and make full use of the distributed capabilities and high security of Hongmeng system. When implementing cross-layer communication of intercom module in Hongmeng system, defining and encapsulating NAPI interface requires accurate understanding of the communication protocol between Hongmeng system and intercom module. Improper interface design may lead to unstable data transmission. A unified data format and communication protocol are required between intercom module and upper-layer application. The correctness and efficiency of protocol parsing directly affect the communication effect. In addition, the intercom module may occupy a large amount of system resources, which need to be reasonably managed and allocated to avoid affecting the normal operation of other applications. Therefore, a method and system for implementing cross-layer communication of intercom module based on Hongmeng system are proposed to better realize cross-layer communication of intercom module in Hongmeng system, ensure the stability, performance and security of the system, and provide high-quality user experience. Summary of the invention

[0003] The present invention overcomes the shortcomings of the prior art and provides a method and system for implementing cross-layer communication of an intercom module based on the Hongmeng system.

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

[0005] A first aspect of the present invention provides a method for implementing cross-layer communication of an intercom module based on a Hongmeng system, comprising the following steps:

[0006] Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment;

[0007] Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design the communication protocol between the underlying intercom module and the intercom application;

[0008] Based on the target communication protocol, define the NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application;

[0009] Conduct communication tests and performance tests on the target communication system, and evaluate and optimize the target communication system based on the test results.

[0010] Furthermore, in a preferred embodiment of the present invention, the target version of Hongmeng development environment is selected, and the target version of Hongmeng development environment is configured and debugged to obtain a qualified Hongmeng development environment, specifically:

[0011] Mark all development environments adapted to the Hongmeng system as the Hongmeng development environment to be selected, and select the most frequently used Hongmeng development environment to be selected as the development environment for realizing cross-layer communication of the intercom module, and mark it as the target Hongmeng development environment;

[0012] Determine the operating system version of the target Hongmeng development environment, mark it as the target operating system version, and download the version of the target Hongmeng development environment corresponding to the target operating system version from the official download website of the target Hongmeng development environment, mark it as the target version Hongmeng development environment;

[0013] In the target version of Hongmeng development environment, install the latest version of SDK, obtain a Hongmeng system simulator, and configure the target version of Hongmeng development environment with the latest version of SDK installed in the Hongmeng system simulator;

[0014] Search and download the target version of Hongmeng development environment's operating environment from the target version of Hongmeng development environment's official download website;

[0015] In the Hongmeng system simulator, create a blank project using the target Hongmeng development environment, obtain the root directory of the blank project, and save the operating environment of the target version of the Hongmeng development environment to the root directory of the blank project to obtain the configured target version of the Hongmeng development environment;

[0016] Performing a running error check on the configured target version of Hongmeng development environment to determine whether a running error occurs in the configured target version of Hongmeng development environment;

[0017] If not, the configured target version of the Hongmeng development environment will be marked as a qualified Hongmeng development environment. If so, a file repair tool will be obtained in the Hongmeng system simulator, and the file repair will be performed on the root directory of the configured target version of the Hongmeng development environment based on the frequency of use to obtain a qualified Hongmeng development environment.

[0018] Further, in a preferred embodiment of the present invention, the data type and data format to be transmitted between the underlying intercom module and the intercom application are determined, and the communication protocol between the underlying intercom module and the intercom application is designed, specifically:

[0019] In a qualified Hongmeng development environment, the underlying intercom module and intercom application that need to communicate across layers are preset and calibrated as the target underlying intercom module and target intercom application, where the underlying intercom module is the DMR\PDT intercom module;

[0020] Respectively obtain all data types supported by the target underlying intercom module and the target intercom application, and based on all data types supported by the target underlying intercom module and the target intercom application, determine all data types that need to be transmitted between the target underlying intercom module and the target intercom application, and mark them as target data types;

[0021] Determine all data formats supported by the qualified Hongmeng development environment and mark them as data formats to be selected. Among all data formats to be selected, obtain the data format to be selected that supports the target data type and mark it as the target data format;

[0022] Wherein, the target data format includes a data frame structure, an encoding method, and a state of a data field;

[0023] A blank communication protocol is preset, and a target data type and a target data format are imported into the blank communication protocol to obtain a target communication protocol.

[0024] Further, in a preferred embodiment of the present invention, the target communication protocol is based on the definition of the NAPI interface, and the target communication protocol is encapsulated through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application, specifically:

[0025] Based on the target data type in the target communication protocol, all NAPI interfaces that support the target data type are designed and labeled as target NAPI interfaces;

[0026] In different target NAPI interfaces, based on the target data format in the target communication protocol, define interface parameters of the target NAPI interface, wherein the interface parameters of the target NAPI interface include input parameters and output parameters;

[0027] In a qualified Hongmeng development environment, based on the target NAPI interface, create a NAPI module, wherein the NAPI module contains different target NAPI interfaces;

[0028] Based on the interface parameters of different target NAPI interfaces, corresponding interface parameter implementation functions are written on different target NAPI interfaces in the NAPI module to obtain the target NAPI module;

[0029] In a qualified Hongmeng development environment, register the target NAPI module, and obtain the interface of the target underlying intercom module and the interface of the target intercom application respectively, and mark them as the target underlying intercom module interface and the target intercom application interface;

[0030] The target NAPI module calls the target underlying intercom module interface and the target intercom application interface, so that the data output by the target underlying intercom module can be received by the target intercom application, and the target communication system is obtained.

[0031] Furthermore, in a preferred embodiment of the present invention, the communication test and performance test are performed on the target communication system, and the target communication system is evaluated and optimized based on the test results, specifically:

[0032] In the Hongmeng system simulator, configure the log for communication testing, mark it as communication log, and obtain the performance monitoring tool at the same time;

[0033] Obtaining boundary conditions that the target communication system can withstand, marking them as tolerable boundary conditions, running the target communication system to perform communication testing, and judging in real time through the communication log whether interface parameters in all target NAPI interfaces in the target NAPI module are maintained within preset thresholds under the tolerable boundary conditions;

[0034] If yes, the target communication system is marked as a preliminary qualified target communication system;

[0035] If not, the target NAPI interface whose interface parameters cannot be maintained within the preset threshold under the tolerable boundary conditions is marked as a type of abnormal NAPI interface, the source file of the type of abnormal NAPI interface is obtained, and the abnormal source file is located in the source file of the type of abnormal NAPI interface based on the communication log;

[0036] Obtain a big data network, retrieve a repair solution for the abnormal source file based on the big data network, and introduce an exception capture mechanism in all target NAPI interfaces in the target NAPI module;

[0037] The abnormal capture mechanism integrates a repair solution for abnormal source files. When the target communication system is running, the target NAPI interface is captured in real time through the abnormal capture mechanism, so that the interface parameters of all target NAPI interfaces in the target NAPI module are maintained within the preset threshold under the tolerable boundary conditions.

[0038] Perform performance testing on the preliminarily qualified target communication system, and optimize the performance of the preliminarily qualified target communication system based on the performance test results.

[0039] Further, in a preferred embodiment of the present invention, the performance test is performed on the preliminary qualified target communication system, and based on the performance test result, the performance of the preliminary qualified target communication system is optimized, specifically:

[0040] Obtain the maximum load that the preliminary qualified target communication system can bear, mark it as the maximum tolerable load, and monitor the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load through performance monitoring tools in the Hongmeng system simulator;

[0041] Preset a standard memory utilization and a standard CPU utilization of the preliminary qualified target communication system under the maximum tolerable load, and mark them as the maximum memory utilization and the maximum CPU utilization; if the memory utilization and the CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization, then mark the preliminary qualified target communication system as a qualified target communication system;

[0042] If the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load are respectively greater than the maximum memory utilization or the maximum CPU utilization, a cache mechanism is introduced into the preliminary qualified target communication system, wherein the cache mechanism can reduce the frequency of the target NAPI module in the preliminary qualified target communication system calling the target underlying intercom module interface and the target intercom application interface for data transmission, so that the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization.

[0043] The second aspect of the present invention further provides a cross-layer communication system for implementing an intercom module based on the Hongmeng system, the cross-layer communication system comprising a memory and a processor, the memory storing a cross-layer communication method, and when the cross-layer communication method is executed by the processor, the following steps are implemented:

[0044] Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment;

[0045] Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design the communication protocol between the underlying intercom module and the intercom application;

[0046] Based on the target communication protocol, define the NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application;

[0047] Conduct communication tests and performance tests on the target communication system, and evaluate and optimize the target communication system based on the test results.

[0048] The present invention solves the technical defects existing in the background technology, and the present invention has the following beneficial effects: constructing a qualified Hongmeng development environment suitable for cross-layer communication configuration and testing of the intercom module, and designing the communication protocol in the qualified Hongmeng development environment, and defining the NAPI interface at the same time; encapsulating the target communication protocol through the NAPI interface to obtain the target communication system, and optimizing the communication test and performance test of the target communication system to obtain a qualified target communication system. The present invention can achieve the purpose of cross-layer communication between the upper-layer application and the underlying module by using the upper-layer Hongmeng application in the Hongmeng development environment in combination with the NAPI interface to encapsulate the underlying intercom module, thereby ensuring the stability, performance and security of the system and providing a high-quality user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] 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 some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A flow chart of a method for implementing cross-layer communication of an intercom module based on the Hongmeng system is shown;

[0051] Figure 2 A flow chart of a method for performing communication testing and performance testing on a target communication system is shown;

[0052] Figure 3 A program view of a cross-layer communication system for an intercom module based on the Hongmeng system is shown. DETAILED DESCRIPTION

[0053] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0055] Figure 1 A flowchart of a method for implementing cross-layer communication of an intercom module based on the Hongmeng system is shown, including the following steps:

[0056] S102: Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment;

[0057] S104: Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design a communication protocol between the underlying intercom module and the intercom application;

[0058] S106: Based on the target communication protocol, define a NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application;

[0059] S108: Perform communication test and performance test on the target communication system, and evaluate and optimize the target communication system based on the test results.

[0060] Furthermore, in a preferred embodiment of the present invention, the target version of Hongmeng development environment is selected, and the target version of Hongmeng development environment is configured and debugged to obtain a qualified Hongmeng development environment, specifically:

[0061] Mark all development environments adapted to the Hongmeng system as the Hongmeng development environment to be selected, and select the most frequently used Hongmeng development environment to be selected as the development environment for realizing cross-layer communication of the intercom module, and mark it as the target Hongmeng development environment;

[0062] Determine the operating system version of the target Hongmeng development environment, mark it as the target operating system version, and download the version of the target Hongmeng development environment corresponding to the target operating system version from the official download website of the target Hongmeng development environment, mark it as the target version Hongmeng development environment;

[0063] In the target version of Hongmeng development environment, install the latest version of SDK, obtain a Hongmeng system simulator, and configure the target version of Hongmeng development environment with the latest version of SDK installed in the Hongmeng system simulator;

[0064] Search and download the target version of Hongmeng development environment's operating environment from the target version of Hongmeng development environment's official download website;

[0065] In the Hongmeng system simulator, create a blank project using the target Hongmeng development environment, obtain the root directory of the blank project, and save the operating environment of the target version of the Hongmeng development environment to the root directory of the blank project to obtain the configured target version of the Hongmeng development environment;

[0066] Performing a running error check on the configured target version of Hongmeng development environment to determine whether a running error occurs in the configured target version of Hongmeng development environment;

[0067] If not, the configured target version of the Hongmeng development environment will be marked as a qualified Hongmeng development environment. If so, a file repair tool will be obtained in the Hongmeng system simulator, and the file repair will be performed on the root directory of the configured target version of the Hongmeng development environment based on the frequency of use to obtain a qualified Hongmeng development environment.

[0068] It should be noted that the realization of cross-layer communication of the intercom module requires the combined analysis of the underlying intercom module and the upper-layer application, and the combined analysis of the two needs to be carried out in the Hongmeng development environment. In the Hongmeng development environment, software, modules and other firmware can be developed, configured and tested. There are many types of Hongmeng development environments, including but not limited to DevEco Studio. The most frequently used Hongmeng development environment is relatively stable and has more complete functions, so it is selected to obtain the target Hongmeng development environment. There may be different versions of the target Hongmeng development environment. It is necessary to determine the version and download the corresponding version of the target Hongmeng development environment on the official website to obtain the target version of the Hongmeng development environment for development and configuration. SDK is a tool for configuring the development environment. After obtaining the target version of the Hongmeng development environment, the corresponding SDK needs to be installed to make the development environment work, and the Hongmeng system simulator is the carrier of the development environment. The development environment needs to be configured with SDK and installed on the simulator to realize the development and configuration of the software. The development environment is only for software development. To realize the software testing function, it is necessary to combine the operating environment with the development environment. Therefore, the corresponding version of the operating environment is also downloaded from the official website, and the operating environment is saved in the root directory of the development environment in the simulator to combine the operating environment with the development environment to obtain the configured target version of the Hongmeng development environment. After obtaining the configured target version of the Hongmeng development environment, it is necessary to perform error troubleshooting. The configured target version of the Hongmeng development environment with running errors cannot perform software testing and other functions. If a running error is found after error troubleshooting, the erroneous files need to be repaired in the root directory to obtain a qualified Hongmeng development environment.

[0069] Further, in a preferred embodiment of the present invention, the data type and data format to be transmitted between the underlying intercom module and the intercom application are determined, and the communication protocol between the underlying intercom module and the intercom application is designed, specifically:

[0070] In a qualified Hongmeng development environment, the underlying intercom module and intercom application that need to communicate across layers are preset and calibrated as the target underlying intercom module and target intercom application, where the underlying intercom module is the DMR\PDT intercom module;

[0071] Respectively obtain all data types supported by the target underlying intercom module and the target intercom application, and based on all data types supported by the target underlying intercom module and the target intercom application, determine all data types that need to be transmitted between the target underlying intercom module and the target intercom application, and mark them as target data types;

[0072] Determine all data formats supported by the qualified Hongmeng development environment and mark them as data formats to be selected. Among all data formats to be selected, obtain the data format to be selected that supports the target data type and mark it as the target data format;

[0073] Wherein, the target data format includes a data frame structure, an encoding method, and a state of a data field;

[0074] A blank communication protocol is preset, and a target data type and a target data format are imported into the blank communication protocol to obtain a target communication protocol.

[0075] It should be noted that the upper layer application, i.e. the target intercom application, is preset, and the underlying intercom module, i.e. the DMR\PDT intercom module, is preset. Data transmission is required between the upper layer application and the underlying intercom structure to achieve the purpose of cross-layer communication. The data type that can be transmitted between the upper layer application and the underlying intercom structure is determined. To achieve cross-layer communication, it is necessary to first determine the data type of the transmitted data, i.e. the target data type, and determine the target data format, because not all data formats may be suitable for transmitting data of the target data type. Based on the target data type and the target data format, the target communication protocol can be constructed. The communication protocol is a set of rules and standards established in a computer network to achieve data exchange. Different data transmission rules and standards are different, which are determined by the data type and data format.

[0076] Further, in a preferred embodiment of the present invention, the target communication protocol is based on the definition of the NAPI interface, and the target communication protocol is encapsulated through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application, specifically:

[0077] Based on the target data type in the target communication protocol, all NAPI interfaces that support the target data type are designed and labeled as target NAPI interfaces;

[0078] In different target NAPI interfaces, based on the target data format in the target communication protocol, define interface parameters of the target NAPI interface, wherein the interface parameters of the target NAPI interface include input parameters and output parameters;

[0079] In a qualified Hongmeng development environment, based on the target NAPI interface, create a NAPI module, wherein the NAPI module contains different target NAPI interfaces;

[0080] Based on the interface parameters of different target NAPI interfaces, corresponding interface parameter implementation functions are written on different target NAPI interfaces in the NAPI module to obtain the target NAPI module;

[0081] In a qualified Hongmeng development environment, register the target NAPI module, and obtain the interface of the target underlying intercom module and the interface of the target intercom application respectively, and mark them as the target underlying intercom module interface and the target intercom application interface;

[0082] The target NAPI module calls the target underlying intercom module interface and the target intercom application interface, so that the data output by the target underlying intercom module can be received by the target intercom application, and the target communication system is obtained.

[0083] It should be noted that the NAPI interface is an API for creating and managing local (C / C++) extensions in the Node.js environment. NAPI provides a set of stable, cross-version interfaces that allow developers to write code in C or C++ and compile it into modules that can be directly called by Node.js. The NAPI interface can be used to call the upper-layer application to the underlying intercom module. The underlying intercom module outputs data, and the data passes through the NAPI interface and is transmitted to the upper-layer application for reception, thereby achieving the purpose of cross-layer communication. There may be multiple NAPI interfaces, and different NAPI interfaces are used to transmit different data. All NAPI interfaces are combined, and a module integrating all NAPI interfaces is created in the development environment, namely the target NAPI module. The target NAPI module needs to be registered in a qualified Hongmeng development environment before it can be applied. The interfaces called by the target NAPI module are the target underlying intercom module interface and the target intercom application interface. After calling the target underlying intercom module interface and the target intercom application interface, the target communication system is obtained. The target communication system can realize the linkage of the target NAPI module, the target underlying intercom module interface and the target intercom application interface to achieve the purpose of cross-layer data communication.

[0084] Figure 2 A flow chart of a method for performing communication test and performance test on a target communication system is shown, comprising the following steps:

[0085] S202: performing a communication test on the target communication system within an acceptable boundary condition, and classifying the target communication system based on the communication test result;

[0086] S204: Correct a class of abnormal NAPI interfaces so that all target communication systems are preliminarily qualified target communication systems;

[0087] S206: Perform a performance test on the preliminarily qualified target communication system, and optimize the performance of the preliminarily qualified target communication system based on the performance test result.

[0088] Furthermore, in a preferred embodiment of the present invention, the communication test is performed on the target communication system within the tolerable boundary conditions, and the target communication system is classified based on the communication test result, specifically:

[0089] In the Hongmeng system simulator, configure the log for communication testing, mark it as communication log, and obtain the performance monitoring tool at the same time;

[0090] Obtaining boundary conditions that the target communication system can withstand, marking them as tolerable boundary conditions, running the target communication system to perform communication testing, and judging in real time through the communication log whether interface parameters in all target NAPI interfaces in the target NAPI module are maintained within preset thresholds under the tolerable boundary conditions;

[0091] If yes, the target communication system is marked as a preliminary qualified target communication system;

[0092] It should be noted that logs are a series of events and activity information recorded during the operation of computer systems and applications. Log files are usually used to monitor, debug, analyze and audit the behavior of systems and applications. The boundary conditions are extreme input conditions, including maximum and minimum loads, etc. Within the tolerable boundary conditions, the target communication system is tested for communication to determine whether it will crash. To determine whether it has crashed, the communication log can be used to analyze whether the interface parameters in all target NAPI interfaces in the target NAPI module are maintained within the preset thresholds under the tolerable boundary conditions. When the interface parameters are not within the preset thresholds, communication stops, communication errors, etc. may occur. When the interface parameters are within the preset thresholds, it is proved that there is no abnormality in the operation, and a preliminary qualified target communication system is obtained.

[0093] Furthermore, in a preferred embodiment of the present invention, the correction of a class of abnormal NAPI interfaces so that all target communication systems are preliminarily qualified target communication systems is specifically as follows:

[0094] If not, the target NAPI interface whose interface parameters cannot be maintained within the preset threshold under the tolerable boundary conditions is marked as a type of abnormal NAPI interface, the source file of the type of abnormal NAPI interface is obtained, and the abnormal source file is located in the source file of the type of abnormal NAPI interface based on the communication log;

[0095] Obtain a big data network, retrieve a repair solution for the abnormal source file based on the big data network, and introduce an exception capture mechanism in all target NAPI interfaces in the target NAPI module;

[0096] The abnormal capture mechanism integrates a repair solution for abnormal source files. When the target communication system is running, the target NAPI interface is captured in real time through the abnormal capture mechanism, so that the interface parameters of all target NAPI interfaces in the target NAPI module are maintained within the preset threshold under the tolerable boundary conditions.

[0097] It should be noted that when the interface parameters are not within the preset threshold, the corresponding interface needs to be marked as a type of abnormal NAPI interface. At this time, both the input and output data of the interface are abnormal. The reason for the exception is that there is a fault in the source file corresponding to the interface. The location of the source file in the root directory can be located through the communication log and marked as an abnormal source file. The exception capture mechanism is a mechanism to ensure that the system will not crash when an exception occurs and give a reasonable error prompt. The repair plan for the abnormal source file is also integrated in the exception capture mechanism. When an abnormal source file is produced, the repair plan for the abnormal source file will be output to prevent the system from crashing. The repair plan for the abnormal source file is retrieved from the big data network. The big data network is a database that stores various different plans.

[0098] Further, in a preferred embodiment of the present invention, the performance test is performed on the preliminary qualified target communication system, and based on the performance test result, the performance of the preliminary qualified target communication system is optimized, specifically:

[0099] Obtain the maximum load that the preliminary qualified target communication system can bear, mark it as the maximum tolerable load, and monitor the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load through performance monitoring tools in the Hongmeng system simulator;

[0100] Preset a standard memory utilization and a standard CPU utilization of the preliminary qualified target communication system under the maximum tolerable load, and mark them as the maximum memory utilization and the maximum CPU utilization; if the memory utilization and the CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization, then mark the preliminary qualified target communication system as a qualified target communication system;

[0101] If the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load are respectively greater than the maximum memory utilization or the maximum CPU utilization, a cache mechanism is introduced into the preliminary qualified target communication system, wherein the cache mechanism can reduce the frequency of the target NAPI module in the preliminary qualified target communication system calling the target underlying intercom module interface and the target intercom application interface for data transmission, so that the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization.

[0102] It should be noted that, since the simulator simulates all the performance of the computer, the simulator also simulates the performance of the CPU and the performance of the memory in the preliminary qualified target communication system. The CPU performance and memory performance refer to the CPU utilization and memory utilization. If the CPU utilization and memory utilization are small, it proves that the communication performance of the preliminary qualified target communication system is strong, otherwise it is weak. The performance monitoring tool can test the CPU utilization and memory utilization in the preliminary qualified target communication system. When the CPU utilization and memory utilization are respectively less than the maximum memory utilization and the maximum CPU utilization, the preliminary qualified target communication system is calibrated as a qualified target communication system; otherwise, a cache mechanism needs to be introduced. The cache mechanism can reduce frequent data reading and writing operations, that is, control the target NAPI module to reduce the call rate of the upper-layer application and the underlying intercom module, so as to achieve the purpose of improving the performance of the preliminary qualified target communication system and obtain a qualified target communication system.

[0103] In addition, the method for implementing cross-layer communication of an intercom module based on the Hongmeng system further includes the following steps:

[0104] After obtaining a qualified target communication system, run the qualified target communication system in a qualified Hongmeng development environment, and monitor the data transmission efficiency between the target underlying intercom module and the target intercom application, and mark it as the data transmission efficiency to be analyzed;

[0105] Preset a data transmission efficiency standard threshold, and determine whether the data transmission efficiency to be analyzed is maintained within the data transmission efficiency standard threshold;

[0106] If so, evaluating the qualified target communication system as a secondary qualified target communication system;

[0107] If not, introducing a data compression mechanism in the target NAPI module of the qualified target communication system, and activating the data compression mechanism during the operation of the qualified target communication system;

[0108] If the data transmission efficiency to be analyzed is still not maintained within the standard threshold of the data transmission efficiency after the data compression mechanism is activated, the data to be transmitted will be packetized, and the packetized data to be transmitted will be classified and transmitted during the operation of the qualified target communication system, so that the data transmission efficiency to be analyzed is maintained within the standard threshold of the data transmission efficiency.

[0109] It should be noted that when the qualified target communication system is running, since the target underlying intercom module communicates across layers with the target intercom application, the communication efficiency is equal to the data transmission efficiency. If the data transmission efficiency is low, it will affect the communication effect, so it is necessary to analyze and optimize the data transmission efficiency of the qualified target communication system. The data compression mechanism can compress the transmitted data, reduce network bandwidth occupancy, and improve transmission efficiency; and the packet processing of the transmitted data can divide a large amount of data into small data packets, reduce the frequency and overhead of network communication, and improve data transmission efficiency.

[0110] like Figure 3 As shown, the second aspect of the present invention further provides a cross-layer communication system for an intercom module based on the Hongmeng system, the cross-layer communication system includes a memory 31 and a processor 32, the memory 31 stores a cross-layer communication method, and when the cross-layer communication method is executed by the processor 32, the following steps are implemented:

[0111] Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment;

[0112] Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design the communication protocol between the underlying intercom module and the intercom application;

[0113] Based on the target communication protocol, define the NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application;

[0114] Conduct communication tests and performance tests on the target communication system, and evaluate and optimize the target communication system based on the test results.

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

Claims

1. A method for implementing cross-layer communication of an intercom module based on the Hongmeng system, characterized in that: The following steps are involved: Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment; Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design the communication protocol between the underlying intercom module and the intercom application; Based on the target communication protocol, define the NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application; Conduct communication tests and performance tests on the target communication system, and evaluate and optimize the target communication system based on the test results; The selected target version of Hongmeng development environment, and the configuration and debugging of the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment are specifically as follows: Mark all development environments adapted to the Hongmeng system as the Hongmeng development environment to be selected, and select the most frequently used Hongmeng development environment to be selected as the development environment for realizing cross-layer communication of the intercom module, and mark it as the target Hongmeng development environment; Determine the operating system version of the target Hongmeng development environment, mark it as the target operating system version, and download the version of the target Hongmeng development environment corresponding to the target operating system version from the official download website of the target Hongmeng development environment, mark it as the target version Hongmeng development environment; In the target version of Hongmeng development environment, install the latest version of SDK, obtain a Hongmeng system simulator, and configure the target version of Hongmeng development environment with the latest version of SDK installed in the Hongmeng system simulator; Search and download the target version of Hongmeng development environment's operating environment from the target version of Hongmeng development environment's official download website; In the Hongmeng system simulator, create a blank project using the target Hongmeng development environment, obtain the root directory of the blank project, and save the operating environment of the target version of the Hongmeng development environment to the root directory of the blank project to obtain the configured target version of the Hongmeng development environment; Performing a running error check on the configured target version of Hongmeng development environment to determine whether a running error occurs in the configured target version of Hongmeng development environment; If not, the configured target version of Hongmeng development environment is marked as a qualified Hongmeng development environment. If so, a file repair tool is obtained in the Hongmeng system simulator, and the file repair is performed on the root directory of the configured target version of Hongmeng development environment based on the frequency of use and the file repair tool to obtain a qualified Hongmeng development environment; The communication test and performance test are performed on the target communication system, and the target communication system is evaluated and optimized based on the test results, specifically: In the Hongmeng system simulator, configure the log for communication testing, mark it as communication log, and obtain the performance monitoring tool at the same time; Obtaining boundary conditions that the target communication system can withstand, marking them as tolerable boundary conditions, running the target communication system to perform communication testing, and judging in real time through the communication log whether interface parameters in all target NAPI interfaces in the target NAPI module are maintained within preset thresholds under the tolerable boundary conditions; If yes, the target communication system is marked as a preliminary qualified target communication system; If not, the target NAPI interface whose interface parameters cannot be maintained within the preset threshold under the tolerable boundary conditions is marked as a type of abnormal NAPI interface, the source file of the type of abnormal NAPI interface is obtained, and the abnormal source file is located in the source file of the type of abnormal NAPI interface based on the communication log; Obtain a big data network, retrieve a repair solution for the abnormal source file based on the big data network, and introduce an exception capture mechanism in all target NAPI interfaces in the target NAPI module; The abnormal capture mechanism integrates a repair solution for abnormal source files. When the target communication system is running, the target NAPI interface is captured in real time through the abnormal capture mechanism, so that the interface parameters of all target NAPI interfaces in the target NAPI module are maintained within the preset threshold under the tolerable boundary conditions. Perform performance tests on the preliminarily qualified target communication systems, and optimize the performance of the preliminarily qualified target communication systems based on the performance test results; The performing of a performance test on the initially qualified target communication system and optimizing the performance of the initially qualified target communication system based on the performance test result is specifically as follows: Obtain the maximum load that the preliminary qualified target communication system can bear, mark it as the maximum tolerable load, and monitor the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load through performance monitoring tools in the Hongmeng system simulator; Preset a standard memory utilization and a standard CPU utilization of the preliminary qualified target communication system under the maximum tolerable load, and mark them as the maximum memory utilization and the maximum CPU utilization; if the memory utilization and the CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization, then mark the preliminary qualified target communication system as a qualified target communication system; If the memory utilization and CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively greater than the maximum memory utilization or the maximum CPU utilization, a cache mechanism is introduced into the preliminary qualified target communication system, wherein the cache mechanism can reduce the frequency of the target NAPI module in the preliminary qualified target communication system calling the target underlying intercom module interface and the target intercom application interface for data transmission, so that the memory utilization and CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization; Among them, the method for implementing cross-layer communication of an intercom module based on the Hongmeng system also includes the following steps: After obtaining a qualified target communication system, run the qualified target communication system in a qualified Hongmeng development environment, and monitor the data transmission efficiency between the target underlying intercom module and the target intercom application, and mark it as the data transmission efficiency to be analyzed; Preset a data transmission efficiency standard threshold, and determine whether the data transmission efficiency to be analyzed is maintained within the data transmission efficiency standard threshold; If so, evaluating the qualified target communication system as a secondary qualified target communication system; If not, introducing a data compression mechanism in the target NAPI module of the qualified target communication system, and activating the data compression mechanism during the operation of the qualified target communication system; If the data transmission efficiency to be analyzed is still not maintained within the standard threshold of the data transmission efficiency after the data compression mechanism is activated, the data to be transmitted will be packetized, and the packetized data to be transmitted will be classified and transmitted during the operation of the qualified target communication system, so that the data transmission efficiency to be analyzed is maintained within the standard threshold of the data transmission efficiency.

2. According to the method for implementing cross-layer communication of intercom modules based on Hongmeng system described in claim 1, it is characterized in that: The method of determining the data type and data format to be transmitted between the underlying intercom module and the intercom application, and designing the communication protocol between the underlying intercom module and the intercom application, is specifically: In a qualified Hongmeng development environment, the underlying intercom module and intercom application that need to communicate across layers are preset and calibrated as the target underlying intercom module and target intercom application, where the underlying intercom module is the DMR\PDT intercom module; Respectively obtain all data types supported by the target underlying intercom module and the target intercom application, and based on all data types supported by the target underlying intercom module and the target intercom application, determine all data types that need to be transmitted between the target underlying intercom module and the target intercom application, and mark them as target data types; Determine all data formats supported by the qualified Hongmeng development environment and mark them as data formats to be selected. Among all data formats to be selected, obtain the data format to be selected that supports the target data type and mark it as the target data format; Wherein, the target data format includes a data frame structure, an encoding method, and a state of a data field; A blank communication protocol is preset, and a target data type and a target data format are imported into the blank communication protocol to obtain a target communication protocol.

3. According to the method for implementing cross-layer communication of intercom module based on Hongmeng system described in claim 1, it is characterized in that: The target communication protocol is based on the definition of the NAPI interface, and the target communication protocol is encapsulated through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application, specifically: Based on the target data type in the target communication protocol, all NAPI interfaces that support the target data type are designed and labeled as target NAPI interfaces; In different target NAPI interfaces, based on the target data format in the target communication protocol, define interface parameters of the target NAPI interface, wherein the interface parameters of the target NAPI interface include input parameters and output parameters; In a qualified Hongmeng development environment, based on the target NAPI interface, create a NAPI module, wherein the NAPI module contains different target NAPI interfaces; Based on the interface parameters of different target NAPI interfaces, corresponding interface parameter implementation functions are written on different target NAPI interfaces in the NAPI module to obtain the target NAPI module; In a qualified Hongmeng development environment, register the target NAPI module, and obtain the interface of the target underlying intercom module and the interface of the target intercom application respectively, and mark them as the target underlying intercom module interface and the target intercom application interface; The target NAPI module calls the target underlying intercom module interface and the target intercom application interface, so that the data output by the target underlying intercom module can be received by the target intercom application, and the target communication system is obtained.

4. A cross-layer communication system for intercom modules based on Hongmeng system, characterized in that: The cross-layer communication system includes a memory and a processor, wherein a cross-layer communication method program is stored in the memory, and when the cross-layer communication method program is executed by the processor, the steps of the cross-layer communication method according to any one of claims 1 to 3 are implemented: Select a target version of Hongmeng development environment, and configure and debug the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment; Determine the data type and data format that needs to be transmitted between the underlying intercom module and the intercom application, and design the communication protocol between the underlying intercom module and the intercom application; Based on the target communication protocol, define the NAPI interface, and encapsulate the target communication protocol through the NAPI interface, so that the target underlying intercom module and the target intercom application can be called by the target intercom application; Conduct communication tests and performance tests on the target communication system, and evaluate and optimize the target communication system based on the test results; The selected target version of Hongmeng development environment, and the configuration and debugging of the target version of Hongmeng development environment to obtain a qualified Hongmeng development environment are specifically as follows: Mark all development environments adapted to the Hongmeng system as the Hongmeng development environment to be selected, and select the most frequently used Hongmeng development environment to be selected as the development environment for realizing cross-layer communication of the intercom module, and mark it as the target Hongmeng development environment; Determine the operating system version of the target Hongmeng development environment, mark it as the target operating system version, and download the version of the target Hongmeng development environment corresponding to the target operating system version from the official download website of the target Hongmeng development environment, mark it as the target version Hongmeng development environment; In the target version of Hongmeng development environment, install the latest version of SDK, obtain a Hongmeng system simulator, and configure the target version of Hongmeng development environment with the latest version of SDK installed in the Hongmeng system simulator; Search and download the target version of Hongmeng development environment's operating environment from the target version of Hongmeng development environment's official download website; In the Hongmeng system simulator, create a blank project using the target Hongmeng development environment, obtain the root directory of the blank project, and save the operating environment of the target version of the Hongmeng development environment to the root directory of the blank project to obtain the configured target version of the Hongmeng development environment; Performing a running error check on the configured target version of Hongmeng development environment to determine whether a running error occurs in the configured target version of Hongmeng development environment; If not, the configured target version of Hongmeng development environment is marked as a qualified Hongmeng development environment. If so, a file repair tool is obtained in the Hongmeng system simulator, and the file repair is performed on the root directory of the configured target version of Hongmeng development environment based on the frequency of use and the file repair tool to obtain a qualified Hongmeng development environment; The communication test and performance test are performed on the target communication system, and the target communication system is evaluated and optimized based on the test results, specifically: In the Hongmeng system simulator, configure the log for communication testing, mark it as communication log, and obtain the performance monitoring tool at the same time; Obtaining boundary conditions that the target communication system can withstand, marking them as tolerable boundary conditions, running the target communication system to perform communication testing, and judging in real time through the communication log whether interface parameters in all target NAPI interfaces in the target NAPI module are maintained within preset thresholds under the tolerable boundary conditions; If yes, the target communication system is marked as a preliminary qualified target communication system; If not, the target NAPI interface whose interface parameters cannot be maintained within the preset threshold under the tolerable boundary conditions is marked as a type of abnormal NAPI interface, the source file of the type of abnormal NAPI interface is obtained, and the abnormal source file is located in the source file of the type of abnormal NAPI interface based on the communication log; Obtain a big data network, retrieve a repair solution for the abnormal source file based on the big data network, and introduce an exception capture mechanism in all target NAPI interfaces in the target NAPI module; The abnormal capture mechanism integrates a repair solution for abnormal source files. When the target communication system is running, the target NAPI interface is captured in real time through the abnormal capture mechanism, so that the interface parameters of all target NAPI interfaces in the target NAPI module are maintained within the preset threshold under the tolerable boundary conditions. Perform performance tests on the preliminarily qualified target communication systems, and optimize the performance of the preliminarily qualified target communication systems based on the performance test results; The performing of a performance test on the initially qualified target communication system and optimizing the performance of the initially qualified target communication system based on the performance test result is specifically as follows: Obtain the maximum load that the preliminary qualified target communication system can bear, mark it as the maximum tolerable load, and monitor the memory utilization and CPU utilization of the preliminary qualified target communication system running under the maximum tolerable load through performance monitoring tools in the Hongmeng system simulator; Preset a standard memory utilization and a standard CPU utilization of the preliminary qualified target communication system under the maximum tolerable load, and mark them as the maximum memory utilization and the maximum CPU utilization; if the memory utilization and the CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization, then mark the preliminary qualified target communication system as a qualified target communication system; If the memory utilization and CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively greater than the maximum memory utilization or the maximum CPU utilization, a cache mechanism is introduced into the preliminary qualified target communication system, wherein the cache mechanism can reduce the frequency of the target NAPI module in the preliminary qualified target communication system calling the target underlying intercom module interface and the target intercom application interface for data transmission, so that the memory utilization and CPU utilization of the preliminary qualified target communication system under the maximum tolerable load are respectively less than the maximum memory utilization and the maximum CPU utilization; Among them, the method for implementing cross-layer communication of an intercom module based on the Hongmeng system also includes the following steps: After obtaining a qualified target communication system, run the qualified target communication system in a qualified Hongmeng development environment, and monitor the data transmission efficiency between the target underlying intercom module and the target intercom application, and mark it as the data transmission efficiency to be analyzed; Preset a data transmission efficiency standard threshold, and determine whether the data transmission efficiency to be analyzed is maintained within the data transmission efficiency standard threshold; If so, evaluating the qualified target communication system as a secondary qualified target communication system; If not, introducing a data compression mechanism in the target NAPI module of the qualified target communication system, and activating the data compression mechanism during the operation of the qualified target communication system; If the data transmission efficiency to be analyzed is still not maintained within the standard threshold of the data transmission efficiency after the data compression mechanism is activated, the data to be transmitted will be packetized, and the packetized data to be transmitted will be classified and transmitted during the operation of the qualified target communication system, so that the data transmission efficiency to be analyzed is maintained within the standard threshold of the data transmission efficiency.