Unified Cookie Storage for Mini App Cross-Stack Session Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Mini app technologies face challenges in managing sessions across different technology stacks, particularly with WebView and NA capabilities, as they cannot uniformly acquire and store cookies, hindering services like resource payment for images and videos.

Innovation Solution

A data processing method and apparatus that intercepts request messages from any technology stack, acquires and stores cookie content from a target server, and returns the data to the appropriate stack, unifying cookie storage and carrying behaviors across different technology stacks within a mini app.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If cookie storage is implemented only in the logic layer through developer self-maintenance, then the logic layer can manage sessions, but WebView and NA capabilities cannot manage sessions uniformly, causing technical troubles

Engineering Contradiction:
Improvesession management capabilityVSAvoidtechnology stack complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a unified cookie storage mechanism that works across all three technology stacks (logic layer, WebView, and NA capabilities) through a common database interface. The CookieStorageDatabase class provides universal cookie storage functionality that can be accessed by any technology stack, eliminating the need for separate implementation in each stack while maintaining session management capability throughout the mini app ecosystem.

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

Solution Approach 2:

The patent introduces a standardized cookie storage interface and database structure that acts as an intermediary between different technology stacks and the cookie data. This intermediate layer abstracts the storage mechanism, allowing various stacks to interact with cookie data through a common protocol without directly accessing each other's implementation details, thus resolving the complexity of multi-stack cookie management.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If separate cookie storage mechanisms are used for each technology stack, then each stack can independently manage cookies, but uniform session management across stacks becomes impossible

Engineering Contradiction:
Improvesession management reliabilityVSAvoidcookie storage operation
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The unified CookieStorageDatabase provides a single, reliable storage mechanism that all technology stacks can use consistently. By implementing a common database structure with standardized methods for setting, getting, deleting, and checking cookies, the patent ensures that session management behaves reliably and predictably across logic layer, WebView, and NA capabilities, eliminating the need for stack-specific storage logic.

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

Solution Approach 2:

The patent enforces homogeneous cookie storage operations across all technology stacks by providing a unified database interface with consistent methods. All stacks interact with cookies through the same set of operations (setCookie, getCookie, deleteCookie, hasCookie), ensuring uniform behavior and simplifying the ease of operation while maintaining reliability across the entire mini app system.

Inventive Principle:
Principle #33Homogeneity

3Ease of manufacture

If cookie data is stored without separation, then storage is simple, but data security between different mini apps is compromised

Engineering Contradiction:
Improvestorage implementation simplicityVSAvoiddata security risk
Core Design Contradiction:
Ease of manufactureVSObject-affected harmful factors

Solution Approach 1:

The patent segments the cookie storage space by creating separate storage sandboxes for different mini apps using the getAppId() method. Each mini app's cookies are stored in an isolated namespace prefixed with its unique application ID, ensuring that one mini app cannot access another's cookie data. This segmentation maintains implementation simplicity while providing robust data security through automatic namespace isolation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by providing each mini app with its own dedicated cookie storage sandbox while maintaining a unified database structure. The storage mechanism adapts to local security requirements by automatically isolating data based on application ID, allowing simple unified implementation while ensuring each app's data remains secure and inaccessible to other apps.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11615159B2Data processing method for mini app, apparatus, device and medium
Publication Date: 2023.03.28 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11615159B2 patent drawing
  • US11615159B2 patent drawing
  • US11615159B2 patent drawing

AI summary

A data processing method and apparatus for a mini app, a device and a medium are provided. An implementation of the method may include: intercepting a request message of the mini app, and sending the request message to a target server, where the request message comes from a technology stack; acquiring returned data targeting at the request message and returned from the target server, where the returned data includes cookie content, field information for indicating storage of the cookie content, and a data set corresponding to the request message; and storing the cookie content into a cookie storage database of the mini app according to the field information, and returning the returned data to the technology stack issuing the request message.