SCA Waveform Creation Release Optimization Method and Device Based on Component Sleep
Optimizing the SCA waveform creation and release process through component sleep strategy, solving the problem of inefficient waveform operation in the SCA software radio platform for multiple times, realizing rapid creation and efficient resource utilization.
Patent Information
- Application Number
- CN202310235354.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-03-13
AI Technical Summary
In the existing SCA software radio platform, waveforms run multiple times are inefficient in loading, and repeated execution of the creation, start, stop, and release processes lead to excessive time and space overhead.
By setting component sleep policy, optimizing the waveform creation and release process, components enter the sleep pool without unloading, and wake up when created again to avoid repeated loading.
Improves waveform creation and release efficiency, optimizes from minute level to millisecond level, reduces time and space overhead, and improves equipment utilization and efficiency.
Smart Images

Figure CN116614362B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software radio technology. Specifically, it relates to an SCA waveform creation and release optimization method and device based on component sleep. Background Art
[0002] Software radio constructs an open, standardized, and modular platform through a unified architecture. It loads waveform software such as communication systems, data formats, encryption modes, and network protocols onto a general hardware platform to achieve the functions of a wireless communication system, featuring high flexibility, openness, and scalability. Among them, the Software Communication Architecture (SCA) has undergone more than two decades of development and is already the most widely used technical standard in the field of software radio. The SCA standard stipulates the software architecture, hardware architecture, and security architecture of a software radio system, as well as the API interface specifications, aiming to achieve hardware modularization of a wireless communication system and make the software portable, reusable, and interoperable.
[0003] For the waveform applications already installed on the SCA platform, there are mainly four action states: creation, startup, stop, and release. Waveform creation refers to running SCA components one by one on the SCA general software and hardware platform to complete the processes of initialization configuration, port connection, and object registration. The creation process is mainly completed by the application factory component of the SCA core framework. Waveform startup refers to setting the waveform to the startup state and starting the data reception and waveform internal processing processes. Waveform stop refers to stopping all operations of the current waveform component and setting it to a non-running state. Waveform release refers to the process of stopping the waveform instance from running on the platform, disconnecting ports, and releasing resources. The release process is mainly completed by the application manager component.
[0004] In the related art, the main process of SCA waveform creation is as follows: the user calls the create operation of the SCA application factory component to start creating a waveform; the waveform SAD file is parsed to obtain waveform component information, and at the same time, platform loading device information is obtained to generate a component-device loading sequence; the application factory allocates loading capacity on the loading device according to the waveform component loading requirements, loads the components and executes them; after the component loading is completed, the registerComponent interface of the component registrar of the application engineering component is called to register the component; after all the waveform components are registered, the PortAccessor interface of the component is called to complete the port connection; the waveform assembly controller AssemblyController is obtained to perform initialization configuration on the waveform; after the creation is completed, an instance of the created waveform application manager ApplicationManger is returned. Correspondingly, the main process of waveform release is as follows: the user calls the releaseObject operation of the SCA waveform application manager instance to start releasing the waveform; according to the waveform port connection list, the PortAccessor interface is called to complete the port disconnection, and the releseaObject method of each component in the SCA waveform is called one by one to release the component; the component process is terminated on the corresponding loading device, the component code is unloaded, and the allocated capacity is recycled; the unregisterComponent interface of the component registrar of the application factory component is called to unregister the component from the registrar; the application manager object of the waveform is released, and the waveform release is completed.
[0005] It can be seen that during the power-on operation of the SCA software radio platform, a waveform often runs multiple times, and each time it needs to complete the processes of creation, startup, stop, release, etc., resulting in low efficiency. Taking the time-consuming of the typical SCA waveform creation process as an example, the time-consuming for parsing the SAD configuration file, port connection, and parameter configuration can be basically controlled within milliseconds, while the main time-consuming is in the waveform component loading process, and its time and space overheads are very large. The space occupied by a component is between several megabytes and dozens of megabytes. Calling the load() method of the loading device to load the component binary code usually takes dozens of seconds or even several minutes. If the file copying overhead to the loading device is considered, it will further increase the time and space overheads. Therefore, optimizing the loading process of SCA waveform components and reducing their repeated loading and unloading operations can greatly improve the waveform creation efficiency. Summary of the Invention
[0006] The main purpose of this application is to provide an SCA waveform creation and release optimization method and device based on component hibernation to solve the problem of low loading efficiency of waveforms during multiple runs in the existing SCA software radio platform operation.
[0007] To achieve the above object, according to one aspect of the present application, a method for optimizing the creation and release of SCA waveforms based on component sleep is provided, including the following steps: waveform creation: parsing the waveform SAD configuration file information, obtaining a component list, starting the components and creating a manager instance of the waveform, completing the waveform creation, and setting the sleep configuration parameter values of each component in the waveform to true according to the waveform optimization requirements; waveform startup: starting the waveform instance; waveform stop: stopping the waveform instance; waveform sleep: if the component sleep parameter in the waveform is true, then sort according to the loading and unloading times, occupied resources, running activity, etc. of each component of the waveform, determine the release order of each component of the waveform according to a strategy, set the status of the waveform component to the sleep suspend state, and the device loading the component does not actually unload it; waveform release: if the component sleep parameter in the waveform is false, or the remaining loading capacity of the loading device is difficult to meet the minimum requirements for loading new waveform components, call the releaseObject() method of the waveform component to complete the unloading of the waveform component; waveform re-creation: determine whether each component of the waveform is in a sleep state. If it is in a sleep state, set it to the active state directly. If it is not in a sleep state, perform the component loading operation on the loading device.
[0008] Further, the waveform creation specifically includes the following steps: waveform creation preparation: the user starts the waveform creation operation to create a waveform, and parses and obtains the waveform component information and the platform loading device information; first component sleep strategy judgment: if the set value of the component configuration parameter suspend is true, then wake up the component, otherwise normally execute the component loading process; component wake-up: search for the component running object in the component sleep pool according to the component ID information. If the sleeping component is found, wake up its process, adjust the running task priority to the normal state, and perform component port registration. If the sleeping component is not found, normally execute the component loading process; waveform component loading: load and run the component on the corresponding loading device according to the loading requirements of the waveform component and the allocation relationship of the loading device; component port connection: after all the waveform components are registered, call the connectUsesPort() method of the component PortAccessor interface to complete the port connection; waveform initialization configuration: find and obtain the assembly controller component instance of the waveform according to the waveform configuration file, and perform initialization parameter configuration on the waveform; waveform creation completion: return the application manager component instance of the waveform.
[0009] Further, the waveform creation preparation specifically includes the following steps: Create interface call: The user calls the create method of the SCA waveform application factory component to start creating a waveform. The parameters of the create operation include the waveform name to be created and the allocation relationship between components and loading devices; Waveform component information acquisition: Parse the waveform configuration file to obtain information about each waveform component, including component implementation code, configuration parameters, component configuration files, and component port connection relationships; Platform loading device information acquisition: Obtain the type and loading capacity of the platform loading device. When the core framework deploys waveform components, the operating state of the device is obtained by reading the adminState, usageState, and operationalState attributes of the platform loading device, and the query method of the platform loading device is called to calculate the loading capacity.
[0010] Further, the waveform component loading specifically includes the following steps: Loading capacity allocation: According to the waveform component loading requirements, call the allocateCapacity() method on the loading device to allocate the loading capacity interface; Component loading: Call the load() interface on the loading device to load the waveform component binary code; Component execution: If the component loading type is Executable, then call the execute() method on the loading device to execute the binary code of the component and save the component process ID; Component registration: After the component is loaded, register its own object with the registration manager of the application factory component.
[0011] Further, the waveform release specifically includes the following steps: Waveform release preparation: The user calls the releaseObject() method of the waveform manager component instance to start releasing the waveform; Component port disconnection: According to the port connection list of the waveform component, call the disconnectPorts() method of the component PortAccessor interface to complete port disconnection; Second component sleep policy judgment: If the setting value of the component configuration parameter suspend is true, enter the component sleep step, otherwise enter the component release step; Component sleep: Set the process priority of the component to the lowest, and save the component running object information to the component sleep pool for component wake-up operations when the waveform is created again; After the component sleeps, enter the waveform release completion step and wait for other components to complete the release; Component release: Release the component object and release the device resources it occupies. After the component is released, enter the waveform release completion step and wait for other components to complete the release; Waveform release completion: When all components of the waveform are released, release the application manager component instance object of the waveform itself to complete the waveform release operation.
[0012] Further, when the component is in the dormant state, according to the policy, a component release operation is performed on the dormant components in the dormant pool. The component dormant pool release control includes the following policies: First In First Out policy: When the dormant pool meets the release condition, according to the order of entry into the dormant pool, the component that entered the dormant pool first is subjected to the component release operation; Release policy based on component activity: Statistics are performed based on the loading history of the component. If a component needs to be loaded frequently, its activity is high. When the dormant pool meets the release condition, by sorting the number of component loads, the component with the lowest number of loads and the lowest activity is subjected to the component release operation; Release policy based on component loaded resources: Sort according to the time and resources consumed by component loading. When the dormant pool meets the release condition, the component with the least loading time or the least consumed resources is subjected to the component release operation.
[0013] Further, the release condition specifically includes: Release policy based on platform idle operation: Judging according to the platform operation state. If the processor occupancy rate is lower than a certain set value during platform operation, it is considered that the platform is in the idle operation state, and components can be released of resources; Release policy based on the capacity of the dormant pool: According to the setting of the component dormant pool capacity, if the dormant pool is full, a release control operation is performed on the dormant pool.
[0014] Further, the component release specifically includes the following steps: Component object release: Call the component releaseObject() method to destroy its memory object; Component process termination: If the component loading type is Executable, according to its running process ID, call the terminate() method to terminate the component process; Component unloading: Call the unload() method of the corresponding loading device of the component to unload the binary code of the component; Loading capacity recovery: Call the deallocateCapacity() method of the corresponding loading device of the component to recover the allocated loading capacity; Component deregistration: Call the unregisterComponent() method of the component registrar of the application factory component to deregister the waveform component from the registrar.
[0015] To achieve the above object, according to another aspect of the present application, there is provided an SCA waveform creation and release optimization device based on component sleep, which includes: a component sleep parameter parser module: used to parse waveform sleep parameters and determine whether they support sleep; a component sleep policy module: used to configure component sleep policies and control the capacity of the component sleep pool; a component sleep wake-up controller: according to the set component sleep policies and component sleep parameters, perform sleep and wake-up control on the components; a component sleep pool module: used to store relevant information of the sleeping components; a waveform component loading module: used to execute the loading of corresponding components on the loading device object until all components are loaded; a component port connection module: used to connect the ports of the waveform components, and call the connectUsesPorts() method of the component PortAccessor interface to complete the port connection until all ports are connected; a component port disconnection module: this module obtains the list of connected ports of the waveform components and calls the disconnectPorts() method of the component PortAccessor interface to complete the port disconnection; a component release module: used to release the waveform components and recycle resources on the loading device; a component registrar module: used for the registration and cancellation functions of the waveform components.
[0016] Further, the component sleep parameter parser module is mainly used to parse the.prf.xml configuration description file of the waveform component, read the "value" value of the "name" value of "suspend" in its simple element. If this value is true, the component is set to be sleepable; otherwise, the component performs normal loading and unloading operations.
[0017] Further, the component sleep policy module is used to set component sleep policies or add new policies, which are selected through the configuration policy module. The policies are built-in or loaded through dynamic libraries, supporting policy expansion; among them, the detection of the loading activity of components dependent on some policies, the loading time of components, and resource count detection need to be marked on the waveform component loading module to obtain relevant data; the component sleep policy module can configure the capacity of the component sleep pool and the idle running threshold setting of the platform processor occupancy rate according to the richness of platform resources.
[0018] Further, when the component is released, if the component can be set to sleep, the component sleep wake-up controller puts the component information into the component sleep pool module and sets the component process to the background with the running priority lowered; otherwise, it releases the resources normally; when the component is created, if the component can be set to sleep, the component sleep wake-up controller looks up in the sleep pool to see if there is such a sleeping component. If found, it wakes up its process to the foreground and restores the running priority to normal; if not found, it executes the normal component loading process.
[0019] Furthermore, the relevant information of the dormant components stored in the component dormant pool module includes: component ID, component execution process ID, reference of the component running object, and the loading device corresponding to the component.
[0020] Furthermore, the waveform component loading module docks with the component dormant policy module through front and back marking to obtain information on the loading activity detection of components, the loading time of components, and resource count detection information.
[0021] Benefits of this application: A method and device for optimizing the creation and release of SCA waveforms based on component dormancy are provided. The proposed method can, without changing the waveform and the platform, by reading the dormancy configuration parameters of waveform components, according to the component dormancy policy, when releasing waveform components, not perform resource release and process termination operations, but only put the components into the dormant pool according to the policy, put the relevant processes into the background or lower the running priority. When the waveform is created again, the dormant components are awakened, avoiding the time and space overhead of repeated component loading and unloading, effectively improving the efficiency of waveform creation and release. Through dormancy policy optimization, the SCA waveform creation process can be optimized from the minute level to the millisecond level at most, realizing the rapid creation of waveforms. This method can also, according to the specific scenarios of SCA waveform applications, count information such as the loading and unloading time, occupied resources, and running activity of each component of the waveform to formulate different dormancy policies such as first-in-first-out, release during idle time, and release of dormant pool capacity, and optimize the policies in terms of time, space, and energy consumption to improve the usage efficiency of the entire SCA software radio station. At the same time, since its method and device are extended on the core framework platform, and its waveform component loading and port connection still use the SCA standard specification method, it can also ensure the standard compliance of the waveform deployment process. Description of the Drawings
[0022] The drawings constituting a part of this application are used to provide a further understanding of this application, making other features, objectives, and advantages of this application more obvious. The schematic embodiments and their descriptions of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0023] Figure 1 is a flowchart of a method for optimizing the creation and release of SCA waveforms based on component dormancy according to an embodiment of this application;
[0024] Figure 2 is a diagram of the waveform creation preparation step according to an embodiment of this application;
[0025] Figure 3 is a diagram of the waveform component loading step according to an embodiment of this application;
[0026] Figure 4It is a diagram of component release steps according to an embodiment of the present application;
[0027] Figure 5 It is a schematic diagram of the composition of an SCA waveform creation release optimization device based on component sleep according to an embodiment of the present application;
[0028] Figure 6 It is a call interaction flowchart of an SCA waveform creation release optimization device based on component sleep according to an embodiment of the present application. Detailed implementation manners
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to implement the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0032] Refer to Figure 1 As shown, the SCA waveform creation release optimization method based on component sleep of the present application includes the following steps:
[0033] S100 Waveform creation: Parse the waveform SAD configuration file information, obtain the component list, start the components and create a waveform manager instance, complete the waveform creation, and set the sleep configuration parameter values of each component in the waveform to true according to the waveform optimization requirements;
[0034] S200 Waveform start: Start the waveform instance;
[0035] S300 Waveform stop: Stop the waveform instance;
[0036] S400 Waveform Hibernation: If the component hibernation parameter in the waveform is true, sort according to the statistical information such as the loading and unloading time, resource occupancy, and running activity of each component of the waveform, determine the release order of each component of the waveform according to a strategy, set the status of the waveform component to the suspend state, and the device loading the component does not actually unload it;
[0037] S500 Waveform Release: If the component hibernation parameter in the waveform is false, or the remaining loading capacity of the loading device is difficult to meet the minimum requirements for loading new waveform components, call the releaseObject() method of the waveform component to complete the unloading of the waveform component;
[0038] S600 Waveform Re-creation: Determine whether each component of the waveform is in the hibernation state. If it is in hibernation, directly set it to the active state. If it is not in the hibernation state, perform the component loading operation on the loading device.
[0039] Among them, step S100 waveform creation specifically further includes the following steps:
[0040] S110 Waveform Creation Preparation: The user starts the waveform creation operation to create a waveform, and parses and obtains the waveform component information and platform loading device information.
[0041] In this step, further, as Figure 2 shown, the waveform creation preparation process includes the following steps:
[0042] S111 Creation Interface Call: The user calls the create method of the SCA waveform application factory component to start creating a waveform. The parameters of the create operation include the created waveform name, the allocation relationship between components and loading devices, etc.;
[0043] It should be noted that a waveform refers to a series of transformations performed on information in order to achieve wireless transmission of information, usually consisting of multiple components; a waveform component refers to an application software module that implements part of the waveform function; a loading device refers to the functional abstraction of the device used to load waveform components, generally including a central processing unit (CPU), a digital signal processor (DSP), a field programmable gate array (FPGA), etc.
[0044] S112 Waveform Component Information Acquisition: Parse the waveform configuration file to obtain information about each component of the waveform, including component implementation code, configuration parameters, etc.;
[0045] Among them, the waveform configuration file refers to a configuration file that describes the combined functions of the waveform and the interconnection characteristics information between its components. It is usually stored in an XML file with the suffix.sad.xml and can be obtained through the domainProfile attribute interface of the core framework application factory. By parsing the waveform configuration file, information such as component configuration files and component port connection relationships can be obtained;
[0046] The component configuration file refers to a configuration file that describes the implementation information of waveform software components. It is usually stored in an XML file with the suffix.spd.xml and can be obtained by parsing the waveform configuration file. The component information described therein includes the component implementation platform processor, operating system, binary file information (including file name, entry parameters, stack size, priority), etc., which can be obtained by comparing the contents of processor, os, code, etc. in the implementation element of the waveform component configuration file;
[0047] Component configuration parameters are usually stored in an XML file with the suffix prf.xml and can be obtained by parsing the component configuration file. It includes various configuration parameter settings of waveform components. By setting the boolean parameter of suspend in the prf.xml configuration parameter file, it can be determined whether the component is allowed to set the sleep state when the component is loaded. The parser can determine whether the component supports setting the sleep state by parsing the boolean parameter value with the "name" of "suspend".
[0048] S113 Platform loading device information acquisition: Acquire information such as the type and loading capacity of the platform loading device;
[0049] Specifically, when the core framework deploys waveform components, it obtains the device running state by reading the adminState, usageState, and operationalState attribute methods of the platform loading device, and calls the query method of the device to calculate information such as the device loading capacity.
[0050] It should be noted that steps S112 and S113 can be executed in parallel.
[0051] S120 First component sleep strategy judgment: If the set value of the component configuration parameter suspend is true, then enter step S103; otherwise, enter step S104 to normally execute the component loading process.
[0052] S130 Component Wake-up: Search for the component running object from the component sleep pool according to the component ID information. If the sleeping component is found, wake up its process, adjust the running task priority to the normal state, and enter step S150. If the sleeping component is not found, enter step S140 to normally execute the component loading process.
[0053] S140 Component Loading: According to the loading requirements of the waveform component and the allocation relationship of the loading device, load and run the component on the corresponding loading device.
[0054] In this step, further, as Figure 3 shown, the waveform component loading includes the following steps:
[0055] S141 Loading Capacity Allocation: According to the waveform component loading requirements, call the allocateCapacity() method on the loading device to allocate the loading capacity interface;
[0056] S142 Component Loading: Call the load() interface on the loading device to load the waveform component binary code;
[0057] S143 Component Execution: Optionally, if the component loading type is Executable, the execute() method needs to be called on the loading device to execute the binary code of the component and save the component process ID.
[0058] S144 Component Registration: After the component loading is completed, register its own object with the registration manager of the application factory component.
[0059] S150 Component Port Connection: After all waveform components are registered, call the connectUsesPort() method of the component PortAccessor interface to complete the port connection;
[0060] S160 Waveform Initialization Configuration: Search for and obtain the instance of the assembly controller component of the waveform according to the waveform configuration file, and configure the initialization parameters of the waveform.
[0061] S170 Waveform Creation Completed: Return the instance of the application manager component of the waveform.
[0062] Preferably, step S500 specifically further includes the following steps:
[0063] S510 Waveform Release Preparation: The user calls the releaseObject() method of the waveform manager component instance to start releasing the waveform.
[0064] S520 Component Port Disconnection: According to the port connection list of the waveform component, call the disconnectPorts() method of the component PortAccessor interface to complete port disconnection.
[0065] S530 Second Component Hibernation Strategy Judgment: If the set value of the component configuration parameter suspend is true, enter the S540 Component Hibernation step; otherwise, enter the S550 Component Release step.
[0066] S540 Component Hibernation: Set the process running priority of the component to the lowest, and save the component running object information to the component hibernation pool for the S103 Component Wake-up operation when the waveform is recreated. After the component hibernates, enter step S560 and wait for other components to complete the release.
[0067] In this step, when the component hibernates, according to the strategy, the component release operation can be performed on the hibernating components in the pool. Among them, the component hibernation pool release control includes but is not limited to the following:
[0068] S541 First-In-First-Out Strategy: When the hibernation pool reaches the release condition, according to the order of entry into the hibernation pool, perform the S112 Component Release operation on the component that entered the hibernation pool first.
[0069] S543 Release Strategy Based on Component Activity: Statistically analyze according to the component loading history. If the component needs to be loaded frequently, its activity is high. When the hibernation pool reaches the release condition, sort the component loading times and perform the S112 Component Release operation on the component with the lowest loading times and the smallest activity.
[0070] S545 Release Strategy Based on Component Loaded Resources: Sort according to the component loading consumption time and consumed resources. When the hibernation pool reaches the release condition, perform the S112 Component Release operation on the component with the smallest loading consumption time or the smallest consumed resources.
[0071] Furthermore, the component hibernation pool release conditions include but are not limited to the following:
[0072] S542 Release Strategy Based on Platform Idle Operation: Judge according to the platform running state. If the processor occupancy rate is lower than a certain set value during platform operation, it is considered that the platform is in an idle operation state, and the component resources can be released.
[0073] S544 Release Strategy Based on Hibernation Pool Capacity: According to the setting of the component hibernation pool capacity, if the hibernation pool is full, perform the release control operation on the hibernation pool.
[0074] S550 Component Release: Release the component object and the device resources it occupies. After the component is released, proceed to step S113 and wait for other components to complete the release.
[0075] In this step, specifically as Figure 4 shown, the component release includes the following steps:
[0076] S551 Component Object Release: Call the component's releaseObject() method to destroy its memory object.
[0077] S552 Component Process Termination: Optionally, if the component loading type is Executable, call the terminate() method to terminate the component process based on its running process ID.
[0078] S553 Component Unloading: Call the unload() method of the device corresponding to the component to unload the binary code of the component.
[0079] S554 Loading Capacity Recovery: Call the deallocateCapacity() method of the device corresponding to the component to recover the allocated loading capacity.
[0080] S555 Component Deregistration: Call the unregisterComponent() method of the component registrar of the application factory component to deregister the waveform component from the registrar.
[0081] S560 Waveform Release Complete: When all components of the waveform are released, release the instance object of the application manager component of the waveform itself to complete the waveform release operation.
[0082] From the above description, it can be seen that the present application can achieve the following technical effects:
[0083] The waveform re - creation process is faster: During the waveform re - creation process, if there are components in the sleep state, they can be directly awakened without going through the processes of repeated parsing, loading, execution, and configuration, improving the efficiency of waveform re - creation;
[0084] The utilization rate of the loading device capacity is higher: Make full use of the device loading capacity, avoid wasting the space of loading resources, and use space to exchange for operating efficiency.
[0085] The time occupied by the waveform component release process on the device is low: After the component is set to sleep, the resource release can be delayed. Therefore, the device can unload the components truly according to the sleep release controller during the idle time of the platform, and the loading device can respond faster to the current main task operations.
[0086] Note that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0087] According to an embodiment of the present application, there is also provided a device for implementing the above-mentioned SCA waveform creation and release optimization method based on component hibernation, as Figure 5 shown, the device includes:
[0088] M101 Component Hibernation Parameter Parser Module: used to parse the waveform hibernation parameters and determine whether it supports hibernation;
[0089] This module is mainly used to parse the.prf.xml configuration description file of the waveform component, read the "value" value of the "name" value of "suspend" in its simple element. If this value is true, set the component to be hibernatable, otherwise the component will perform the loading and unloading operations normally.
[0090] M102 Component Hibernation Policy Manager Module: used to configure the component hibernation policy and control the capacity of the component hibernation pool;
[0091] This module can set the hibernation policy of the component to several policies in step S114, or add new policies, which can be selected through the configuration policy manager module. The policies can be built-in or loaded through a dynamic library, supporting the extension of policies.
[0092] Among them, for the detection of the loading activity of components, the loading time of components, and the resource count detection relied on in some policies, relevant data needs to be obtained by making marks on the component loading module M105.
[0093] At the same time, this module can configure the capacity of the component hibernation pool and the idle running threshold setting of the platform processor occupancy rate according to the richness of platform resources to meet the needs of various types of hardware platforms.
[0094] M103 Component Hibernation Wake-up Controller: according to the set component hibernation policy and component hibernation parameters, control the hibernation and wake-up of the component;
[0095] When the component is released, if the component can be set to hibernate, put its information into the hibernation pool module M104, set the component process to the background, and lower the running priority; otherwise, release its resources normally.
[0096] When a component is created, if the component can be set to sleep, check the sleep pool to see if there is such a sleeping component. If found, wake up its process to the foreground and restore the normal running priority. If not found, execute the normal component loading process.
[0097] M104 Component Sleep Pool Module: Used to store relevant information of sleeping components.
[0098] The relevant information of the sleeping components stored in the component sleep pool module includes: component ID, component execution process ID, reference of the component running object, loading device ID corresponding to the component, etc.
[0099] M105 Waveform Component Loading Module: Used to execute the loading of corresponding components on the loading device object until all components are loaded;
[0100] This module can be used to dock with the component policy module M102 by adding markers before and after, and obtain information such as component loading activity detection, component loading time, and resource count detection.
[0101] M106 Component Port Connection Module: Used to connect the ports of the waveform components, and call the connectUsesPorts() method of the component PortAccessor interface to complete the port connection until all ports are connected.
[0102] M107 Component Port Disconnection Module: This module obtains the list of connected ports of the waveform components and calls the disconnectPorts() method of the component PortAccessor interface to complete the port disconnection.
[0103] M108 Component Release Module: Used to release waveform components and recycle resources on the loading device, etc.
[0104] M109 Component Registrar Module: Used for the registration and cancellation functions of waveform components.
[0105] Figure 6 It is the call interaction flowchart of the device in this application. According to Figure 1Method steps: When creating a waveform, first call the create() method of the application factory component to create the waveform. When parsing the waveform component, call the sleep parameter parsing module of the M101 component to obtain the component sleep parameters. According to the component sleep parameter settings, call the sleep / wake controller of the M103 component in the device to retrieve the sleeping component from the sleep pool module of the M104 component and wake it up. If the component does not support sleeping, call the waveform component loading module of the M105 to complete the waveform component loading and register it with the register of the M109 component. After all components are loaded, call the component port connection module of the M106 to complete the component port connection. Call the configure() method of the waveform assembly controller component to complete the waveform parameter configuration, and the create() method returns to complete the waveform creation. When releasing the waveform, call the releaseObject() method of the waveform application manager component to start the waveform release. Call the component port disconnection module of the M107 in the device to complete the component port disconnection. According to the component sleep parameter settings, call the sleep / wake controller of the M103 component in the device to store the component information in the sleep pool module of the M104 component and control the release of the components in the sleep pool according to the policy of the M102 component sleep strategy module. If the component does not support sleeping, call the component release module of the M108 and unregister the component from the register of the M109 component at the same time. After the component release is completed, the releaseObject() method returns and the waveform release is completed.
[0106] The method and device of this application solve the problem of efficiency optimization during waveform creation and release. The proposed method can, without changing the waveform and the platform, by reading the sleep configuration parameters of the waveform components, according to the component sleep strategy, not perform resource release and process termination operations when releasing the waveform components, but only put the components into the sleep pool according to the strategy, put the relevant processes into the background or lower the running priority. When the waveform is created again, the sleeping component is woken up, avoiding the time and space overhead of repeated component loading and unloading, effectively improving the waveform creation and release efficiency. Through sleep strategy optimization, the SCA waveform creation process can be optimized from the minute level to the millisecond level at most, realizing the rapid creation of the waveform. This method can also formulate different sleep strategies such as first-in-first-out, release during idle time, and release of the sleep pool capacity according to the specific scenario of the SCA waveform application, and optimize the strategy in terms of time, space, and energy consumption to improve the usage efficiency of the entire SCA software radio station. At the same time, since its method and device are extended on the core framework platform, and its waveform component loading and port connection still use the SCA standard specification method, it can also ensure the standard compliance of the waveform deployment process.
[0107] Obviously, those skilled in the art should understand that the various modules or steps of the present application described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, the present application is not limited to any specific combination of hardware and software.
[0108] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. An SCA waveform creation and release optimization method based on component sleep, characterized in that: It includes the following steps: Waveform creation: Parse the waveform SAD profile information, obtain the component list, start the components and create a manager instance of the waveform, complete the waveform creation, and according to the waveform optimization requirements, set the sleep configuration parameter values of each component in the waveform to true; Waveform start: Start the waveform instance; Waveform stop: Stop the waveform instance; Waveform sleep: If the component sleep parameter in this waveform is true, then sort according to the loading and unloading time, occupied resources, and running activity statistics of each component of the waveform, determine the release order of each component of the waveform according to a strategy, set the status of the waveform component to the sleep suspend state, and the device loading the component does not actually unload it; Waveform release: If the component sleep parameter in this waveform is false, or the remaining loading capacity of the loading device is difficult to meet the minimum requirements for loading new waveform components, call the releaseObject() method of the waveform component to complete the unloading of the waveform component; Waveform re-creation: Determine whether each component of the waveform is in a sleep state. If it is in a sleep state, directly set it to an active state. If it is not in a sleep state, perform a component loading operation on the loading device.
2. The SCA waveform creation release optimization method based on component hibernation according to claim 1, wherein: The waveform creation specifically includes the following steps: Waveform creation preparation: The user starts the waveform creation operation to create a waveform, and parses and obtains the waveform component information and platform loading device information; First component sleep strategy judgment: If the set value of the component configuration parameter suspend is true, then wake up the component, otherwise execute the component loading process normally; Component wake-up: Search for the component running object in the component sleep pool according to the component ID information. If the sleeping component is found, wake up its process, adjust the running task priority to the normal state, and perform component port registration. If the sleeping component is not found, execute the component loading process normally; Waveform component loading: According to the loading requirements of the waveform components and the allocation relationship of the loading devices, load and run the components on the corresponding loading devices; Component port connection: After all components of the waveform are registered, call the connectUsesPort() method of the component PortAccessor interface to complete the port connection; Waveform initialization configuration: Find and obtain the assembly controller component instance of the waveform according to the waveform configuration file, and perform initialization parameter configuration on the waveform; Waveform creation completed: Return the application manager component instance of the waveform.
3. The method for optimizing the creation and release of SCA waveforms based on component sleep according to claim 2, wherein: The waveform creation preparation specifically includes the following steps: Create interface call: The user calls the create method of the SCA waveform application factory component to start creating a waveform. The parameters of the create operation include the name of the created waveform and the allocation relationship between the components and the loading devices; Waveform component information acquisition: Parse the waveform configuration file to obtain the information of each component of the waveform, including the component implementation code, configuration parameters, component configuration file, and component port connection relationship; Platform Loading Device Information Acquisition: Obtain the type and loading capacity of the platform loading device. When deploying waveform components in the core framework, the operating state of the device is obtained by reading the adminState, usageState, and operationalState attributes of the platform loading device, and the query method of the platform loading device is called to calculate the loading capacity.
4. The method for optimizing the creation and release of SCA waveforms based on component sleep according to claim 2, wherein: The specific loading of the waveform component includes the following steps: Loading Capacity Allocation: According to the waveform component loading requirements, call the allocateCapacity() method on the loading device to allocate the loading capacity interface; Component Loading: Call the load() interface on the loading device to load the waveform component binary code; Component Execution: If the component loading type is Executable, the execute() method needs to be called on the loading device to execute the binary code of the component and save the component process ID; Component Registration: After the component is loaded, register its own object with the registration manager of the application factory component.
5. The method for optimizing the creation and release of SCA waveforms based on component sleep according to claim 2, wherein: The specific waveform release includes the following steps: Waveform Release Preparation: The user calls the releaseObject() method of the waveform manager component instance to start releasing the waveform; Component Port Disconnection: According to the port connection list of the waveform component, call the disconnectPorts() method of the component PortAccessor interface to complete port disconnection; Second Component Sleep Strategy Judgment: If the setting value of the component configuration parameter suspend is true, enter the component sleep step, otherwise enter the component release step; Component Sleep: Set the process priority of the component to the lowest, and save the component running object information to the component sleep pool for component wake-up operations when the waveform is recreated; after the component sleeps, enter the waveform release completion step and wait for other components to complete the release; Component Release: Release the component object and the device resources it occupies. After the component is released, enter the waveform release completion step and wait for other components to complete the release; Waveform Release Completion: When all components of the waveform are released, release the instance object of the application manager component of the waveform itself to complete the waveform release operation.
6. The method for optimizing the creation and release of SCA waveforms based on component sleep according to claim 5, wherein: When the component is sleeping, according to the policy, perform component release operations on the sleeping components in the sleep pool. The release control of the component sleep pool includes the following policies: First In First Out Policy: When the sleep pool reaches the release condition, perform component release operations on the components that entered the sleep pool first according to the order of entry; Release Policy Based on Component Activity: Statistically analyze based on the loading history of the component. If the component needs to be loaded frequently, its activity is high. When the sleep pool reaches the release condition, sort the components by the number of loads and perform component release operations on the component with the lowest number of loads and the lowest activity; Release Policy Based on Component Loading Resources: Sort according to the time and resources consumed by component loading. When the sleep pool reaches the release condition, perform component release operations on the component with the least loading time or the least resource consumption; 7. The method for optimizing the creation and release of SCA waveforms based on component sleep according to claim 6, wherein: The specific release conditions include: Release strategy based on idle platform operation: Determine according to the platform operation status. If the processor occupancy rate is lower than a certain set value during platform operation, it is considered that the platform is in an idle operation state, and resources of components can be released. Release strategy based on the capacity of the sleep pool: According to the setting of the component sleep pool capacity, if the sleep pool is full, perform release control operations on the sleep pool.
8. The SCA waveform creation release optimization method based on component sleep according to claim 5, characterized in that: The specific component release includes the following steps: Component object release: Call the releaseObject() method of the component to destroy its memory object. Component process termination: If the component loading type is Executable, call the terminate() method to terminate the component process according to its running process ID. Component unloading: Call the unload() method of the corresponding loading device of the component to unload the binary code of the component. Loading capacity recovery: Call the deallocateCapacity() method of the corresponding loading device of the component to recover the allocated loading capacity. Component deregistration: Call the unregisterComponent() method of the component registrar of the application factory component to deregister the waveform component from the registrar.
9. An SCA waveform creation and release optimization device based on component sleep, which is used to implement the SCA waveform creation and release optimization method based on component sleep according to any one of claims 1 to 8, and is characterized in that: Including, Component sleep parameter parser module: Used to parse waveform sleep parameters and determine whether it supports sleep. Component sleep strategy manager module: Used to configure the component sleep strategy and control the capacity of the component sleep pool. Component sleep wake-up controller: Control the sleep and wake-up of the component according to the set component sleep strategy and component sleep parameters. Component sleep pool module: Used to store relevant information of sleeping components. Waveform component loading module: Used to execute the loading of the corresponding component on the loading device object until all components are loaded. Component port connection module: Used to connect the ports of the waveform component. Call the connectUsesPorts() method of the component PortAccessor interface to complete the port connection until all ports are connected. Component port disconnection module: This module obtains the list of connected ports of the waveform component and calls the disconnectPorts() method of the component PortAccessor interface to complete the port disconnection. Component release module: Used to release the waveform component and recycle resources on the loading device. Component registrar module: Used for the registration and deregistration functions of waveform components.
10. The SCA waveform creation release optimization device based on component hibernation according to claim 9, characterized in that: The component sleep parameter parser module is mainly used to parse the.prf.xml configuration description file of the waveform component, read the "value" value of the "name" value of "suspend" in its simple element. If this value is true, set the component to be sleepable; otherwise, the component will perform normal loading and unloading operations.
11. The SCA waveform creation release optimization device based on component hibernation according to claim 9, characterized in that: The component sleep strategy manager module is used to set the sleep strategy of the component or add new strategies. Select through the configuration strategy manager module. The strategies are built-in or loaded through dynamic libraries, supporting the extension of strategies. Among them, for the detection of the loading activity of components relied on in some strategies, the detection of the loading time of components, and the detection of resource counts, relevant data needs to be obtained by making marks on the waveform component loading module. The component sleep policy module can configure the capacity of the component sleep pool and set the idle running threshold of the platform processor occupancy rate according to the richness of platform resources.
12. The SCA waveform creation release optimization device based on component sleep according to claim 9, characterized in that: When a component is released, if the component can be set to sleep, the component sleep wake-up controller puts the component information into the component sleep pool module and sets the component process to the background with the running priority lowered; otherwise, it releases the resources normally. When a component is created, if the component can be set to sleep, the component sleep wake-up controller checks whether there is such a sleeping component in the sleep pool. If found, it wakes up its process to the foreground and restores the running priority to normal; if not found, it executes the normal component loading process.
13. The SCA waveform creation and release optimization device based on component sleep according to claim 9, characterized in that: The relevant information of the sleeping components stored in the component sleep pool module includes: component ID, component execution process ID, reference to the component running object, and the loading device corresponding to the component.
14. The SCA waveform creation release optimization device based on component hibernation according to claim 9, characterized in that: The waveform component loading module docks with the component sleep policy module through making marks before and after, and obtains the detection information of the loading activity of components, the loading time of components, and resource count detection.
Citation Information
Patent Citations
SCA-based waveform dynamic switching method
CN108776602A
Multi-waveform instance deployment method and waveform instance unloading method based on deployment tree
CN111399859A