Method and system for dynamically loading communication module function extension

By constructing a dynamic loading trigger condition space and a collaborative adaptation function module, the problems of flexibility and stability in the functional expansion of the communication module are solved, and efficient functional expansion in complex environments is achieved.

CN121012745BActive Publication Date: 2025-12-26MICRONET UNION TECH (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511535195.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2025-12-26
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing methods for expanding the functionality of communication modules lack flexibility, making timely updates and expansions impossible. Furthermore, dynamic functional expansion methods lack comprehensive consideration of triggering conditions, leading to performance degradation and functional conflicts.

Method used

By constructing a dynamically loaded trigger condition space, collecting real-time operating data of the communication module and external scene data, generating a trigger condition matching dataset, filtering and adapting functional modules, and achieving collaborative adaptation and expansion of functional modules through functional interface docking, resource allocation and operating parameter adjustment.

Benefits of technology

It enables flexible, efficient, and stable expansion of the communication module's functions, improves its adaptability in complex environments, and avoids functional conflicts and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121012745B_ABST
    Figure CN121012745B_ABST
Patent Text Reader

Abstract

The application provides a communication module function extension method and system applying dynamic loading, relates to the technical field of communication, and first determines a dynamic loading trigger condition space containing function requirements, module resources and external environment trigger conditions, collects data to generate trigger condition matching data sets; then, filters adaptive function modules from a preset function module library, generates an adaptive function module set based on different trigger conditions matching corresponding information; then, performs cooperative adaptation processing on the adaptive function modules and the communication module to generate a cooperative adaptation result; dynamically injects modules based on the cooperative adaptation result and constructs a function extension calling architecture; and finally collects running interaction data to generate a communication module function extension running graph, so that flexible, efficient and stable extension of the communication module function can be realized, and the adaptability and competitiveness of the communication module are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a communication module function extension method and system applying dynamic loading. BACKGROUND

[0002] In the current rapid development of communication technology, communication modules, as the core components for realizing communication functions, are widely used in various intelligent terminal devices. With the continuous enrichment and complication of business scenarios, the functional requirements for communication modules are increasingly diversified and dynamic. The traditional communication module function extension method has many limitations.

[0003] On the one hand, the existing function extension usually adopts a static integration method, i.e., all possible function modules are fixed in the module during the design and manufacturing phase of the communication module. The above method leads to the inability to update and extend functions in a timely manner when facing new business requirements, lacking flexibility. For example, when a new communication protocol or business application appears, the statically integrated communication module needs to be re-designed and programmed, which has a long development cycle, high cost, and may affect the stability of existing functions.

[0004] On the other hand, although some dynamic function extension methods can achieve a certain degree of modular loading, they lack comprehensive consideration and precise matching of triggering conditions. They often only focus on a single factor, such as loading only based on user function requests, ignoring the resource status of the communication module itself and the changes in external communication scenarios. This may lead to forced loading of function modules in the case of insufficient resources or mismatched scenarios, causing problems such as module performance degradation and function conflicts, and cannot guarantee the stable operation and efficient function extension of the communication module in various complex environments. SUMMARY

[0005] In view of the above-mentioned problems, in combination with the first aspect of the present application, the embodiments of the present application provide a communication module function extension method applying dynamic loading, which comprises:

[0006] determining a dynamic loading triggering condition space, collecting communication module real-time running data and external scenario data based on the dynamic loading triggering condition space, generating a triggering condition matching data set, the dynamic loading triggering condition space containing function demand triggering conditions, module resource triggering conditions and external environment triggering conditions, the function demand triggering conditions corresponding to business function requests not covered by the communication module, the module resource triggering conditions corresponding to idle resource thresholds of the communication module, and the external environment triggering conditions corresponding to communication scenario change signals;

[0007] screening an adaptive function module corresponding to the trigger condition matching data set from a preset function module library, triggering a function requirement trigger condition matching function interface description information based on the trigger condition matching data set, triggering a resource requirement information based on a module resource trigger condition, triggering a scene adaptation information based on an external environment trigger condition, and generating an adaptive function module set;

[0008] cooperatively adapting each adaptive function module in the adaptive function module set with the communication module, connecting the communication module existing interface through the function interface description information, allocating the communication module idle resource based on the resource requirement information, adjusting the module running parameter in combination with the scene adaptation information, and generating a cooperative adaptation result;

[0009] based on the cooperative adaptation result, dynamically injecting the adaptive function module into the communication module running environment, constructing a calling link of the adaptive function module and the original function of the communication module, the calling link including a data interaction path, a function execution priority order and an exception transfer mechanism, and generating a function extension calling architecture;

[0010] based on the function extension calling architecture, collecting running interaction data of the adaptive function module and the original function of the communication module, extracting description information of the running flow, resource occupation and scene response effect of the extended function, and generating a communication module function extension running graph.

[0011] In still another aspect, the embodiments of the present application also provide a communication module function extension system applying dynamic loading, characterized in that, comprising:

[0012] a processor; a machine readable storage medium for storing machine executable instructions of the processor; wherein the processor is configured to execute the machine executable instructions to perform the above-mentioned communication module function extension method applying dynamic loading.

[0013] In still another aspect, the embodiments of the present application also provide a computer program product, the computer program product comprising machine executable instructions stored in a computer readable storage medium, a processor of a computer device reading the machine executable instructions from the computer readable storage medium, and the processor executing the machine executable instructions so that the computer device performs the above-mentioned communication module function extension method applying dynamic loading.

[0014] Based on the above aspects, by constructing a dynamic loading trigger condition space containing functional requirement trigger conditions, module resource trigger conditions and external environment trigger conditions, and based on this, collecting communication module real-time running data and external scene data to generate trigger condition matching data set, when filtering adaptive functional modules from the preset functional module library, respectively based on different trigger condition matching functional interface description information, resource requirement information and scene adaptation information, the adaptive functional modules and the communication module are cooperatively adapted and processed, through functional interface docking, resource allocation and running parameter adjustment, the cooperative adaptation result is generated, which effectively avoids functional conflict and resource waste, improves the stability and reliability of functional expansion. Based on the cooperative adaptation result, the adaptive functional modules are dynamically injected and the functional expansion calling architecture is constructed, the data interaction path, the functional execution priority order and the abnormal transfer mechanism are clarified, so that the communication module after functional expansion can run efficiently and orderly. Finally, the running interaction data is collected to generate a communication module functional expansion running graph, realizing flexible, efficient and stable expansion of the communication module function, and improving the adaptability of the communication module in complex and variable environment. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is the execution flow schematic diagram of the communication module functional expansion method provided by an embodiment of the application.

[0016] Figure 2 is the schematic diagram of exemplary hardware and software components of the communication module functional expansion system provided by an embodiment of the application. DETAILED DESCRIPTION

[0017] The application will be described in detail below with reference to the accompanying drawings, Figure 1 is the flow schematic diagram of the communication module functional expansion method provided by an embodiment of the application, and the communication module functional expansion method provided by an embodiment of the application will be described in detail below.

[0018] Step S110: determining a dynamic loading trigger condition space, collecting communication module real-time running data and external scene data based on the dynamic loading trigger condition space, and generating a trigger condition matching data set, the dynamic loading trigger condition space contains functional requirement trigger conditions, module resource trigger conditions and external environment trigger conditions, the functional requirement trigger conditions correspond to the business function requests not covered by the communication module, the module resource trigger conditions correspond to the idle resource threshold of the communication module, and the external environment trigger conditions correspond to the communication scene change signal.

[0019] In this embodiment, the core communication module in a general communication terminal is taken as the object, which is responsible for connecting the display unit, input unit, data storage unit and external network of the terminal and other components. First, the dynamic loading trigger condition space is determined, which is composed of three types of trigger conditions. The functional requirement trigger condition is for the service request that the module cannot currently implement, such as the encrypted data transmission request issued by the terminal user, which belongs to the uncovered service function request if the module does not integrate this function; the module resource trigger condition sets a threshold around the idle resources of the module, such as the number limits of idle memory, operation unit and unoccupied interface; the external environment trigger condition focuses on the changes of the communication scene, such as the change of the number of external devices connected to the module, or the fluctuation of the communication signal due to the change of the transmission distance.

[0020] Step S111: Collect the prior function extension records of the communication module, and extract the feature space of triggering function extension from the prior function extension records, which contains prior uncovered service function requests, prior module idle resource states and prior communication scene change information.

[0021] The prior function extension records of the core communication module of the general communication terminal are collected, which contain the triggering reason of each extension. The feature space of triggering function extension is extracted from the records, wherein the prior uncovered service function requests include the data compression transmission function request and the multi-protocol conversion function request proposed by the user before; the prior module idle resource state includes the idle memory capacity, the proportion of unused operation resources and the number of idle interfaces of the module at each extension; the prior communication scene change information includes the previous communication signal strength fluctuation, the network protocol switching from one type to another type, and the increase and decrease of the number of connected devices.

[0022] Step S112: Classify the feature space, and classify the prior uncovered service function requests into a functional requirement class space, the prior module idle resource states into a module resource class space, and the prior communication scene change information into an external environment class space.

[0023] The extracted feature space is divided by category, and all prior uncovered service function requests, such as data compression transmission and multi-protocol conversion requests, are classified into the functional requirement class space; all prior module idle resource state data, such as idle memory, operation resources and interface idle conditions at different time points, are classified into the module resource class space; and all prior communication scene change information, such as signal strength change, protocol switching and number of connected devices change, is classified into the external environment class space.

[0024] Step S113: constructing condition features of the function requirement trigger condition based on the function requirement class space, the function requirement trigger condition including a business function request type, a request frequency, and a request urgency, the business function request type corresponding to a category of uncovered business functions, the request frequency corresponding to a number of occurrences of the same request in a unit time, and the request urgency corresponding to a demand for real-time performance of the request.

[0025] The condition features of the function requirement trigger condition are constructed based on the function requirement class space. The business function request type is divided into categories according to uncovered business functions, such as a data security category (e.g., encrypted data transmission), a data processing category (e.g., data compression transmission), a protocol adaptation category (e.g., multi-protocol conversion), and the like, each category corresponding to a business function request type. The request frequency is a number of occurrences of the same request in a unit time, such as a number of occurrences of a certain type of request in a fixed time unit. The request urgency is determined according to the demand for real-time performance of the request, such as a higher demand for real-time performance of a data security category request than a data processing category request.

[0026] Step S1131: classifying the prior uncovered business function requests in the function requirement class space, dividing the prior uncovered business function requests into different categories according to business fields, each category corresponding to a business function request type, and determining a function description and an applicable scenario for each business function request type.

[0027] The prior uncovered business function requests in the function requirement class space are subdivided according to business fields. Requests for encrypted data transmission and data access permission control are divided into a data security category as a business function request type, the function description of which is to implement security protection processing in data transmission and access processes, and the applicable scenario of which is a business scenario involving sensitive data transmission. Requests for data compression transmission and data format conversion are divided into a data processing category, the function description of which is to optimize and format adapt processing of transmission data, and the applicable scenario of which is a business scenario with limited data transmission bandwidth. Requests for multi-protocol conversion and protocol version compatibility are divided into a protocol adaptation category, the function description of which is to implement conversion and compatibility processing between different communication protocols, and the applicable scenario of which is a business scenario of multi-device heterogeneous communication.

[0028] Step S1132: counting a number of occurrences of each business function request type in a unit time in the prior records, determining a division basis of the request frequency based on the counting result, associating the request frequency with the business function request type, and determining a typical request frequency range corresponding to different business function request types.

[0029] The number of occurrences of each service function request type in the prior record is counted per unit of time, such as the number of occurrences of data security class requests in the prior record per fixed time unit, based on the statistical results, it is found that the number of occurrences is at a medium level; the number of occurrences of data processing class requests is at a low level; the number of occurrences of protocol adaptation class requests is at a high level. Based on these statistical results, the division basis of request frequency is determined, and the request frequency is divided into three levels of low, medium and high, and then the levels are associated with the service function request type, and it is determined that the typical frequency range of data security class requests is medium, the frequency range of data processing class is low, and the frequency range of protocol adaptation class is high.

[0030] Step S1133: Analyze the demand of each service function request type corresponding to the business scenario for real-time, divide the request urgency into different request urgency levels, associate the request urgency level with the service function request type, determine the default request urgency of each service function request type, and each request urgency level corresponds to different real-time requirements.

[0031] The demand of each service function request type corresponding to the business scenario for real-time is analyzed, and the request urgency is divided into three levels of urgent, general and non-urgent. Among them, the data security class request, such as encrypted data transmission, involves data security guarantee, and has high real-time requirement, corresponding to the urgent level, which requires responding within a short time after the request is sent; the protocol adaptation class request, such as multi-protocol conversion, has medium real-time requirement, corresponding to the general level, which requires responding within a regular time; the data processing class request, such as data compression transmission, has low real-time requirement, corresponding to the non-urgent level, which allows responding within a long time. The above levels are associated with the service function request type to determine the default request urgency of each type.

[0032] Step S1134: Establish an association relationship table of service function request type, request frequency and request urgency, which records the request frequency range and default request urgency corresponding to each service function request type.

[0033] An association relationship table is established, and each service function request type is recorded by row in the table, and the request frequency range and default request urgency corresponding to each service function request type are filled in the corresponding columns. For example, the request frequency range corresponding to the data security class is medium, and the default request urgency is urgent; the request frequency range corresponding to the data processing class is low, and the default request urgency is non-urgent; the request frequency range corresponding to the protocol adaptation class is high, and the default request urgency is general.

[0034] Step S1135: Based on the association relationship table, set a trigger threshold for each service function request type, when the request frequency of actual service function request exceeds the corresponding trigger threshold and the request request urgency level reaches the corresponding level, the function demand trigger condition is triggered.

[0035] The trigger threshold is set for each business function request type based on the association table. For the data security class, the corresponding trigger threshold is set, when the actual data security class request frequency exceeds the trigger threshold, and the request emergency level is urgent, the function requirement trigger condition is triggered; for the protocol adaptation class, the corresponding trigger threshold is set, when the actual request frequency exceeds the value and the emergency level is general, the trigger condition is triggered; for the data processing class, the corresponding trigger threshold is set, when the actual request frequency exceeds the value and the emergency level is non-urgent, the trigger condition is triggered.

[0036] Step S1136: The division result of the business function request type, the association rule of the request frequency, the level construction of the request emergency level, and the trigger threshold are integrated to form the condition characteristics of the function requirement trigger condition.

[0037] The division result of the business function request type (such as the data security class, the data processing class, etc.), the association rule of the request frequency (such as the frequency range corresponding to each type), the level construction of the request emergency level (urgent, general, non-urgent, and the corresponding real-time requirement), and the set trigger threshold are integrated together to form the complete condition characteristics of the function requirement trigger condition.

[0038] Step S114: The condition characteristics of the module resource trigger condition are constructed based on the module resource class space, the module resource trigger condition includes the idle memory capacity, the idle operation resource, and the idle interface quantity, the idle memory capacity corresponds to the memory space not occupied by the communication module, the idle operation resource corresponds to the operation unit not used by the communication module, and the idle interface quantity corresponds to the external docking interface not occupied by the communication module.

[0039] The condition characteristics of the module resource trigger condition are constructed based on the module resource class space. The idle memory capacity refers to the memory space not occupied by the communication module at present, which needs to be able to accommodate the function module code and running data to be loaded; the idle operation resource refers to the operation unit not used in the module, which is used to process the operation task of the to-be-loaded module; the idle interface quantity refers to the external interface not connected with other devices or modules on the module, which is used for the connection between the to-be-loaded module and the external device.

[0040] Step S115: The condition characteristics of the external environment trigger condition are constructed based on the external environment class space, the external environment trigger condition includes the communication signal strength change, the network protocol type switching, and the connection device quantity change, the communication signal strength change corresponds to the fluctuation of the signal receiving power, the network protocol type switching corresponds to the change of the communication protocol, and the connection device quantity change corresponds to the increase or decrease of the number of terminal devices connected with the communication module.

[0041] The condition features of the external environment trigger condition are constructed based on the external environment class space. The communication signal strength change is embodied by the fluctuation of signal receiving power, such as a sudden drop or rise of signal receiving power from a stable state; the network protocol type switching refers to the change of the protocol used by the module communication, such as switching from one common network protocol to another common network protocol; and the connection device number change refers to the increase or decrease of the number of external terminal devices connected to the communication module.

[0042] Step S116: The condition features of the function requirement trigger condition, the module resource trigger condition and the external environment trigger condition are integrated to form the dynamic loading trigger condition space.

[0043] The condition features of the function requirement trigger condition, the module resource trigger condition and the external environment trigger condition constructed are integrated, and all feature parameters of the three types of conditions are summarized to form a complete dynamic loading trigger condition space. The dynamic loading trigger condition space covers various condition elements required for triggering function expansion.

[0044] Step S117: Based on each trigger condition in the dynamic loading trigger condition space, real-time running data of the communication module is collected, and the real-time running data and the external scene data are sorted according to the trigger condition categories to generate a trigger condition matching data set. The real-time running data includes current business function requests and current resource occupation states, and external scene data is collected, which includes current signal states, current protocol types and current connection device numbers.

[0045] Based on each trigger condition in the dynamic loading trigger condition space, real-time running data is collected by a monitoring module built in the module. The current business function request includes a user's current encryption data transmission request (data security type) and multi-protocol conversion request (protocol adaptation type); the current resource occupation state includes the memory capacity used by the current module, the occupied operation resource proportion and the number of used interfaces, and then the idle memory capacity, idle operation resource and idle interface number are calculated. At the same time, external scene data is collected by a signal monitoring unit, the current signal state includes the current signal receiving power and fluctuation, the current protocol type is the communication protocol used by the current module, and the current connection device number is the total number of external terminal devices connected to the module. The above real-time running data and external scene data are sorted according to the three types of trigger conditions of function requirement, module resource and external environment, respectively, to form a trigger condition matching data set.

[0046] Step S120: filtering an adaptive function module corresponding to the trigger condition matching data set from the preset function module library, triggering condition matching function interface description information based on the function requirement trigger condition in the trigger condition matching data set, triggering condition matching resource requirement information based on the module resource, triggering condition matching scene adaptation information based on the external environment, and generating an adaptive function module set.

[0047] The preset function module library stores a plurality of function modules for general communication terminal scenes, each module being associated with corresponding function interface description information, resource requirement information, and scene adaptation information. According to the trigger condition matching data set, the adaptive function modules are filtered in turn according to the function requirement, the module resource, and the external environment condition, and finally an adaptive function module set is generated.

[0048] Step S121: loading a preset function module library, the preset function module library storing a plurality of function modules, each function module being associated with function interface description information, resource requirement information, and scene adaptation information, the function interface description information including interface types and data interaction formats provided by the module, the resource requirement information including memory capacity and operation resource occupancy required for module operation, and the scene adaptation information including signal strength range, protocol type, and connection device quantity range applicable to the module.

[0049] The preset function module library is loaded through the storage access interface of the communication module, and the preset function module library includes an encrypted data transmission module, a multi-protocol conversion module, a data compression transmission module, a data format conversion module, and a plurality of function modules. Taking the encrypted data transmission module as an example, the interface type in the function interface description information thereof is a security interface, and the data interaction format is a specific format; the resource requirement information is the memory capacity and operation resource occupancy required for operation; and the applicable signal strength range in the scene adaptation information is medium and above signal reception power, the applicable protocol type includes a plurality of common protocols, and the applicable connection device quantity range is medium scale. The interface type in the function interface description information of the multi-protocol conversion module is a conversion interface, and the data interaction format is another specific format; the resource requirement information includes corresponding memory and operation resource requirements; and the applicable signal strength range in the scene adaptation information is a wide range, the applicable protocol type covers a plurality of mainstream protocols, and the applicable connection device quantity range is a wide scale.

[0050] Step S122: extracting first related data of a function requirement trigger condition from the trigger condition matching data set, comparing the first related data with function interface description information of each function module, filtering candidate function modules of which the interface type matches the current business function request type, generating a first candidate function module set, and the first related data including the current business function request type, the current request frequency, and the current request urgency.

[0051] The first related data is extracted from the trigger condition matching data set, the current service function request type is data security type (encrypted data transmission request) and protocol adaptation type (multi-protocol conversion request), the encrypted data transmission request and the multi-protocol conversion request each have a corresponding number of occurrences per unit time in the current request frequency, and the current request urgency is emergency and general respectively. Compare the above first related data with the function interface description information of each module in the preset function module library. The interface type of the encrypted data transmission module is security type, which matches the interface requirement of the data security type request; the interface type of the multi-protocol conversion module is conversion type, which matches the interface requirement of the protocol adaptation type request. The two modules are screened out to generate a first candidate function module set.

[0052] Step S123: Extract the second related data of the module resource trigger condition from the trigger condition matching data set, compare the second related data with the resource requirement information of each candidate function module in the first candidate function module set, screen out the candidate function modules whose resource requirements do not exceed the current idle resources, and generate a second candidate function module set. The second related data includes current idle memory capacity, current idle operation resources and current idle interface quantity.

[0053] The second related data is extracted from the trigger condition matching data set, and the current idle memory capacity, the current idle operation resources and the current idle interface quantity are all known data. Compare the above data with the resource requirement information of the encrypted data transmission module and the multi-protocol conversion module in the first candidate function module set. If the memory capacity, operation resource proportion and interface quantity required by the encrypted data transmission module do not exceed the current idle resources, and the resource requirement of the multi-protocol conversion module also does not exceed the current idle resources, both modules are retained to generate a second candidate function module set. If the resource requirement of one of the modules exceeds the current idle resources, the module is excluded, and only the modules whose resource requirements meet the conditions are retained in the second candidate function module set.

[0054] Step S124: Extract the third related data of the external environment trigger condition from the trigger condition matching data set, compare the third related data with the scene adaptation information of each candidate function module in the second candidate function module set, screen out the candidate function modules whose applicable scenes contain the current external environment state, and generate a third candidate function module set. The third related data includes current signal strength, current protocol type and current connection device quantity.

[0055] Extract the third relevant data from the trigger condition matching dataset, the current signal strength is medium, the current protocol type is a certain common protocol, and the current number of connected devices is medium scale. Compare the above data with the scene adaptation information of each module in the second candidate function module set. The applicable signal strength range of the encryption data transmission module is medium and above, the applicable protocol type contains the current protocol, and the applicable connection device quantity range is medium scale. The current external environment state is within its applicable scene. If the applicable signal strength range of the multi-protocol conversion module is wide, the applicable protocol type covers the current protocol, the applicable connection device quantity range is wide, and the current external environment state is also within its applicable scene, then both modules are retained, and the third candidate function module set is generated.

[0056] Step S125: Sort the matching degrees of each candidate function module in the third candidate function module set, and the sorting basis is the comprehensive result of the function interface matching degree, the resource demand matching degree and the scene adaptation matching degree. Select a preset number of candidate function modules with high ranking.

[0057] Step S1251: Set evaluation dimensions for the function interface matching degree, the resource demand matching degree and the scene adaptation matching degree respectively. The evaluation dimensions of the function interface matching degree include interface type matching rate and data format compatibility, the evaluation dimensions of the resource demand matching degree include memory demand satisfaction rate and operation resource demand satisfaction rate, and the evaluation dimensions of the scene adaptation matching degree include signal strength adaptation rate and protocol type matching rate.

[0058] Evaluation dimensions are set for the three matching degrees. The evaluation dimensions of the function interface matching degree include interface type matching rate and data format compatibility. The interface type matching rate measures the matching degree of the interface type of the candidate module and the current request type, and the data format compatibility measures the compatibility of the module data interaction format and the existing format. The evaluation dimensions of the resource demand matching degree include memory demand satisfaction rate and operation resource demand satisfaction rate, which respectively measure the matching of the module memory demand and operation resource demand with the current idle resources. The evaluation dimensions of the scene adaptation matching degree include signal strength adaptation rate and protocol type matching rate, which respectively measure the matching of the current signal strength and protocol type with the module applicable range.

[0059] Step S1252: Set a scoring standard for each evaluation dimension, give a corresponding score based on the degree of fit between the candidate function module and the trigger condition matching dataset, and the scoring result reflects the matching situation under this evaluation dimension.

[0060] For each evaluation dimension, specific scoring criteria are set. For interface type matching rate, if the candidate module interface type is completely consistent with the current business function request type, the highest score is given; if it is basically consistent but there are slight differences, a medium score is given; if the difference is large, the lowest score is given. For data format compatibility, if the module data interaction format is completely consistent with the existing format, the highest score is given; if it can be compatible through simple format conversion, a medium score is given; if it needs complex modification to be compatible, the lowest score is given. For memory requirement satisfaction rate, if the memory capacity required by the candidate module is much lower than the current free memory capacity, the highest score is given; if it is slightly lower than the current free memory capacity, a medium score is given; if it is close to the upper limit of the current free memory capacity, the lowest score is given. For operation resource requirement satisfaction rate, if the operation resource required by the module accounts for a much lower proportion of the current free operation resource, the highest score is given; if it accounts for a slightly lower proportion of the current free operation resource, a medium score is given; if it is close to the upper limit of the current free operation resource, the lowest score is given. For signal strength adaptation rate, if the current signal strength is in the middle interval of the module's applicable signal strength range, the highest score is given; if it is in the edge interval of the applicable range, a medium score is given; if it is close to the critical value of the applicable range, the lowest score is given. For protocol type matching rate, if the current protocol type is completely consistent with the module's applicable protocol type, the highest score is given; if the current protocol type belongs to the module's compatible protocol type, a medium score is given; if the module needs to be extended to support the current protocol type, the lowest score is given.

[0061] Step S1253: According to the core requirements of function expansion, weights are set for the matching degree of function interface, the matching degree of resource requirement, and the matching degree of scene adaptation. The matching degree of function interface has the highest weight, the matching degree of resource requirement has the second highest weight, and the matching degree of scene adaptation has the third highest weight.

[0062] According to the core requirements of communication module function expansion in a general communication terminal, the matching of function interface directly determines whether the module can achieve the target business function, so the weight of the matching degree of function interface is set to the highest; the matching of resource requirement determines whether the module can stably run on the module, so the weight is set to the second highest; the matching of scene adaptation affects the running effect of the module, so the weight is set to the third highest. For example, the weight proportion of the matching degree of function interface is fifty percent, the weight proportion of the matching degree of resource requirement is thirty percent, and the weight proportion of the matching degree of scene adaptation is twenty percent.

[0063] Step S1254: Based on the scores of each evaluation dimension and the corresponding weights, the comprehensive matching score of each candidate function module is calculated. The comprehensive matching score is the sum of the product of each evaluation dimension score and the corresponding weight.

[0064] For each candidate function module, first obtain its scores in the six evaluation dimensions of interface type matching rate, data format compatibility, memory requirement satisfaction rate, operation resource requirement satisfaction rate, signal strength adaptation rate, and protocol type matching rate. Then, take the average of the scores of interface type matching rate and data format compatibility as the score of function interface matching degree; take the average of the scores of memory requirement satisfaction rate and operation resource requirement satisfaction rate as the score of resource requirement matching degree; take the average of the scores of signal strength adaptation rate and protocol type matching rate as the score of scene adaptation matching degree. Finally, multiply the score of function interface matching degree by its weight, add the score of resource requirement matching degree multiplied by its weight, and add the score of scene adaptation matching degree multiplied by its weight to obtain the comprehensive matching score of the candidate function module.

[0065] Step S1255: Sort the candidate function modules in the third candidate function module set according to the comprehensive matching scores from high to low to form a candidate function module sorting list.

[0066] Compare the comprehensive matching scores of the encrypted data transmission module and the multi-protocol conversion module in the third candidate function module set. If the comprehensive matching score of the encrypted data transmission module is higher than that of the multi-protocol conversion module, the encrypted data transmission module is arranged in front and the multi-protocol conversion module is arranged in back to form the candidate function module sorting list. If the comprehensive matching score of the multi-protocol conversion module is higher, the modules are arranged in reverse order.

[0067] Step S1256: According to the actual expansion requirement of the communication module and the total amount of idle resources, determine the number of candidate function modules to be selected, and select the candidate function modules with high ranking and the number meeting the preset number from the candidate function module sorting list.

[0068] According to the business function priority currently required to be implemented by the communication module and the total amount of idle resources, if the encrypted data transmission function is most urgently required to be implemented at present and the idle resources can support the running of two modules at the same time, the number of modules to be selected is determined to be two, and the first two encrypted data transmission modules and multi-protocol conversion modules are selected from the candidate function module sorting list. If the idle resources can only support the running of one module, the number of modules to be selected is determined to be one, and the first module in the sorting list is selected.

[0069] Step S130: Perform collaborative adaptation processing on each adaptive function module in the adaptive function module set and the communication module, interface the existing interface of the communication module through the function interface description information, allocate idle resources of the communication module based on the resource requirement information, adjust the module running parameters in combination with the scene adaptation information, and generate a collaborative adaptation result.

[0070] For each module in the set of adaptation function modules, interface docking, resource allocation and parameter adjustment are sequentially completed to ensure that each module can be adapted to the communication module and the current scenario, and finally all processing results are integrated to form a collaborative adaptation result.

[0071] Step S131: An adaptation function module is selected from the set of adaptation function modules, and function interface description information of the adaptation function module is extracted, the function interface description information including interface type, data input / output format and interaction timing requirement.

[0072] The encryption data transmission module is first selected from the set of adaptation function modules, and its function interface description information is extracted through a module information reading interface, wherein the interface type is a security interface, the data input format is a specific plaintext data format, the data output format is an encrypted ciphertext data format, and the interaction timing requirement is that the encryption processing needs to be completed within a specified time after data input and the ciphertext data is output.

[0073] Step S132: Existing interface information of the communication module is collected, the existing interface information including interface type, current data interaction format and idle state, the function interface description information of the adaptation function module is docked with the existing interface information, and a matched existing interface is determined, and if there is an incompatible interface data interaction format, the interface data format of the adaptation function module is adjusted to be consistent with the existing interface.

[0074] The existing interface information is collected through the interface monitoring unit of the communication module, and the existing interface includes a security interface, a data transmission interface and the like, wherein a certain security interface is currently in an idle state, and its data interaction format is another specific format. The function interface description information of the encryption data transmission module is compared with the existing security interface information, and it is found that the interface types are matched, but the data interaction formats are incompatible. At this time, the module format conversion component is called to adjust the interface data input / output format of the encryption data transmission module to be consistent with the interaction format of the existing security interface, and the interface docking is completed.

[0075] Step S133: Resource requirement information of the adaptation function module is extracted, the resource requirement information including required memory capacity, required operation resource proportion and required interface quantity, current idle resource data is obtained from the real-time running data of the communication module, the current idle resource data including current idle memory capacity, current idle operation resource and current idle interface quantity, and corresponding resources are allocated to the adaptation function module from the current idle resources according to the resource requirement information.

[0076] Extract the resource requirement information of the encrypted data transmission module, including the required memory capacity, the required operation resource proportion, and the required interface quantity. Obtain the current idle memory capacity, the current idle operation resource proportion, and the current idle interface quantity from the real-time running data of the communication module. According to the resource requirement of the module, divide a memory space with a corresponding capacity from the current idle memory and allocate it to the module. Divide an operation unit with a corresponding proportion from the current idle operation resource and allocate it to the module. Allocate the security type interface that has been connected to the module for use.

[0077] Step S134: If multiple adaptive function modules compete for the same idle resource when allocating resources, resource allocation is performed based on the function priority of the adaptive function module, which is determined according to the request urgency in the function demand trigger condition.

[0078] If the encrypted data transmission module and the multi-protocol conversion module need to occupy the same idle operation unit at the same time when allocating resources, the function priority is determined according to the request urgency in the function demand trigger condition. The request urgency corresponding to the encrypted data transmission module is urgent, and the request urgency corresponding to the multi-protocol conversion module is general. Therefore, the function priority of the encrypted data transmission module is higher than that of the multi-protocol conversion module. The idle operation unit is preferentially allocated to the encrypted data transmission module, and other idle operation units are allocated to the multi-protocol conversion module. If there is no other idle operation unit, the allocation is performed after part of the operation resource of the encrypted data transmission module is released.

[0079] Step S135: Extract the scene adaptation information of the adaptive function module, which includes the applicable signal strength range, the applicable protocol type, and the applicable connection device quantity range. Collect the current external scene data, and adjust the running parameters of the adaptive function module according to the current external scene data. The running parameters include signal reception sensitivity, protocol adaptation parameters, and data processing concurrency.

[0080] Extract the scene adaptation information of the encrypted data transmission module, which has a medium and above applicable signal strength range, includes the protocol currently used by the module, and has a medium scale applicable connection device quantity range. Collect the current external scene data, which has a medium current signal strength, a protocol type that is the protocol currently used by the module, and a medium scale current connection device quantity. According to these data, adjust the running parameters of the module, adjust the signal reception sensitivity to a medium level to match the current signal strength, set the protocol adaptation parameters to the parameter value corresponding to the current protocol type, and adjust the data processing concurrency to a medium level according to the current connection device quantity to ensure that the module can process multiple device encrypted data transmission requests at the same time.

[0081] Step S136: After the completion of the cooperative adaptation of one adaptive function module, repeat the above steps of extracting the function interface description information of the adaptive function module to adjust the running parameters of the adaptive function module according to the current external scene data, to process other adaptive function modules in the adaptive function module set, and record the interface docking result, resource allocation result and parameter adjustment result of each adaptive function module.

[0082] After the completion of the cooperative adaptation of the encrypted data transmission module, the multi-protocol conversion module is processed according to the procedures of steps S131 to S135. The function interface description information of the multi-protocol conversion module is extracted, and the existing conversion type interface of the communication module is docked. If the formats are incompatible, adjustment is made. The resource demand information is extracted, and the corresponding resources are allocated from the current remaining free resources. The running parameters, including signal receiving sensitivity and protocol conversion rate, are adjusted according to the current external scene data. At the same time, the interface docking result (such as the interface number docked, format adjustment condition), resource allocation result (such as the allocated memory capacity, operation resource proportion, and interface number), and parameter adjustment result (such as the specific setting value of each running parameter) of the encrypted data transmission module and the multi-protocol conversion module are recorded.

[0083] Step S137: The docking result, allocation result and adjustment result of all adaptive function modules are integrated to generate a cooperative adaptation result, which contains the adaptation details and the overall adaptation state of each adaptive function module.

[0084] The interface docking result, resource allocation result and parameter adjustment result of the encrypted data transmission module and the multi-protocol conversion module are summarized, and an adaptation detail is generated for each module, which records the processing information of the module in the adaptation process in detail. At the same time, it is judged whether all modules have completed interface docking, resource allocation and parameter adjustment, and whether the total allocated resources exceed the total amount of free resources of the communication module. If all conditions are met, the overall adaptation state is successful. If there is a module that has not completed adaptation or resource allocation exceeds the limit, the overall adaptation state is failed, and the failure reason is marked. The above information is integrated to generate a cooperative adaptation result.

[0085] Step S140: Based on the cooperative adaptation result, the adaptive function module is dynamically injected into the running environment of the communication module, the calling link between the adaptive function module and the original function of the communication module is constructed, the calling link contains the data interaction path, the function execution priority sorting and the exception transfer mechanism, and the function expansion calling architecture is generated.

[0086] When the cooperative adaptation result is successful, the adaptive function module is injected into the running environment of the communication module, and the calling relationship between the module and the original function is established, forming a complete function expansion calling architecture, which ensures the cooperative operation of the expanded function and the original function.

[0087] Step S141: Based on the interface docking result in the collaborative adaptation result, determine the docking node of each adaptation function module and the existing interface of the communication module, and inject the program code of each adaptation function module into the running environment of the communication module through the docking node. The normal operation of the original function of the communication module is maintained during the injection process.

[0088] According to the interface docking result in the collaborative adaptation result, determine the docking node of the encrypted data transmission module and the existing security interface of the communication module, and the docking node of the multi-protocol conversion module and the existing conversion interface. Through the docking node, the program codes of the two modules are injected into the running memory of the communication module in batches. The incremental loading method is adopted in the injection process, and only part of the code fragments are loaded each time to avoid occupying too much computing resource and ensure that the original data transmission, device connection and other functions in the communication module are not affected and maintain normal operation.

[0089] Step S142: Collect the calling relationship data of the original function of the communication module, which includes the calling sequence, data transmission path and execution priority between the original functions, associate the function requirements of the adaptation function module with the calling relationship of the original function, and determine the insertion position of the adaptation function module in the original calling relationship.

[0090] The calling relationship data of the original function is collected through the function calling monitoring component of the communication module. The original function includes the basic data receiving function, the basic data sending function, the device authentication function, etc. The calling sequence is that after the device authentication function is completed, the basic data receiving function and the basic data sending function are called in turn. The data transmission path is that the basic data receiving function transmits the received data to the basic data sending function. The execution priority is that the device authentication function is the highest, the basic data receiving function is the second, and the basic data sending function is the lowest. The function requirement (data encryption transmission) of the encrypted data transmission module is associated with the original calling relationship, and its insertion position is determined to be after the basic data receiving function and before the basic data sending function. The function requirement (protocol conversion) of the multi-protocol conversion module is associated with the original calling relationship, and its insertion position is determined to be before the basic data receiving function, which is used to convert the received data of different protocols into protocol data supported by the module.

[0091] Step S143: Based on the insertion position, construct the data interaction path of the adaptation function module and the original function, which determines the source function of the adaptation function module receiving data and the target function of the adaptation function module sending data, and constructs the format and frequency of data interaction.

[0092] Based on the insertion position, the data interaction path is constructed. For the encrypted data transmission module, the source function of receiving data is the basic data receiving function, the target function of sending data is the basic data sending function, the data interaction format is the adjusted interface data format, and the interaction frequency is consistent with the interaction frequency of the basic data receiving function and the basic data sending function, that is, the basic data receiving function receives data once, and the encrypted data transmission module transmits data once. For the multi-protocol conversion module, the source function of receiving data is the data sending function of the external device, the target function of sending data is the basic data receiving function, the data interaction format is compatible with the external device and the basic data receiving function, and the interaction frequency is the frequency of the external device sending data.

[0093] Step S144: According to the request emergency degree in the function demand trigger condition and the execution priority of the original function, the function execution priority of the adaptive function module is determined, the execution priority of the adaptive function module is integrated with the execution priority of the original function, and a unified function execution priority order is formed.

[0094] According to the request emergency degree in the function demand trigger condition, the request emergency degree corresponding to the encrypted data transmission module is urgent, and the request emergency degree corresponding to the multi-protocol conversion module is general. Combined with the execution priority of the original function, it is determined that the execution priority of the encrypted data transmission module is higher than that of the basic data receiving function and the basic data sending function, and lower than that of the device authentication function; the execution priority of the multi-protocol conversion module is higher than that of the basic data receiving function, and lower than that of the encrypted data transmission module and the device authentication function. The above priority is integrated to form a unified execution priority order: the device authentication function is the highest, followed by the encrypted data transmission module, then the multi-protocol conversion module, followed by the basic data receiving function, and finally the basic data sending function.

[0095] Step S145: Build an abnormal transfer mechanism. When the adaptive function module runs abnormally, the abnormal transfer mechanism transfers the function request of the adaptive function module to the original function or other adaptive function module in the communication module with similar functions, and records the abnormal type and the transfer process.

[0096] Step S1451: Collect the types of possible abnormalities of the adaptive function module, the types of abnormalities include interface interaction failure, resource occupation limit and data processing error, build corresponding abnormal identification features for each type of abnormality, the abnormal identification features include error code, log information and running state parameters.

[0097] The abnormal types that can occur in the encrypted data transmission module and the multi-protocol conversion module are collected, including interface interaction failure, resource occupation exceeding limit, and data processing error. The abnormal identification features are constructed for the interface interaction failure, including specific error codes, log information of interface connection timeout, and running state parameters of interface state being disconnected; the abnormal identification features are constructed for the resource occupation exceeding limit, including corresponding error codes, log information of resource occupation rate exceeding a threshold, and resource occupation rate parameters; the abnormal identification features are constructed for the data processing error, including specific error codes, log information of data format error, and running state parameters of data processing result being invalid.

[0098] Step S1452: constructing an abnormal monitoring rule based on the abnormal identification features, when information meeting the abnormal identification features appears in the running data of the adaptation function module, triggering the abnormal monitoring rule to determine that the running of the adaptation function module is abnormal.

[0099] Based on the abnormal identification features, the abnormal monitoring rule is constructed. For the interface interaction failure, the rule is set as when the running data of the adaptation function module contains corresponding error codes, and the log information shows that the interface connection is timed out, and the interface state parameter is disconnected, the abnormal monitoring rule is triggered; for the resource occupation exceeding limit, the rule is set as when the running data contains corresponding error codes, and the log information shows that the resource occupation rate exceeds a threshold, and the resource occupation rate parameter reaches a set value, the abnormal monitoring rule is triggered; for the data processing error, the rule is set as when the running data contains corresponding error codes, and the log information shows that the data format is incorrect, and the data processing result parameter is invalid, the abnormal monitoring rule is triggered. When any of the above rules is met, it is determined that the running of the adaptation function module is abnormal.

[0100] Step S1453: collecting information of original functions and other adaptation function modules with similar functions in the communication module, the information including function description, interface type, and current running state, establishing a similar function mapping table, which records a list of similar functions corresponding to each adaptation function module.

[0101] The information of original functions and other adaptation function modules with similar functions in the communication module is collected. If the original function contains a simple data encryption function, the function description is basic data encryption processing, the interface type is a security interface, and the current running state is normal; the multi-protocol conversion module has no similar function with other protocol conversion related modules. The similar function mapping table is established, in which the list of similar functions corresponding to the encrypted data transmission module is the simple data encryption function; the list of similar functions corresponding to the multi-protocol conversion module is empty.

[0102] Step S1454: When the abnormality monitoring rule is triggered, the similar function list corresponding to the current abnormal adaptation function module is found based on the similar function mapping table, and the function currently in a normal operation state in the similar function list is screened.

[0103] If the encryption data transmission module operation is abnormal, the abnormality monitoring rule is triggered, the similar function list corresponding to the similar function is found based on the similar function mapping table, that is, the simple data encryption function. The current running state of the function is checked. If it is normal, it is screened out as a candidate transfer target; if it is abnormal, there is no candidate transfer target.

[0104] Step S1455: According to the function similarity degree of the similar function and the abnormal adaptation function module, the normal running function with the highest similarity degree is selected as the transfer target, and the function request of the abnormal adaptation function module is transferred to the transfer target.

[0105] The simple data encryption function and the function of the encryption data transmission module are compared in similarity degree. Both of them have data encryption function, the similarity degree is high, the simple data encryption function is selected as the transfer target, the function request originally sent to the encryption data transmission module is transferred to the simple data encryption function, and the data encryption processing is completed by the function.

[0106] Step S1456: Record the abnormal type, abnormal occurrence time, transfer target and function running state after transfer, form an abnormal transfer record, and add the abnormal transfer record to the abnormal transfer mechanism.

[0107] The type of this abnormality is interface interaction failure, the abnormal occurrence time is a specific time point, the transfer target is the simple data encryption function, and the function running state after transfer is normal. The above information is arranged to form an abnormal transfer record, and the record is added to the abnormal transfer mechanism for subsequent query and analysis.

[0108] Step S146: The data interaction path, function execution priority order and abnormal transfer mechanism are integrated to form the calling link of the adaptation function module and the original function, all calling links are extracted according to function categories, and a function expansion calling architecture is generated.

[0109] The constructed data interaction path, function execution priority ranking and abnormal transfer mechanism are integrated, the data interaction path between the encrypted data transmission module, the multi-protocol conversion module and the original function, the unified function execution priority ranking and the abnormal transfer mechanism for the two modules are associated to form a complete call link. The call link of the encrypted data transmission module covers the data interaction path between the encrypted data transmission module and the basic data receiving function and the basic data sending function, the position in the overall execution priority, and the corresponding abnormal transfer rule; the call link of the multi-protocol conversion module covers the data interaction path between the multi-protocol conversion module and the external device data sending function and the basic data receiving function, the position in the execution priority, and the corresponding abnormal transfer rule.

[0110] Then, all the call links are extracted according to the function categories, the encrypted data transmission module call link related to the data security function is classified as a data security category call link, and the multi-protocol conversion module call link related to the protocol conversion function is classified as a protocol adaptation category call link. The classified call links are combed according to the function logic to form a function extension call architecture containing information such as function category, module name, associated original function, data flow direction, execution priority and abnormal handling mode.

[0111] Step S150: Based on the function extension call architecture, the running interaction data of the adaptation function module and the original function of the communication module are collected, the running flow of the extended function, the resource occupation condition and the description information of the scene response effect are extracted, and the communication module function extension running graph is generated.

[0112] Based on the function extension call architecture, the running data of the adaptation function module and the original function are continuously collected, the key description information is extracted therefrom, the overall running state after the function extension is presented in a visual manner to form a function extension running graph.

[0113] Step S151: Based on the data interaction path in the function extension call architecture, real-time data interaction records between the adaptation function module and the original function are collected, and the real-time data interaction records include data sending function, data receiving function, data content and interaction time.

[0114] According to the data interaction path defined in the function expansion calling architecture, through the data flow monitoring component of the communication module, the real-time data interaction records between the encrypted data transmission module, the multi-protocol conversion module and the original function are collected. For example, the record of the multi-protocol conversion module receiving data from the external device data sending function, which contains the data sending function for the external device data sending function, the data receiving function for the multi-protocol conversion module, the data content for the protocol data transmitted by the external device, and the interaction time for the specific time of data receiving; the record of the multi-protocol conversion module sending converted data to the basic data receiving function, which contains the data sending function for the multi-protocol conversion module, the data receiving function for the basic data receiving function, the data content for the converted standard protocol data, and the interaction time for the specific time of data sending; the record of the encrypted data transmission module receiving data from the basic data receiving function and sending encrypted data to the basic data sending function, which also contains the above-mentioned field information.

[0115] Step S152: Extract the data flow from the real-time data interaction records, analyze the transmission process of the data between the adaptive function module and the original function in time sequence, combine the function execution priority ranking, extract the running process description information of the expansion function, which contains the function execution sequence, data interaction node and execution time length.

[0116] From the collected real-time data interaction records, the data flow is extracted, the interaction time is sorted in chronological order, the complete transmission process of the data from the external device data sending function to the multi-protocol conversion module, then to the basic data receiving function, and then to the encrypted data transmission module for encryption processing, and finally to the basic data sending function is sorted out. Combined with the unified function execution priority ranking, the execution sequence of each function is determined as device authentication function, then in turn as encrypted data transmission module, multi-protocol conversion module, basic data receiving function, and basic data sending function. In this process, the data interaction nodes between the multi-protocol conversion module and the external device data sending function, the basic data receiving function, and the data interaction nodes between the encrypted data transmission module and the basic data receiving function, the basic data sending function are marked. At the same time, the time interval from receiving data to processing completion and sending data of each function is counted as the execution time length of each function. The function execution sequence, data interaction node and execution time length are integrated to form the running process description information of the expansion function.

[0117] Step S153: Collect the resource occupation real-time data of the communication module, count the resource occupation changes according to the time interval, extract the resource occupation condition description information, and the resource occupation real-time data contains the memory capacity, operation resource and interface number occupied by the adaptive function module and the original function respectively.

[0118] The resource monitoring module of the communication module collects resource occupation real-time data, which is subdivided into the memory capacity, operation resource occupation ratio and interface quantity of the encryption data transmission module, the multi-protocol conversion module and the original functions. The resource occupation data is counted at fixed time intervals, and the resource occupation value changes of each module and the original functions in each time interval are recorded, such as whether the memory capacity occupied by the encryption data transmission module in a certain time interval increases compared with the last interval, whether the operation resource occupation ratio of the multi-protocol conversion module fluctuates, etc. According to the statistical results, resource occupation condition description information is extracted, covering the resource occupation peak value, average occupation amount and occupation trend of each module and the original functions.

[0119] Step S154: Collect external scene data and scene response data of the adaptive function module, associate the scene response data with the external scene data, analyze the response effect of the adaptive function module under different external scenes, extract scene response effect description information, and the scene response data includes response delay, data processing success rate and function coverage range.

[0120] The signal monitoring unit continuously collects external scene data, including real-time changes of communication signal strength, network protocol type and number of connected devices. At the same time, through the built-in monitoring components of the adaptive function module, scene response data is collected, including response delay, data processing success rate and function coverage range. The response delay is the time interval from when the module receives a data request to when it returns the processing result, the data processing success rate is the ratio of the number of successfully processed data requests to the total number of data requests, and the function coverage range is the range of connected devices that the module can normally serve. The scene response data is associated with the corresponding external scene data, for example, when the communication signal strength decreases, analyze whether the response delay of the encryption data transmission module increases, whether the data processing success rate decreases; when the number of connected devices changes, analyze whether the function coverage range of the multi-protocol conversion module is adjusted. According to the correlation analysis results, scene response effect description information is extracted to describe the response performance of each adaptive function module under different external scene parameters.

[0121] Step S155: The running flow description information, resource occupation condition description information and scene response effect description information are visually mapped according to the structure of the function extension call architecture, different graphical elements are used to represent the adaptive function module, the original function and the data interaction path, and colors are used to represent the function execution priority and the resource occupation state.

[0122] According to the hierarchy and logical structure of the function expansion calling architecture, the running flow description information, the resource occupation description information and the scene response effect description information are visually mapped. Different graphical elements are used to distinguish the adaptive function modules and the original functions, for example, a rectangle is used to represent the original function, and a rounded rectangle is used to represent the adaptive function module; a line segment with an arrow is used to represent the data interaction path, and the arrow direction indicates the data flow direction. Different colors are used to represent the function execution priority, for example, the device authentication function with the highest priority is represented by a dark color, and the basic data transmission function with a lower priority is represented by a light color; at the same time, the color depth change is used to represent the resource occupation state, for example, the higher the proportion of the operation resources occupied by a certain module, the darker the corresponding graphical color. In addition, key information such as module name, execution time, resource occupation value and response delay is marked beside the graphical elements.

[0123] Step S156: Add diagram explanation information, which explains the meaning of graphical elements, color identification rules and data sources, and integrate the visual mapping results and diagram explanation information to generate a communication module function expansion running diagram.

[0124] Write diagram explanation information to explain in detail what kind of function type each type of graphical element represents in the visual mapping, what level of execution priority and resource occupation degree standard different colors correspond to, and the collection source of all data, such as resource occupation data from resource monitoring module, scene response data from built-in monitoring component of the module. Integrate the diagram formed by the visual mapping and the diagram explanation information to ensure that the diagram explanation information corresponds to the diagram content one by one, making it easy for viewers to understand. Finally, a complete communication module function expansion running diagram is generated, which can intuitively show the running flow, resource occupation dynamics and scene response effect of the expansion function.

[0125] Based on the same inventive concept, please refer to Figure 2 , which shows the structure schematic block diagram of the application dynamic loading communication module function expansion system 100 provided by the embodiment of the application for executing the above-mentioned patrol video stream processing method. The application dynamic loading communication module function expansion system 100 can include a communication unit 110, a machine readable storage medium 120 and a processor 130.

[0126] In this embodiment, the machine readable storage medium 120 and the processor 130 are located in the application dynamic loading communication module function expansion system 100 and are separately arranged. However, it should be understood that the machine readable storage medium 120 can also be independent of the application dynamic loading communication module function expansion system 100, and can be accessed by the processor 130 through a bus interface. Alternatively, the machine readable storage medium 120 can also be integrated into the processor 130, and can communicate and interact with external systems through the communication unit 110.

[0127] The processor 130 is the control center of the application-dynamically-loaded communication module function extension system 100, connects each part of the application-dynamically-loaded communication module function extension system 100 by using various interfaces and lines, executes various functions of the application-dynamically-loaded communication module function extension system 100 and processes data by running or executing software programs and / or modules stored in the machine-readable storage medium 120 and calling data stored in the machine-readable storage medium 120, and thus monitors the application-dynamically-loaded communication module function extension system 100 as a whole. Optionally, the processor 130 can include one or more processing cores; for example, the processor 130 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor. The machine-readable storage medium 120 is configured to store machine-executable instructions for executing the scheme of the present application, and the processor 130 is configured to execute the machine-executable instructions stored in the machine-readable storage medium 120 to implement the method for processing a patrol video stream provided in the foregoing method embodiments.

[0128] It should be noted that, in order to simplify the description of the present application and to facilitate the understanding of one or more embodiments of the present application, in the foregoing description of the embodiments of the present application, various features are sometimes incorporated into one embodiment, figure or description thereof.

Claims

1. A method for extending the functions of a communication module by using dynamic loading, characterized in that, The method comprises: determining a dynamic loading trigger condition space, collecting communication module real-time running data and external scene data based on the dynamic loading trigger condition space, generating trigger condition matching data set, the dynamic loading trigger condition space contains functional requirement trigger condition, module resource trigger condition and external environment trigger condition, the functional requirement trigger condition corresponds to the business function request not covered by the communication module, the module resource trigger condition corresponds to the idle resource threshold of the communication module, and the external environment trigger condition corresponds to the communication scene change signal; screening the adaptive function module corresponding to the trigger condition matching data set from the preset function module library, generating the adaptive function module set based on the functional requirement trigger condition matching function interface description information in the trigger condition matching data set, based on the module resource trigger condition matching resource demand information, and based on the external environment trigger condition matching scene adaptation information; each adaptive function module in the adaptive function module set is cooperatively adapted with the communication module, the existing interface of the communication module is connected through the function interface description information, the idle resource of the communication module is allocated based on the resource demand information, the module running parameter is adjusted in combination with the scene adaptation information, and a cooperative adaptation result is generated; based on the cooperative adaptation result, the adaptive function module is dynamically injected into the communication module running environment, the calling link of the adaptive function module and the original function of the communication module is constructed, the function expansion calling architecture is generated, and the calling link contains a data interaction path, a function execution priority order and an exception transfer mechanism; based on the function expansion calling architecture, the running interaction data of the adaptive function module and the original function of the communication module is collected, the description information of the running process, resource occupation and scene response effect of the expansion function is extracted, and a communication module function expansion running graph is generated.

2. The method of claim 1, wherein the dynamic loading of the communication module function extension is performed by a communication module function extension loader. The method comprises: collecting the prior function expansion record of the communication module, extracting the feature space of the trigger function expansion from the prior function expansion record, and the feature space contains the prior uncovered business function request, the prior module idle resource state and the prior communication scene change information; classifying the feature space, classifying the prior uncovered business function request as a functional requirement class space, classifying the prior module idle resource state as a module resource class space, and classifying the prior communication scene change information as an external environment class space; constructing the condition characteristics of the functional requirement trigger condition based on the functional requirement class space, the functional requirement trigger condition contains the business function request type, the request frequency and the request urgency, the business function request type corresponds to the category of the uncovered business function, the request frequency corresponds to the number of occurrences of the same request in unit time, and the request urgency corresponds to the demand for real-time. Construct condition features of the module resource trigger condition based on the module resource class space, the module resource trigger condition including idle memory capacity, idle computing resource and idle interface quantity, the idle memory capacity corresponding to the memory space not occupied by the communication module, the idle computing resource corresponding to the computing unit not used by the communication module, and the idle interface quantity corresponding to the external interfacing interface not occupied by the communication module; Construct condition features of the external environment trigger condition based on the external environment class space, the external environment trigger condition including communication signal strength change, network protocol type switching and connection device quantity change, the communication signal strength change corresponding to fluctuation of signal receiving power, the network protocol type switching corresponding to change of communication protocol, and the connection device quantity change corresponding to increase or decrease of the number of terminal devices connected with the communication module; Integrate the condition features of the function demand trigger condition, the module resource trigger condition and the external environment trigger condition to form the dynamic loading trigger condition space; Based on each trigger condition in the dynamic loading trigger condition space, collect real-time running data of the communication module, and arrange the real-time running data and the external scene data according to trigger condition categories to generate a trigger condition matching data set, the real-time running data including current business function request and current resource occupation state, and the external scene data including current signal state, current protocol type and current connection device quantity.

3. The method of claim 2, wherein the dynamic loading of the communication module function extension is performed by a communication module function extension loader. The condition features of the function demand trigger condition constructed based on the function demand class space include: Classify prior uncovered business function requests in the function demand class space, divide the prior uncovered business function requests into different categories according to business fields, each category corresponding to one business function request type, determine function description and applicable scenario of each business function request type; Statistically determine the number of occurrences of each business function request type in prior records per unit time, determine division basis of request frequency based on the statistical result, associate the request frequency with the business function request type, and determine the typical request frequency range corresponding to different business function request types; Analyze the demand of real-time of the business scenario corresponding to each business function request type, divide request urgency into different request urgency levels, associate the request urgency level with the business function request type, determine the default request urgency corresponding to each business function request type, and each request urgency level corresponds to different real-time requirements; Establish an association relationship table of business function request type, request frequency and request urgency, the association relationship table recording the request frequency range and the default request urgency corresponding to each business function request type; Based on the association relationship table, set a trigger threshold for each business function request type, when the request frequency of the actual business function request exceeds the corresponding trigger threshold and the request request urgency level reaches the corresponding level, the function demand trigger condition is triggered. The division result of the service function request type, the association rule of the request frequency, the construction of the request emergency level and the trigger threshold are integrated to form the condition characteristics of the function demand trigger condition.

4. The method of claim 1, wherein the dynamic loading of the communication module function extension is applied, The matching data set corresponding to the trigger condition is filtered from the preset function module library, the function demand trigger condition matching function interface description information in the matching data set is matched, the resource demand information matching the module resource trigger condition is matched, the scene adaptation information matching the external environment trigger condition is matched, and an adaptive function module set is generated, including: ​ A preset function module library is loaded, the preset function module library stores a plurality of function modules, each function module is associated with function interface description information, resource demand information and scene adaptation information, the function interface description information includes interface types and data interaction formats provided by the module, the resource demand information includes memory capacity and operation resource occupancy required for module operation, and the scene adaptation information includes signal strength range, protocol type and connection device quantity range suitable for the module; First related data of the function demand trigger condition is extracted from the trigger condition matching data set, the first related data is compared with the function interface description information of each function module, candidate function modules with interface types matching the current service function request type are screened out, a first candidate function module set is generated, and the first related data includes the current service function request type, the current request frequency and the current request emergency level; Second related data of the module resource trigger condition is extracted from the trigger condition matching data set, the second related data is compared with the resource demand information of each candidate function module in the first candidate function module set, candidate function modules with resource demand not exceeding the current idle resource are screened out, and a second candidate function module set is generated, the second related data includes the current idle memory capacity, the current idle operation resource and the current idle interface quantity; Third related data of the external environment trigger condition is extracted from the trigger condition matching data set, the third related data is compared with the scene adaptation information of each candidate function module in the second candidate function module set, candidate function modules with applicable scenes containing the current external environment state are screened out, and a third candidate function module set is generated, the third related data includes the current signal strength, the current protocol type and the current connection device quantity. Each candidate function module in the third candidate function module set is sorted according to the matching degree, the sorting basis is the comprehensive result of the function interface matching degree, the resource demand matching degree and the scene adaptation matching degree, and a preset number of candidate function modules with high ranking are selected. The selected candidate function modules are sorted to form an adaptive function module set.

5. The method of claim 4, wherein the dynamic loading of the communication module function extension is performed by a communication module function extension loader. The matching degree of each candidate function module in the third candidate function module set is sorted, the sorting basis is the comprehensive result of the function interface matching degree, the resource demand matching degree and the scene adaptation matching degree, and a preset number of candidate function modules with high ranking are selected, including: The matching degree of the functional interface, the matching degree of the resource requirement, and the matching degree of the scene adaptation are respectively set as evaluation dimensions, the evaluation dimension of the matching degree of the functional interface includes an interface type matching rate and a data format compatibility, the evaluation dimension of the matching degree of the resource requirement includes a memory requirement satisfaction rate and an operation resource requirement satisfaction rate, and the evaluation dimension of the matching degree of the scene adaptation includes a signal strength adaptation rate and a protocol type matching rate; A scoring standard is set for each evaluation dimension, and a corresponding score is given based on the matching degree of the candidate functional module and the trigger condition matching data set, and the score reflects the matching in the evaluation dimension; According to the core requirement of the functional expansion, the matching degree of the functional interface, the matching degree of the resource requirement, and the matching degree of the scene adaptation are respectively set as evaluation dimensions, the matching degree of the functional interface has the highest weight, the matching degree of the resource requirement has the second highest weight, and the matching degree of the scene adaptation has the third highest weight; Based on the scores of the evaluation dimensions and the corresponding weights, the comprehensive matching score of each candidate functional module is calculated, and the comprehensive matching score is the sum of the product of the scores of the evaluation dimensions and the corresponding weights; The candidate functional modules in the third candidate functional module set are sorted in descending order of the comprehensive matching score to form a candidate functional module sorting list; According to the actual expansion requirement of the communication module and the total amount of idle resources, the number of candidate functional modules to be selected is determined, and the candidate functional modules with high ranking and a number meeting a preset number are selected from the candidate functional module sorting list.

6. The method of claim 1, wherein the dynamic loading of the communication module function extension is applied, and The adaptive functional module set is selected, the functional interface description information of each adaptive functional module in the adaptive functional module set is extracted, the functional interface description information includes an interface type, a data input / output format, and an interaction timing requirement, the existing interface information of the communication module is collected, the existing interface information includes an interface type, a current data interaction format, and an idle state, the functional interface description information of the adaptive functional module is docked with the existing interface information, a matched existing interface is determined, if there is an incompatible interface data interaction format, the interface data format of the adaptive functional module is adjusted to be consistent with the existing interface, the resource requirement information of the adaptive functional module is extracted, the resource requirement information includes a required memory capacity, a required operation resource proportion, and a required interface number, current idle resource data is obtained from the real-time running data of the communication module, the current idle resource data includes a current idle memory capacity, a current idle operation resource, and a current idle interface number, and corresponding resources are allocated to the adaptive functional module from the current idle resources according to the resource requirement information, if multiple adaptive functional modules compete for the same idle resource during resource allocation, resource allocation is performed based on the functional priority of the adaptive functional module, and the functional priority is determined according to the request urgency in the functional requirement trigger condition. ​ ​ ​ ​ Extract the scene adaptation information of the adaptation function module, the scene adaptation information contains applicable signal strength range, applicable protocol type and applicable connection device quantity range, collect current external scene data, adjust the running parameters of the adaptation function module according to the current external scene data, the running parameters contain signal receiving sensitivity, protocol adaptation parameters and data processing concurrency; After completing the cooperative adaptation of one adaptation function module, repeat the above steps of extracting the function interface description information of the adaptation function module to adjusting the running parameters of the adaptation function module according to the current external scene data to process other adaptation function modules in the adaptation function module set, record the interface docking result, resource allocation result and parameter adjustment result of each adaptation function module; Integrate the docking result, allocation result and adjustment result of all adaptation function modules to generate a cooperative adaptation result, which contains the adaptation details and overall adaptation state of each adaptation function module.

7. The method of claim 1, wherein the dynamic loading of the communication module function extension is performed by a communication module function extension loader. Based on the cooperative adaptation result, dynamically inject the adaptation function module into the communication module running environment, construct the calling link of the adaptation function module and the original function of the communication module, generate a function extension calling architecture, including: Based on the interface docking result in the cooperative adaptation result, determine the docking node of each adaptation function module and the existing interface of the communication module, inject the program code of each adaptation function module into the communication module running environment through the docking node, and keep the normal operation of the original function of the communication module during the injection process; Collect the calling relationship data of the original function of the communication module, the calling relationship data contains the calling sequence, data transmission path and execution priority between the original functions, associate the function requirements of the adaptation function module with the calling relationship of the original function, and determine the insertion position of the adaptation function module in the original calling relationship; Based on the insertion position, construct the data interaction path of the adaptation function module and the original function, the data interaction path determines the source function of the adaptation function module receiving data and the target function of the adaptation function module sending data, and constructs the format and frequency of data interaction at the same time; According to the request urgency in the function requirement trigger condition and the execution priority of the original function, determine the function execution priority of the adaptation function module, integrate the execution priority of the adaptation function module with the execution priority of the original function to form a unified function execution priority order; Construct an exception transfer mechanism, when the adaptation function module runs abnormally, the exception transfer mechanism transfers the function request of the adaptation function module to the original function or other adaptation function module in the communication module with similar function, and records the exception type and transfer process at the same time; Integrate the data interaction path, function execution priority order and exception transfer mechanism to form the calling link of the adaptation function module and the original function, extract all calling links according to the function category to generate a function extension calling architecture.

8. The method of claim 7, wherein the dynamic loading of the communication module function extension is applied, and The abnormal transfer mechanism is constructed, when the running of the adaptation function module is abnormal, the abnormal transfer mechanism transfers the function request of the adaptation function module to the original function or other adaptation function module with similar function in the communication module, and records the abnormal type and the transfer process, including: Collecting the abnormal types that may occur in the adaptation function module, the abnormal types including interface interaction failure, resource occupation exceeding limit and data processing error, constructing corresponding abnormal identification features for each abnormal type, the abnormal identification features including error code, log information and running state parameter; Constructing abnormal monitoring rules based on the abnormal identification features, when the information conforming to the abnormal identification features appears in the running data of the adaptation function module, triggering the abnormal monitoring rules, determining that the running of the adaptation function module is abnormal; Collecting the information of the original function and other adaptation function module with similar function in the communication module, the information including function description, interface type and current running state, establishing a similar function mapping table, the similar function mapping table recording the similar function list corresponding to each adaptation function module; When the abnormal monitoring rules are triggered, searching for the similar function list corresponding to the current abnormal adaptation function module based on the similar function mapping table, screening the functions in the normal running state in the similar function list; According to the function similarity degree of the similar function and the abnormal adaptation function module, selecting the normal running function with the highest similarity degree as the transfer target, transferring the function request of the abnormal adaptation function module to the transfer target; Recording the abnormal type, abnormal occurrence time, transfer target and function running state after the transfer, forming an abnormal transfer record, and adding the abnormal transfer record to the abnormal transfer mechanism.

9. The method of claim 1, wherein the dynamic loading of the communication module function extension is performed by a communication module function extension loader. Based on the function extension calling architecture, collecting the running interaction data of the adaptation function module and the original function of the communication module, extracting the description information of the running process, resource occupation and scene response effect of the extended function, generating a communication module function extension running graph, including: Based on the data interaction path in the function extension calling architecture, collecting the real-time data interaction record between the adaptation function module and the original function, the real-time data interaction record including data sending function, data receiving function, data content and interaction time; Extracting the data flow from the real-time data interaction record, analyzing the transmission process of the data between the adaptation function module and the original function in time sequence, combining the function execution priority sorting, extracting the running process description information of the extended function, the running process description information including function execution sequence, data interaction node and execution time length; Collecting the resource occupation real-time data of the communication module, statistically analyzing the resource occupation change in time interval, extracting the resource occupation condition description information, the resource occupation real-time data including the memory capacity, operation resource and interface number occupied by the adaptation function module and the original function respectively; Collect external scene data and scene response data of the adaptive function module, associate the scene response data with the external scene data, analyze the response effect of the adaptive function module under different external scenes, extract scene response effect description information, the scene response data includes response delay, data processing success rate and function coverage range; Visualize mapping of the running flow description information, resource occupation condition description information and scene response effect description information according to the structure of the function extension calling architecture, use different graphical elements to represent the adaptive function module, the original function and the data interaction path, use color to represent the function execution priority and the resource occupation state; Add figure explanation information, the figure explanation information explains the meaning of the graphical elements, the color identification rule and the data source, integrate the visualization mapping result and the figure explanation information, and generate a communication module function extension running graph.

10. A communication module function expansion system using dynamic loading, characterized in that, Comprise: a processor; a machine readable storage medium for storing machine executable instructions of the processor; wherein the processor is configured to perform the application dynamic loading communication module function extension method of any one of claims 1 to 9 by executing the machine executable instructions.

Citation Information

Patent Citations

  • Scene model configuration method, scene model configuration device and storage medium

    CN115907634A

  • Internet of things operation and maintenance system and method supporting automatic protocol expansion

    CN120658595A