Dynamic Code Selection for Energy Policy Adaptation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current energy management systems lack the ability to dynamically adjust code to match varying energy policies on devices, leading to inefficiencies in resource allocation and consumption.

Innovation Solution

A method and system that dynamically replace code segments within a software application based on an active data or energy policy, using annotated code segments and a networked architecture to generate and select alternate code segments that align with the device's current energy policy, optimizing resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Use of energy by moving object

If a single code segment is used for all devices, then device complexity is reduced, but energy efficiency cannot be optimized for different energy policies

Engineering Contradiction:
Improveenergy efficiencyVSAvoidcode complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The system dynamically selects and loads code segments at runtime based on the device's active energy policy. The code base is organized into multiple segments, each optimized for specific energy policies (e.g., power saver, performance mode), allowing the application to adapt its behavior without recompilation. This dynamic selection mechanism enables energy optimization while maintaining a manageable code structure through modular organization.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The application code is divided into multiple segments, each optimized for different energy policies. Annotations in the source code identify alternative implementations for different energy scenarios. The build system generates separate compiled segments for each energy policy, which are then selectively loaded at runtime based on the device's current policy, resolving the contradiction between code complexity and energy efficiency.

Inventive Principle:
Principle #1Segmentation

2Productivity

If multiple code segments are created for different energy policies, then energy efficiency is improved, but device complexity and resource management become more complex

Engineering Contradiction:
Improveresource allocation efficiencyVSAvoidcode management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The code segmentation system is designed to be universally applicable across different energy policies and device types. A single annotation syntax and build configuration process handles multiple energy policies, and the runtime selection mechanism works uniformly regardless of the specific policy active. This universal approach simplifies resource management by providing a consistent interface for policy-based code selection across diverse scenarios.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system includes automated build tools that generate the appropriate code segments and selection logic during the compilation process. The runtime system automatically detects the active energy policy and selects the corresponding code segment without requiring manual intervention. This self-service automation reduces the complexity burden on developers and users by handling code management tasks automatically.

Inventive Principle:
Principle #25Self-service

3Adaptability or versatility

If code is statically compiled for a specific energy policy, then execution speed is improved, but adaptability to changing energy policies is reduced

Engineering Contradiction:
Improveenergy policy adaptabilityVSAvoidcode execution speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

All possible code segments for different energy policies are pre-compiled and prepared in advance during the build process. When the application runs, the system simply selects from these pre-prepared segments rather than compiling at runtime. This preliminary compilation action maintains execution speed by avoiding runtime compilation overhead while still enabling adaptability through selective loading of pre-compiled segments.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of code segments optimized for different energy policies, with each copy tailored to specific policy requirements. These copies are generated through automated build processes that replicate the base code with policy-specific optimizations. At runtime, the appropriate copy is selected and loaded, providing both the adaptability of having multiple versions and the speed of using pre-compiled native code.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9606783B2Dynamic code selection based on data policies
Publication Date: 2017.03.28 KYNDRYL INC
  • US9606783B2 patent drawing
  • US9606783B2 patent drawing
  • US9606783B2 patent drawing

AI summary

In a method for dynamically replacing code within a software application on a device, an annotated code segment that performs a function according to a first data policy is received. The computer determines an alternate segment that performs the function according to a second data policy.