A configurable prompt tone policy processing method and system for intelligent terminals
By creating a standardized data structure and uploading audio resources in a dual-channel mode in the CMS backend of the smart terminal, and combining the MQTT protocol and LRU algorithm to manage the cache, the problems of configuration flexibility and insufficient storage in the smart terminal prompt sound management solution are solved, enabling rapid response to operational needs and terminal stability.
Patent Information
- Application Number
- CN202611195595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-27
AI Technical Summary
Existing smart terminal prompt tone management solutions lack configuration flexibility and dynamic scheduling strategies, making them unsuitable for the refined operation needs of large-scale terminals. Furthermore, they cannot adapt to the insufficient storage and decoding capabilities of embedded terminals, resulting in high maintenance costs, frequent configuration errors, and conflicts and confusion among multiple rules.
The system uses a CMS backend to create a standardized data structure for prompt tone policy plans. Audio resources are uploaded in a dual-channel mode and multi-level verification is performed. The terminal pushes incremental policy data packets based on the MQTT protocol. Combining time and space validity judgments, policy arbitration is completed according to priority weights, and the LRU algorithm is used to manage the cache.
It enables the configuration of prompt sounds with a minute-level effective cycle, supports multi-dimensional policy scheduling, avoids prompt sound errors, ensures configuration compliance and terminal stability, and reduces operation and maintenance costs and storage overhead.
Smart Images

Figure CN123178352A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of human-computer interaction technology for smart hardware and edge computing technology for the Internet of Things, specifically to a configurable prompt sound strategy processing method and system for smart terminals. Background Technology
[0002] Currently, unattended smart terminals equipped with audio playback functions, such as vending machines, smart parcel lockers, self-service ticket terminals, and public information kiosks, are widely used in the Internet of Things (IoT). Audio prompts are an important way for these devices to achieve human-computer interaction and event feedback. At present, the industry mainly manages the prompts of smart terminals using pre-programmed firmware or over-the-air (OTA) firmware updates. Specifically,
[0003] As terminal deployments expand and operation management becomes more refined, the drawbacks of the aforementioned traditional solutions are becoming increasingly apparent. First, they lack configuration flexibility. The deep coupling between alert sounds and device trigger actions means that even minor adjustments to the alert sound content or playback rules require firmware recompilation and re-release, resulting in high maintenance costs and time consumption. Second, they lack dynamic scheduling strategies. Existing systems cannot differentiate configurations based on time period, geographical location, or policy priority, easily leading to problems such as invalid alert sound playback and conflicting rules. Specifically,
[0004] Meanwhile, the traditional model lacks centralized management capabilities, lacking both a unified backend configuration interface and standardized review processes, as well as a standardized audio effect resource library. This makes it highly susceptible to problems such as file configuration errors, audio copyright violations, and non-compliant operation and maintenance. Furthermore, existing solutions are not designed to adapt to the hardware limitations of embedded terminals, and fail to formulate file verification and caching management rules based on the device's limited storage space and decoding performance, further restricting the system's flexibility and scalability. Specifically,
[0005] In summary, existing prompt tone management solutions are no longer adequate for the refined operational needs of large-scale IoT terminals. There is an urgent need in the industry to develop a prompt tone management solution that can decouple sound effect assets from business logic, support spatiotemporal multi-dimensional strategy scheduling, have a compliance review mechanism, and be compatible with low-resource embedded terminals. Summary of the Invention
[0006] To address these issues, the present invention provides a configurable prompt tone strategy processing method and system for smart terminals, which solves the problems of traditional prompt tone configuration relying on firmware upgrades, high change costs, lack of spatiotemporal and priority multi-dimensional scheduling strategies, lack of standardized review processes, and inability to adapt to the insufficient storage and decoding capabilities of embedded terminals.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a configurable prompt sound strategy processing method for smart terminals, comprising:
[0008] S1. Create a notification sound policy plan through the CMS backend, and build a standardized data structure including basic information, notification sound policy configuration, and spatial activity range; at the same time, upload / select audio resources through dual-channel mode, and perform multi-level verification on sound effect files;
[0009] S2. Manage the status flow of newly created policies through the review process engine. Verify the validity of the policy before it is approved. After the verification is passed, complete the policy release and retain the operation and maintenance logs.
[0010] S3. The terminal policy is based on the MQTT protocol and pushes a lightweight JSON format incremental policy data packet to the target smart terminal; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool.
[0011] S4. When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out the candidate effective strategy set; if there are multiple strategies in the candidate effective strategy set, it completes conflict arbitration according to priority weight to determine the unique strategy to be executed.
[0012] S5. The terminal audio execution engine searches for local sound effect files according to the execution strategy. If the sound effect file exists, it is directly decoded and played. If the sound effect file does not exist, it is downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm is used to clean up local low-frequency and expired sound effect caches to maintain terminal storage space.
[0013] As a preferred embodiment of the configurable prompt sound policy processing method for smart terminals, in S1, the basic information includes a policy unique identifier ID, policy name, policy description, effective start and end timestamps, and priority weight value.
[0014] The prompt sound strategy configuration establishes a mapping table between the trigger action enumeration value and the unique identifier of the sound effect resource, and binds them in batches; during the interaction of the graphical user interface, the trigger actions that have been associated with the current strategy are grayed out and cannot be selected in the candidate list;
[0015] The activity scope defines the effective domain of the policy space, including the scope of inclusion by administrative division, custom geofence labels, and device location ID, as well as the exclusion scope of the device location blacklist.
[0016] As a preferred solution for a configurable prompt sound strategy processing method for smart terminals, in S1, the dual-channel mode includes two access channels: local file upload and existing file library retrieval.
[0017] The sound effect files undergo three levels of mandatory verification before being added to the database:
[0018] Level 1 format verification: Forces a check of file extension and MIME type, allowing MP3 format files to pass;
[0019] Level 2 capacity check: Forces a check on the binary size of the file, allowing files that do not exceed a preset threshold to pass through;
[0020] The third level of deduplication verification: calculate the MD5 hash value of the file. If a file with the same filename and MD5 hash exists in the file library, the redundant write is rejected and the existing resource link is returned.
[0021] The verified audio files are stored in a distributed object storage cluster, and a unique identifier for the audio resource containing the URL, MD5 hash, and file size is generated.
[0022] The three-level mandatory verification serial determination rule is as follows:
[0023]
[0024] In the formula, For file extensions, For file MIME type, This refers to the binary size of the audio file, in bytes. This is the upper limit threshold for capacity. The file's MD5 hash value. For filename, It is a cloud-based audio file library.
[0025] As a preferred solution for a configurable prompt sound strategy processing method for smart terminals, in S2, the review process engine has a built-in state machine logic, and the prompt sound strategy plan flows sequentially between the draft, pending review, approved, published, and rejected states.
[0026] Before the review is approved, check whether the policy end timestamp is greater than the current server system timestamp. If the check fails, the review operation is blocked and a policy expiration message is displayed. If the check passes, the reviewer's employee number, operation timestamp, and policy change content are recorded, and the operation log is generated.
[0027] As a preferred embodiment of the configurable prompt sound strategy processing method for smart terminals, the state machine set is as follows:
[0028]
[0029] The fixed flow path is:
[0030]
[0031] The formula for determining the approval time is as follows:
[0032]
[0033] In the formula, This is the strategy's end timestamp; This is the current server system timestamp.
[0034] As a preferred embodiment of the configurable prompt sound policy processing method for smart terminals, in S3, the incremental policy data packet includes policy number, version number, priority, time rule, spatial rule, and trigger action-sound effect mapping relationship;
[0035] After receiving the incremental policy data packet, the smart terminal does not perform a full Flash erase operation, but only updates the policy index table in the local SQLite database / KV storage, and refreshes the effective policy cache pool according to the local real-time clock and spatial location information.
[0036] As a preferred solution for a configurable prompt sound strategy processing method for smart terminals, in S4, the time validity determination parses the period type field in the prompt sound strategy plan. The period type includes unlimited, daily cycle, and weekly custom weekday combination. Combined with the start and end time period array, a Boolean time validity determination function is generated.
[0037] The formula for determining time validity is as follows:
[0038]
[0039] In the formula, The current time corresponding to the terminal's RTC real-time clock. For strategy cycle type, , The start and end times of the strategy's single time period. For the weekday set that takes effect weekly;
[0040] The spatial validity determination function analyzes the activity range type and blacklist data, and combines the real-time GPS coordinates of the smart terminal and the network base station positioning information / inherent point ID to generate a Boolean spatial validity determination function.
[0041] The formula for determining the validity of a space is as follows:
[0042]
[0043] In the formula, For terminal location information, This is a whitelist set for the policy's effective space. A blacklist set for the strategy space;
[0044] When both the time validity determination and the space validity determination results are valid, the corresponding strategy enters the candidate valid strategy set; the candidate valid strategy set is sorted in descending order of priority weight value, and the strategy with the highest weight value is selected as the strategy to be executed; if the candidate valid strategy set is empty, the smart terminal executes the system default prompt sound strategy.
[0045] As a preferred embodiment of the configurable prompt sound policy processing method for smart terminals, in S5, the terminal audio execution engine runs on an embedded Linux / RTOS real-time operating system, and queries the local valid policy cache pool using the current triggered action ID as an index; if multiple valid policy records are matched, the conflict arbitration is called to determine the target policy with the highest priority.
[0046] Check if the audio effect file with the MD5 value specified by the target policy exists in the local Flash storage; if the audio effect file exists, read it directly from the local Flash and load it into the memory decoding buffer, call the underlying audio decoding interface to convert the MP3 data stream into a PCM data stream and then play it; if the audio effect file does not exist, the terminal initiates a Range request to the CDN via the HTTPS protocol, downloads the audio stream to a temporary buffer and plays it while downloading, and persists the file to Flash and updates the LRU list after playback is complete.
[0047] As a preferred scheme for configurable prompt tone strategy processing methods for smart terminals, the LRU algorithm formula is:
[0048] Cache hit: ,Will Move to head;
[0049] Cache missed: Download from CDN and write to cache;
[0050] like : Add directly to the cache and the head of the linked list;
[0051] like :disuse The tail node is then written to the head of the linked list in a new file.
[0052] In the formula, For the terminal's local audio effect cache pool, Maximum cache capacity This is an LRU ordered linked list, where the head of the list is the most recently used list and the tail is the least recently used list. This is the audio file to be loaded.
[0053] This invention also provides a configurable prompt tone policy processing system for smart terminals, employing the aforementioned configurable prompt tone policy processing method for smart terminals, including:
[0054] Policy configuration building unit: Used to create alert sound policy plans through the CMS backend, and build a standardized data structure including basic information, alert sound policy configuration, and spatial activity range; at the same time, it uploads / selects audio resources in dual-channel mode and performs multi-level verification on sound effect files;
[0055] Policy review and release unit: Used to manage the status flow of newly created policies through the review process engine. Before the policy is approved, the policy validity is verified. After the verification is passed, the policy is released and the operation and maintenance logs are stored.
[0056] Policy Increment Synchronization Unit: Used for pushing lightweight JSON format incremental policy data packets to the target smart terminal based on the MQTT protocol; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool.
[0057] Multi-dimensional strategy determination and conflict arbitration unit: When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out the candidate effective strategy set; if there are multiple strategies in the candidate effective strategy set, it performs conflict arbitration according to priority weight to determine the unique strategy to be executed.
[0058] The prompt tone playback and cache management unit is used by the terminal audio execution engine to retrieve local sound effect files according to the execution strategy. If the sound effect file exists, it is directly decoded and played; if the sound effect file does not exist, it is downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm is used to clean up local low-frequency and expired sound effect caches to maintain terminal storage space.
[0059] The present invention has the following advantages:
[0060] First, this invention relies on a complete logical system of CMS backend configuration, cloud-based review and distribution, shortening the effective period of prompt sound configuration changes from the traditional weekly firmware release to minutes. It also supports strategy-based canary releases and A / B sound effect testing based on terminal tags, device groups, or specified ratios, enabling rapid response to the operational needs of various instantaneous marketing campaigns.
[0061] Secondly, this invention establishes a three-dimensional joint effect model of time, space, and priority in the field of IoT embedded terminals. For multi-strategy conflict scenarios caused by the superposition of different time periods and different geographical locations, it can complete deterministic arbitration based on preset priority weights, thereby avoiding the problem of disordered playback of prompts from the root.
[0062] Third, the system introduces an audit state machine and performs policy expiration interception verification in conjunction with server time. All officially launched configurations undergo manual review and confirmation to ensure the legality and compliance of the configuration logic. The entire process can fully retain operation and maintenance records, meeting the stringent requirements for operation and maintenance traceability and compliance control in scenarios such as financial self-service terminals and government service kiosks.
[0063] Fourth, cloud-based settings include three levels of pre-verification: format, size, and MD5 deduplication. This enforces a restriction to only MP3 format audio files under 500KB for inclusion in the library, pre-adapting to the decoding performance and buffer limits of mainstream ARM Cortex-M series MCUs, effectively preventing terminal restarts due to audio decoding anomalies. A strategy incremental synchronization and lazy loading scheme for audio effects is adopted, where the terminal only synchronizes lightweight strategy data rather than complete audio files. Combined with CDN on-demand download and LRU cache eviction mechanisms, even low-configuration terminals with only 2MB of free Flash can stably manage over 200 differentiated prompt tone strategies, significantly improving the scalability of the solution on low-cost hardware. Relying on a unified audio file library and file deduplication mechanism, the same audio file can be reused by multiple strategies, reducing terminal storage overhead by over 30% and achieving intensive utilization of storage resources. Attached Figure Description
[0064] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0065] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0066] Figure 1 This is a schematic diagram of the configurable prompt sound strategy processing method for smart terminals provided in Embodiment 1 of the present invention;
[0067] Figure 2 This is a technical roadmap for the configurable prompt sound strategy processing method for smart terminals provided in Embodiment 1 of the present invention;
[0068] Figure 3This is a schematic diagram of the overall architecture of the configurable prompt sound strategy processing system for smart terminals provided in Embodiment 1 of the present invention;
[0069] Figure 4 This is a schematic diagram of the operation interface of the CMS backend configuration module of the configurable prompt sound policy processing system for smart terminals provided in Embodiment 1 of the present invention.
[0070] Figure 5 This is a flowchart of the data processing of the multi-dimensional effective strategy parsing module in the configurable prompt sound strategy processing system for smart terminals provided in Embodiment 1 of the present invention;
[0071] Figure 6 This is a flowchart of the terminal audio execution engine of the configurable prompt sound strategy processing system for smart terminals provided in Embodiment 1 of the present invention;
[0072] Figure 7 This is a data flow diagram of the sound effect resource collaborative management module of the configurable prompt sound strategy processing system for smart terminals provided in Embodiment 1 of the present invention;
[0073] Figure 8 This is a schematic diagram of the architecture of a configurable prompt sound strategy processing system for smart terminals provided in Embodiment 1 of the present invention. Detailed Implementation
[0074] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0075] Example 1
[0076] See Figure 1 and Figure 2 This invention provides a configurable prompt sound strategy processing method for smart terminals, including:
[0077] S1. Create a notification sound policy plan through the CMS backend, and build a standardized data structure including basic information, notification sound policy configuration, and spatial activity range; at the same time, upload / select audio resources through dual-channel mode, and perform multi-level verification on sound effect files;
[0078] S2. Manage the status flow of newly created policies through the review process engine. Verify the validity of the policy before it is approved. After the verification is passed, complete the policy release and retain the operation and maintenance logs.
[0079] S3. The terminal policy is based on the MQTT protocol and pushes a lightweight JSON format incremental policy data packet to the target smart terminal; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool.
[0080] S4. When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out the candidate effective strategy set; if there are multiple strategies in the candidate effective strategy set, it completes conflict arbitration according to priority weight to determine the unique strategy to be executed.
[0081] S5. The terminal audio execution engine searches for local sound effect files according to the execution strategy. If the sound effect file exists, it is directly decoded and played. If the sound effect file does not exist, it is downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm is used to clean up local low-frequency and expired sound effect caches to maintain terminal storage space.
[0082] Specifically, this method adopts a layered architecture principle of "centralized cloud management and autonomous edge decision-making." Complex computational logic such as policy configuration, approval, and resource management is deployed on cloud servers, while lightweight logic such as policy judgment and playback execution is offloaded to the local terminal for execution. This primarily decouples audio assets from terminal business logic. The cloud is responsible for uniformly generating standardized policy rules and synchronizing them to the terminal via a lightweight protocol. The terminal only needs to complete policy matching and playback based on its local clock, location information, and cached data, without relying on a real-time network. This approach not only addresses the hardware limitations of IoT embedded terminals with limited computing power and storage resources but also meets the operational needs of large-scale terminal batch management and rapid policy implementation.
[0083] In one possible embodiment, in S1, the basic information includes a policy unique identifier ID, a policy name, a policy description, an effective start and end timestamp, and a priority weight value.
[0084] The prompt sound strategy configuration establishes a mapping table between the trigger action enumeration value and the unique identifier of the sound effect resource, and binds them in batches; during the interaction of the graphical user interface, the trigger actions that have been associated with the current strategy are grayed out and cannot be selected in the candidate list;
[0085] The activity scope defines the effective domain of the policy space, including the scope of inclusion by administrative division, custom geofence labels, and device location ID, as well as the exclusion scope of the device location blacklist.
[0086] Specifically, by defining the basic attributes, mapping relationships, and effective scope of policies through unified fields, all policies adhere to the same data specifications. This supports standardized processing in subsequent review, synchronization, and parsing modules, and facilitates policy reuse, version management, and batch maintenance. The unique identifier ID is used for end-to-end policy tracking, and the priority weight value provides a basis for subsequent multi-policy conflict arbitration. The front-end interface uses status marking logic to remove and gray out bound trigger actions from the selectable set, essentially a pre-emptive conflict prevention mechanism. This prevents the same trigger action from being repeatedly bound to multiple sound effect rules during the configuration phase, reducing the probability of policy conflicts on the terminal side and lowering the configuration error rate. Through a three-level inclusion scope of administrative division, geographical tag, and location ID, combined with a blacklist exclusion mechanism, flexible spatial granularity control is achieved. This supports large-scale unified configuration at the city level, as well as group configuration by scene tags, such as office buildings and scenic spots, and also allows for customized settings for individual locations. The blacklist is used to quickly exclude special locations that do not need to take effect, eliminating the need for repeated adjustments to the inclusion scope and improving configuration efficiency.
[0087] In one possible embodiment, in S1, the dual-channel mode includes two access channels: local file upload and access to an existing file library.
[0088] The sound effect files undergo three levels of mandatory verification before being added to the database:
[0089] Level 1 format verification: Forces a check of file extension and MIME type, allowing MP3 format files to pass;
[0090] Level 2 capacity check: Forces a check on the binary size of the file, allowing files that do not exceed a preset threshold to pass through;
[0091] The third level of deduplication verification: calculate the MD5 hash value of the file. If a file with the same filename and MD5 hash exists in the file library, the redundant write is rejected and the existing resource link is returned.
[0092] The verified audio files are stored in a distributed object storage cluster, and a unique identifier for the audio resource containing the URL, MD5 hash, and file size is generated.
[0093] The three-level mandatory verification serial determination rule is as follows:
[0094]
[0095] In the formula, For file extensions, For file MIME type, This refers to the binary size of the audio file, in bytes. This is the upper limit threshold for capacity. The file's MD5 hash value. For filename, It is a cloud-based audio file library.
[0096] Specifically, the local upload channel is used to add new sound effect resources to the library, while the file library access channel is used to reuse existing, approved sound effect resources. The combination of the two not only meets the flexible upload needs of new sound effects, but also avoids duplicate storage and verification by reusing existing resources, reducing cloud storage overhead and shortening policy configuration time.
[0097] The verification process employs a serial execution logic; if the previous verification fails, the process terminates directly without executing subsequent verifications, reducing cloud computing power consumption. Format verification uses dual validation of file extension and MIME type to ensure that the files entering the database are in standard MP3 format, matching the terminal's built-in fixed audio decoding library. This prevents decoding failures, playback anomalies, and even system restarts caused by incompatible formats. Capacity verification sets a capacity threshold based on the upper limit of the embedded terminal's MCU's decoding buffer memory. Files exceeding this threshold can cause memory overflow during decoding; therefore, non-compliant files are intercepted in the cloud, preventing hardware compatibility risks during the database entry process and ensuring terminal stability. In deduplication verification, the MD5 hash value serves as the file's "digital fingerprint," ensuring that files with identical content have a unique and consistent MD5 value. By comparing MD5 and filename dimensions, duplicate files can be accurately identified, redundant writes are rejected, and the same audio file can be reused under multiple strategies, improving storage resource utilization. Distributed object storage stores audio files in a distributed object storage cluster, supporting massive file storage and high-concurrency access. Combined with CDN nodes, it enables terminals to download from the nearest location, improving audio file retrieval speed.
[0098] In one possible embodiment, in S2, the review process engine has a built-in state machine logic, and the prompt sound strategy plan flows sequentially between the draft, pending review, approved, published, and rejected states.
[0099] Before the review is approved, check whether the policy end timestamp is greater than the current server system timestamp. If the check fails, the review operation is blocked and a policy expiration message is displayed. If the check passes, the reviewer's employee number, operation timestamp, and policy change content are recorded, and the operation log is generated.
[0100] Specifically, the finite state machine transition, by defining a fixed set of states and legal transition paths, incorporates the entire lifecycle of a policy into standardized management. Different states correspond to different operation permissions; the draft state can only be edited, the pending review state can only be submitted for review, and only after approval can it be released. This mechanism prevents policies from being arbitrarily modified and directly deployed, ensuring the rigor of configuration. Server time validity verification uses the unified time of the cloud server as the validity judgment benchmark, rather than the local time of the terminal, avoiding policy validity errors caused by inaccurate terminal clocks or time zone deviations. Expired policies are intercepted at the verification node to prevent invalid configurations from being sent to the terminal, thus avoiding resource waste and ensuring that all deployed policies are within the valid time range. Operation and maintenance logs record the operator, operation time, and changes, forming an immutable operation audit chain. This meets the compliance audit requirements of operation and maintenance operations in scenarios such as finance and government, and allows for rapid tracing of responsibility and causes when configuration problems occur.
[0101] In one possible embodiment, the set of state machines is:
[0102]
[0103] The fixed flow path is:
[0104]
[0105] The formula for determining the approval time is as follows:
[0106]
[0107] In the formula, This is the strategy's end timestamp; This is the current server system timestamp.
[0108] Specifically, the state set enumerates all legal states, clearly defining all nodes in the policy lifecycle to avoid undefined abnormal states and ensure the deterministic operation of the process engine. A fixed flow path limits the direction of transitions between states, allowing only sequential progress. It also includes two branches: time-sensitive interception and manual rejection, ensuring both process standardization and coverage of exception handling scenarios. The time-sensitive interception branch is executed automatically by the system, while the manual rejection branch is handled by the reviewer; together, they constitute dual control in the review process. The time-sensitive determination formula uses a Boolean logic expression to determine timeliness. The determination is true only if the policy's end time is later than the current server time, allowing the review to pass. This formula is a mathematical expression of the time-sensitive verification logic; the determination logic is unique and unambiguous, ensuring consistent results across different terminals and nodes.
[0109] In one possible embodiment, in S3, the incremental policy data packet includes a policy number, version number, priority, time rule, spatial rule, and trigger action-sound effect mapping relationship;
[0110] After receiving the incremental policy data packet, the smart terminal does not perform a full Flash erase operation, but only updates the policy index table in the local SQLite database / KV storage, and refreshes the effective policy cache pool according to the local real-time clock and spatial location information.
[0111] Specifically, MQTT is a lightweight IoT communication protocol based on a publish-subscribe model. It features small message size, low bandwidth consumption, supports QoS (Quality of Service) levels, and can ensure reliable message delivery to a massive number of terminals even in weak network environments, adapting to the network characteristics of IoT terminals. Incremental push only sends newly added or modified policy data to terminals, rather than the full policy list, significantly reducing the amount of data transmitted over the network and lowering bandwidth consumption. It also shortens terminal data processing time and accelerates policy activation. Embedded terminals' Flash chips have a limited number of erase / write cycles; frequent full erases and writes shorten hardware lifespan. Updating only the policy index table modifies only local storage data, eliminating the need to erase the entire Flash partition, extending hardware lifespan and improving data writing efficiency. Terminals pre-select policies effective in the current time and space based on their local real-time clock and current location information and store them in a memory cache. When an action is triggered, the corresponding policy can be directly retrieved from the memory cache without traversing the full policy list or calculating time-space validity in real time, significantly reducing query latency and ensuring immediate response to alerts.
[0112] In one possible embodiment, in S4, the time validity determination parses the period type field in the prompt sound strategy plan. The period type includes unlimited, daily cycle, and weekly custom week combination. Combined with the start and end time period array, a Boolean time validity determination function is generated.
[0113] The formula for determining time validity is as follows:
[0114]
[0115] In the formula, The current time corresponding to the terminal's RTC real-time clock. For strategy cycle type, , The start and end times of the strategy's single time period. For the weekday set that takes effect weekly;
[0116] The spatial validity determination function analyzes the activity range type and blacklist data, and combines the real-time GPS coordinates of the smart terminal and the network base station positioning information / inherent point ID to generate a Boolean spatial validity determination function.
[0117] The formula for determining the validity of a space is as follows:
[0118]
[0119] In the formula, For terminal location information, This is a whitelist set for the policy's effective space. A blacklist set for the strategy space;
[0120] When both the time validity determination and the space validity determination results are valid, the corresponding strategy enters the candidate valid strategy set; the candidate valid strategy set is sorted in descending order of priority weight value, and the strategy with the highest weight value is selected as the strategy to be executed; if the candidate valid strategy set is empty, the smart terminal executes the system default prompt sound strategy.
[0121] Specifically, the time validity determination uses a cycle type field to adapt to three common operational scenarios: unlimited type means the policy is effective all time, daily cycle means it is effective during a fixed time each day, and weekly custom means it is effective during a fixed time each week. Boolean judgment is performed based on the terminal's local RTC real-time clock, eliminating the need for network access to obtain time; the terminal can independently complete the calculation, ensuring the policy can still be correctly determined even in network outage scenarios. The spatial validity determination originally used a dual logic of "whitelist inclusion and blacklist exclusion." The whitelist limits the spatial range in which the policy is effective, while the blacklist excludes special locations within the range that do not need to be effective. The terminal can obtain its real-time location via GPS or base station positioning, or directly use inherent location IDs for matching, adapting to both positioning-enabled and non-positioning-enabled terminals, covering more hardware scenarios. The spatiotemporal joint determination only includes a policy in the candidate set when both time and spatial dimensions simultaneously meet the effectiveness conditions, achieving precise two-dimensional matching of "time × space," ensuring that the prompt sound only plays at the specified time and location, avoiding invalid broadcasts. Priority conflict arbitration sorts multiple policies in the candidate set in descending order of priority weight value, selecting the policy with the highest weight as the sole execution policy. This mechanism employs deterministic arbitration logic, where higher weight values indicate higher priority, and the judgment result is unique and predictable, fundamentally resolving playback errors when multiple strategies are overlaid. The default strategy, as a fallback, executes the system's default prompt sound when no effective strategy exists, ensuring normal basic terminal interaction functions and preventing interactive gaps caused by the absence of prompt sounds.
[0122] In one possible embodiment, in S5, the terminal audio execution engine runs on an embedded Linux / RTOS real-time operating system, and queries the local valid policy cache pool using the current triggered action ID as an index; if multiple valid policy records are matched, the conflict arbitration is invoked to determine the target policy with the highest priority.
[0123] Check if the audio effect file with the MD5 value specified by the target policy exists in the local Flash storage; if the audio effect file exists, read it directly from the local Flash and load it into the memory decoding buffer, call the underlying audio decoding interface to convert the MP3 data stream into a PCM data stream and then play it; if the audio effect file does not exist, the terminal initiates a Range request to the CDN via the HTTPS protocol, downloads the audio stream to a temporary buffer and plays it while downloading, and persists the file to Flash and updates the LRU list after playback is complete.
[0124] Specifically, the audio execution engine runs as a background resident process in the terminal system, continuously monitoring for triggers such as hardware interrupts and business events. It can respond instantly upon event triggering, eliminating the need for process startup time and ensuring low latency for notification sound playback. Prioritizing the reading of audio files from local Flash storage avoids network request delays, enabling instant playback upon triggering and reducing network bandwidth consumption, thus adapting to offline terminal operation scenarios. Using MD5 values as file retrieval identifiers ensures accurate matching of corresponding audio files, preventing playback errors caused by version mismatches. Audio data is retrieved in segments from CDN nodes via HTTPRange requests, and the downloaded data stream is written to a temporary buffer for direct decoding and playback, eliminating the need to wait for the entire file to download. This significantly reduces the initial playback wait time and improves user experience. After playback is complete, the file is written to local Flash long-term storage, and the LRU list is updated, allowing subsequent triggers using the same strategy to directly read the local cache, reusing downloaded resources and reducing the bandwidth overhead of repeated downloads.
[0125] In one possible embodiment, the LRU algorithm formula is:
[0126] Cache hit: ,Will Move to head;
[0127] Cache missed: Download from CDN and write to cache;
[0128] like : Add directly to the cache and the head of the linked list;
[0129] like :disuse The tail node is then written to the head of the linked list in a new file.
[0130] In the formula, For the terminal's local audio effect cache pool, Maximum cache capacity This is an LRU ordered linked list, where the head of the list is the most recently used list and the tail is the least recently used list. This is the audio file to be loaded.
[0131] Specifically, recently accessed sound effect files are more likely to be accessed again in the future; files that haven't been accessed for a long time are less likely to be used again. When a sound effect file is already in the local cache, it is moved to the head of the LRU list, marked as "recently used," and its access order is updated to ensure that frequently accessed files are always at the front of the list and are not preferentially evicted. When a sound effect file is not in the local cache, it is first downloaded from the remote cache; if the cache capacity is not reached, the new file is directly added to the cache and placed at the head of the list; if the cache is full, the files at the tail of the list (the least frequently used low-frequency files) are evicted to free up storage space before the new file is written. Limit the maximum capacity of the cache pool to ensure that the storage space occupied by the audio effect cache never exceeds the available limit of the terminal Flash, avoid the cache occupying too much storage resources and affecting the operation of other services on the terminal, and adapt to the hardware characteristics of embedded terminals with limited storage resources.
[0132] One deployment implementation of the present invention is as follows:
[0133] I. Overall System Deployment Architecture
[0134] The CMS backend service is deployed in a Kubernetes containerized cluster to ensure high availability and elastic scaling. The review process engine module is custom-developed based on the open-source workflow engine Camunda, defining the review node flow through BPMN (Business Process Modeling and Annotation). The audio resource collaborative management backend is mounted on a MinIO distributed object storage cluster to store audio file entities and their metadata.
[0135] The terminal policy acts as a cloud-edge communication bridge, using the MQTT protocol, which supports QoS (Quality of Service) levels 1 and 2, to push incremental JSON policy packets to a massive number of terminals. A typical example of the JSON policy packet is as follows:
[0136] Json
[0137] {
[0138] "strategy_id":"STR-20260410-001",
[0139] "version":2,
[0140] "priority":99,
[0141] "time_window":{
[0142] "type":"weekly",
[0143] "days":[1,2,3,4,5],
[0144] "start":"08:00:00",
[0145] "end":"20:00:00"
[0146] },
[0147] "space_scope":{
[0148] "type":"city",
[0149] "include":["Beijing"],
[0150] "blacklist_points":["POINT_XC_2020"]
[0151] },
[0152] "action_mapping":{
[0153] "EVT_PICKUP_REMIND":{
[0154] "md5":"c3ab8ff13720e8ad9047dd39466b3c89",
[0155] "url":"https: / / cdn.example.com / audio / pickup_hurry.mp3",
[0156] "size":450000
[0157] }
[0158] }
[0159] }
[0160] The smart terminal hardware is based on the ARM Cortex-M7 core architecture and runs a lightweight Linux system. An audio execution engine written in C++ resides within the terminal. This engine statically links to a specific audio decoding library, and its runtime memory usage remains consistently below 150KB.
[0161] II. Strategy Creation and Release Process Combined with Review Process
[0162] Operations personnel log in to the CMS backend and click "Create New Strategy Plan". In the basic information field, enter the plan name "Weekday Peak Pickup Reminder", set the effective period to 2026-04-10 00:00:00 to 2026-12-31 23:59:59, and manually enter the priority value 99.
[0163] In the prompt tone policy configuration area, the system retrieves a complete list of available trigger actions from the database, such as "Cabinet door open" and "Pickup code verification successful". When the operator checks "Pickup code verification successful", this action is grayed out in the interface list. The operator then selects "Local upload" and chooses a local file named remind.mp3. The background thread of the sound resource collaborative management module immediately calculates the MD5 value of the file and compares it with the file library index; it also verifies the file size (e.g., detects 480KB) and format (confirms MP3). After successful verification, the file is written to the MinIO storage bucket, and the returned persistent URL is recorded in the policy configuration.
[0164] Within the activity area, operators select "By City" and check "Beijing," while simultaneously entering the specific location number BJ_CBD_A01 in the blacklist input box. After the strategy is saved, the status field is automatically assigned "Pending Review." Auditors log into the system and filter out the list of strategies with a status of "Pending Review." When an auditor clicks the "Approve" button for a strategy, the review process engine module intercepts the request and performs a logical check: Strategy.End Time > Current Server Time. Because 2026-12-31 is greater than the current date 2026-04-10, the check passes. The system executes a database transaction, updates the status to "Approved," records the auditor's ID and operation timestamp, and then triggers an MQTT message to push the JSON strategy package to eligible terminals.
[0165] III. Terminal-side conflict resolution and playback execution
[0166] A smart parcel locker located in an office building in Beijing (location number BJ_GUOMAO_05, not on the blacklist) received and stored the above policy via MQTT.
[0167] When the time is 10:30 AM on Thursday, the user scans the code to pick up the package, triggering the EVT_PICKUP_REMIND event on the terminal system. The terminal audio execution engine immediately searches the local policy cache pool and finds two valid policies:
[0168] Strategy A: ID is STR-20260410-001, priority is 99, and the requirement is to play pickup_hurry.mp3.
[0169] Strategy B: ID is LEGACY-001, priority is 10, and it requires playing default_beep.mp3 (the old version's common prompt sound).
[0170] The engine executes the conflict arbitration submodule logic, comparing priority weights (99>10) and determining strategy A as the winning strategy. The engine checks if a file with the MD5 hash of c3ab8f... exists in the local Flash memory. If the file is cached locally, it directly calls the audio driver for playback; if the file is missing due to recent cache clearing, the engine parses the URL from the JSON strategy package, initiates a Range request to the CDN via HTTPS, downloads the audio stream to a temporary buffer, plays it, and persists the file to Flash and updates the LRU list after playback. The entire arbitration and playback process is completed within 200ms, providing the user with immediate and context-appropriate audio feedback.
[0171] See Figure 3The backend control layer in this diagram is deployed on the cloud side, undertaking the main control functions of policy configuration, review and verification, resource management, policy parsing, and synchronous distribution. It includes five main modules: CMS backend configuration module, review process engine module, sound effect resource collaborative management module, multi-dimensional effective policy parsing module, and terminal policy synchronization module. The CMS backend configuration module is internally divided into three sub-units: basic information unit, policy configuration unit, and effective scope unit. It is responsible for building a standardized prompt sound policy plan data structure, completing the definition of basic policy attributes, mapping and binding of trigger actions and sound effect resources, and configuring spatial effective domains and blacklists. It is the input entry point for the entire system's policy rules. The review process engine module has two built-in logics: a state machine and time validity verification interception. The state machine covers the entire process of policy state transition control from pending review to approval. The time validity verification interception forcibly verifies the policy end time against the server's current time at the approval node, intercepting expired policies and ensuring the timeliness and legality of online policies, while also retaining operation and maintenance records. The audio resource collaborative management module provides dual-channel audio resource access methods: local upload and file library access. All accessed audio files undergo a unified three-level verification pipeline, sequentially performing MP3 format verification, 500KB capacity threshold verification, and MD5 deduplication verification. Audio resources that pass verification are generated with a unique identifier and included in unified management, ensuring the compatibility of audio files with terminal hardware from the source and avoiding redundant storage. The multi-dimensional effectiveness policy parsing module receives policy and resource data from the CMS configuration module and the audio resource module. Internally, it includes three sub-modules: a time judgment sub-module, a space judgment sub-module, and a conflict arbitration sub-module. These are responsible for parsing the time period rules and spatial effectiveness range rules of the policy, respectively, completing the validity determination in the spatiotemporal dimensions, and for scenarios with multiple policies overlapping, performing conflict arbitration through priority weights, and outputting the determined effective policy rules. The terminal policy synchronization module acts as the communication hub between the cloud and the terminal, using the MQTT protocol to transmit lightweight JSON format incremental policy packets. It pushes the parsed effective policies to the target smart terminal, completing policy updates without requiring a full firmware upgrade, reducing the amount of data transmitted and the terminal update overhead.
[0172] The edge execution layer is deployed on the smart terminal side, undertaking the autonomous decision-making functions of local policy caching, trigger response, playback execution, and cache management. Its main operating platform is the smart terminal, and it internally comprises three parts: a terminal audio execution engine, a local storage and caching layer, and an audio output device. The local storage and caching layer is divided into a policy index table and an audio file cache. After receiving an incremental policy package pushed from the cloud, the terminal only updates the local policy index table without fully erasing the Flash storage. Simultaneously, it persistently caches downloaded audio files, providing data support for local playback. The terminal audio execution engine internally sets up three functional units: an effective policy cache pool, priority conflict arbitration, and on-demand download and playback. The effective policy cache pool pre-selects effective policies for the current time and space based on the terminal's local real-time clock and location information and stores them in memory. When a preset trigger action is detected, the cache is queried using the action ID as an index. If multiple policies are matched, conflict arbitration is performed through priority weights to determine the target policy. Then, the local audio cache is checked. If the cache is matched, it is directly decoded and played. If the cache is not matched, the audio effect file is fetched from the remote CDN on demand, and played while downloading. After playback is completed, the cache is persisted and the eviction rules are updated. Finally, the audio output device is driven to complete the playback of the prompt tone.
[0173] The entire architecture decouples the control logic from the execution logic. The cloud is responsible for complex configuration, review, parsing and resource management, while the terminal is responsible for lightweight local judgment and playback execution. It not only adapts to the hardware characteristics of embedded smart terminals with limited storage and computing resources, but also realizes minute-level batch activation and fine-grained multi-dimensional control of prompt tone policies.
[0174] See Figure 4 The image shows the CMS backend configuration interface of a configurable alert tone policy management system for smart terminals. It serves as a visual entry point for operators to create and edit alert tone policy plans. The overall layout adopts a partitioned approach, divided into three main configuration blocks from top to bottom and left to right: basic information, alert tone policy configuration, and scope of effect. An auxiliary pop-up window for selecting trigger actions is attached to the right. All configuration items correspond to the corresponding fields of the standardized policy data structure, and the configuration of policy rules across all dimensions can be completed through visual operations.
[0175] At the top of the page is the basic information configuration area, which includes a plan name input box and a description input box marked as required, as well as a plan review drop-down selection box, which displays the pending review status by default. Below, there are plan start time and plan end time selection boxes marked as required, as well as a priority input box with a help prompt icon, used to define the unique identifier attribute of the policy, the full life cycle duration range, and the conflict arbitration weight. At the bottom of the area, there is a radio button for the effective period, including three types: unlimited, daily, and weekly. The unlimited mode is selected by default, which corresponds to the period rule configuration of the policy's time dimension.
[0176] Below the basic information area is the notification sound strategy configuration area. The area title includes a help icon, and the top features add and delete buttons for the corresponding trigger actions. Below that is a trigger action configuration table, which includes selection checkboxes, a specific location column, a notification sound column, and an operation column. The specific location column displays the names of terminal trigger actions such as face detection, payment success, and shipment. The notification sound column provides an entry point for uploading files, and the operation column supports deleting individual binding relationships. On the right side of the table are two function buttons: file library upload and local upload, corresponding to dual-channel access methods for sound effect resources. Operations personnel can select trigger actions in batches and bind corresponding sound effect files to each action. The binding relationship can be viewed during the configuration process, avoiding conflicts caused by duplicate binding of the same action from an operational perspective.
[0177] The lower half of the page is the effective scope configuration area, which provides three spatial scope configuration modes: by city, by operational geographic tag, and by location. Each mode has a corresponding independent radio button, which can switch between different granular spatial control methods. The "By Location" mode supports managing device locations via buttons to add, delete, and group by machine. The location list table below includes location ID, location number, location name, city, and operation column, allowing precise specification of the effective scope for individual devices. The "By City" mode provides a city selection dropdown and supports setting exclusion locations from the activity. The corresponding city list and location details are displayed below, allowing batch delineation of the policy's effective scope by administrative region. The "By Operational Geographic Tag" mode provides a dropdown selection list on the left, which expands to include various scenario tags such as long-term rental apartments, office buildings, mixed-use commercial and residential buildings, hotels, shopping malls, hospitals, charging stations, industrial parks, scenic spots, public places, sports venues, transportation hubs, dormitories, and depots. Devices can be filtered in batches by operational scenario. The right side is the configuration area for locations not participating in the activity, with buttons for adding, grouping by machine, and deleting. The location list below currently has no data and is used to set exclusion locations within the tag range, achieving refined spatial range control.
[0178] On the right side of the page, there is a floating "Select Machine Location" auxiliary selection pop-up. The table in the pop-up contains two columns: ID and specific location. It lists terminal-triggered actions such as face detection, payment success, shipping in progress, shipping completed, and pickup reminder. Each row has a checkbox in front, which is an auxiliary selection component for configuring the trigger action. It is used to quickly select the target trigger action that needs to be bound to sound effects.
[0179] See Figure 5The process in the diagram begins at the start node. First, it reads the complete list of policy plans to be parsed from the terminal's local policy cache pool. Then, it proceeds to the single-policy traversal stage, simultaneously performing time validity and spatial validity checks for each policy plan. The left side shows the execution steps of the time validity check submodule: First, it obtains the current time corresponding to the terminal's RTC real-time clock. Second, it parses the period type corresponding to the policy, supporting unlimited, daily, and weekly period rules. Third, it determines whether the current time falls within the time range set by the policy, ultimately outputting a Boolean result: if it meets the time rules, it is marked as true; otherwise, it is marked as false. The right side shows the execution steps of the spatial validity check submodule: First, it obtains the terminal's spatial identification data, supporting GPS coordinates or inherent point IDs. Second, it matches according to the spatial rules configured in the policy, adapting to matching logic at three granularities: city, operational geographic tags, and point. Third, it checks whether the current terminal is in the policy's point blacklist. After completing the exclusion check, it finally returns a Boolean result indicating whether the spatial validity is true or false. After completing the two-dimensional judgment, the system proceeds to the spatiotemporal joint validity judgment, which verifies whether temporal validity and spatial validity are simultaneously true through logic and rules. If the judgment result is negative, it means that the strategy is ineffective in the current spatiotemporal context, and the strategy is skipped, continuing to the next strategy. If the judgment result is positive, the strategy is added to the candidate valid strategy set. After processing a single strategy, it is determined whether there are any remaining unprocessed strategies. If there are unprocessed strategies, the system returns to the step of traversing the single strategy plan and repeats the above two-dimensional judgment and filtering logic. If all strategies have been traversed, the system enters the conflict arbitration submodule. The conflict arbitration step first determines whether the candidate valid strategy set is empty. If there are no valid strategies in the candidate set, it is determined that there are no valid strategies, and the terminal executes the fallback logic of playing the default prompt tone or remaining silent. If the candidate set is not empty, all candidate strategies are sorted in descending order according to their priority weight values, and the strategy with the highest priority after sorting is selected as the final execution strategy. After completing the policy filtering and arbitration, the system returns an execution policy object containing the sound effect resource URL, providing an execution basis for the subsequent terminal audio playback process. The entire multi-dimensional effective policy parsing process ends here.
[0180] See Figure 6The process in this diagram begins at the start node. First, a preset hardware or software trigger action is detected, such as the pickup reminder event EVT_PICKUP_REMIND. The trigger source can be from terminal sensors or upper-layer business logic. After detecting the trigger action, the terminal audio execution engine uses the current trigger action ID as input parameter to query the valid policy cache pool in local memory, and then determines whether there is an associated valid policy. If no associated policy is found, fallback logic is executed: either the system's default beep sound is played directly, or a silent policy is executed according to the configuration, and then the entire process ends. If an associated policy is found, the conflict arbitration submodule is called for processing: first, all matching valid policies in the current time and space are obtained; then, all policies are sorted in descending order of priority weight; finally, the policy with the highest priority is selected as the target execution policy. After determining the target policy, the resource identifier of the corresponding sound effect file is extracted, including the file's MD5 checksum and the remote download URL. Then, local cache verification is performed to check whether the sound effect file with the corresponding MD5 value exists in the terminal's local Flash storage, thus determining whether the cache has been hit. If the cache is hit (meaning the audio file is already stored locally), the file data is read directly from the local Flash memory and loaded into the memory decoding buffer, awaiting decoding and playback. If the cache is missed (meaning the corresponding audio file is not available locally), the on-demand download process is triggered: First, the remote URL address of the audio file is parsed, and the file is downloaded from a remote CDN or file server via HTTPS protocol. After downloading, an MD5 integrity check is performed to ensure the file is lossless. If the check passes, the file is written to local Flash storage, and the LRU cache list is updated to maintain the cache eviction rules. After local reading or download loading is complete, the underlying audio decoding interface is called to convert the MP3 audio file into a PCM audio data stream. Then, the terminal's audio output device, such as a speaker or amplifier module, is driven to play the notification tone. After playback is complete, the entire terminal audio execution process ends.
[0181] See Figure 7The process in this diagram begins at the start node, first entering the channel selection stage, providing two audio resource access paths. When selecting Channel A (local upload), the operator selects a local audio file, and the system reads the file's binary stream for subsequent verification. When selecting Channel B (file library access), the operator browses and selects from the existing cloud-based audio resource list, directly reusing existing, approved audio files without needing to upload them again. Files from both access channels undergo a unified first-level mandatory format verification. The verification rule matches both the file extension .mp3 and the MIME type audio / mpeg, ensuring the file is in standard MP3 format. If format verification fails, the system displays a "MP3 format only" message and terminates the current library access process. If format verification passes, the process proceeds to the second-level capacity threshold verification, with a set capacity limit of 500KB, matching the embedded terminal's decoding buffer and storage resource limitations. If the file's binary size exceeds the 500KB threshold, the system displays a "File exceeds 500KB limit" message and ends the process. If the file size meets the threshold requirement, the process proceeds to the third-level deduplication verification. The third-level deduplication check uses a dual matching rule of MD5 hash value and filename to compare the current file with existing files in the cloud file library. If a matching duplicate file is detected, the duplicate write operation is not performed, and the URL of the existing resource for that file is directly returned with the message "File already exists, automatically associated," thus reusing existing resources and saving storage space. If no duplicate file is detected, the file is written to the distributed file library. First, a globally unique filename is generated using the "UUID + timestamp" rule to avoid naming conflicts. Then, the sound effect file is uploaded to the MinIO object storage bucket for persistent storage, and the file's URL, MD5 value, size, and other metadata are written to the database to complete archiving. After the reuse or new file is added to the library, the system outputs a unique identifier for the sound effect resource, which includes the file access URL, MD5 checksum, and complete metadata. This identifier is used for binding and triggering actions in subsequent policy configuration stages, thus concluding the entire sound effect resource library management process.
[0182] The application scenarios of this invention are as follows:
[0183] Smart parcel locker prompt tone strategy management scenario: Applicable to the entire process management of prompt tone configuration, distribution, and playback for smart parcel lockers in communities, office buildings, industrial parks, etc., and adapted to large-scale distributed device cluster deployment and regionally differentiated operation modes. Traditional methods of using pre-programmed firmware or full firmware OTA upgrades result in strong coupling between prompt tones and trigger actions such as package retrieval and door opening. It is impossible to dynamically adjust playback rules according to time and geographical location. The superposition of multiple strategies can easily lead to prompt tone confusion. The lack of standardized review processes poses compliance risks. The embedded terminal storage and decoding resources are not utilized reasonably. This solution solves the problems of rigid prompt tone configuration, lack of multi-dimensional scheduling strategies, extensive operation and maintenance management, and poor hardware compatibility of traditional parcel lockers.
[0184] Human-machine interaction prompts for vending machines: Applicable to the operation and maintenance management of event prompts such as dispensing, payment, and fault alarms for vending machines in supermarkets, scenic spots, transportation hubs, dormitories, and other places. Adaptable to batch management of multiple brands and locations, and rapid switching of phased marketing sound effects. Traditionally, prompts are modified by firmware updates, which has a long change cycle, high manpower maintenance costs, and cannot distinguish between different time periods and different areas to set differentiated prompts. The lack of unified verification rules for sound effect files can easily cause terminal decoding abnormalities and device restarts. This solves the problems of low efficiency in changing prompts, weak dynamic scheduling capabilities, and insufficient terminal operation stability of traditional vending machines.
[0185] The system addresses the following scenarios for managing prompts on government and financial self-service terminals: It is applicable to the entire process of prompt configuration and maintenance auditing for government and financial self-service terminals such as government service kiosks and bank ATMs. It is adapted to high compliance requirements, full operation traceability, and regional access control operation modes. Traditional solutions lack standardized status review and log recording mechanisms, require firmware upgrades for configuration changes, and cannot achieve multi-dimensional policy differentiation in time and space. The scattered management of sound effect files is prone to copyright risks. This system solves the problems of non-compliant operation and maintenance, single policy scheduling, and untraceable configuration behavior in traditional government and financial self-service terminals.
[0186] Self-service ticket terminal prompt tone maintenance scenario: Applicable to the status prompt tone management of self-service ticket printing terminals in places such as hospitals, train stations, and government service halls. Adaptable to the scattered locations, large number of devices, and time-segmented operation and management mode based on weekdays / holidays. Traditional prompt tones are fixed in firmware, and even minor modifications require recompilation and a network-wide firmware upgrade. It is impossible to switch prompt tones according to the period and time period, and the lack of pre-verification of files can easily cause terminal playback failures. It solves the problems of high cost of changing prompt tones, lack of time-dimensional strategy, and high equipment failure rate of traditional self-service ticket terminals.
[0187] Intelligent prompts for urban public information kiosks: Applicable to the interactive prompt sound management of public information kiosks and convenient inquiry terminals in urban streets, civic squares, and community service centers. Adapted to urban zoning control, sound effect resource reuse, and rapid deployment of temporary promotional sound effects. Traditional firmware upgrade methods cannot switch prompt sounds in batches in a short time, devices in different administrative regions cannot be configured differently, and repeated uploading and storage of sound effect files causes resource redundancy. This solves the problems of slow response, lack of space strategy, and low utilization of terminal storage resources in traditional public information kiosk prompt sound operation.
[0188] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and these devices will interact with each other to complete the configurable prompt tone strategy processing method for smart terminals.
[0189] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0190] Example 2
[0191] See Figure 8 Embodiment 2 of the present invention also provides a configurable prompt sound policy processing system for smart terminals, which adopts the above-described configurable prompt sound policy processing method for smart terminals, including:
[0192] Strategy Configuration Building Unit 100: Used to create alert sound policy plans through the CMS backend, and build a standardized data structure including basic information, alert sound policy configuration, and spatial activity range; at the same time, it uploads / selects audio resources in dual-channel mode and performs multi-level verification on sound effect files;
[0193] Policy review and release unit 200: Used to manage the status flow of newly created policies through the review process engine, verify the validity of the policy before the review is approved, and complete the policy release and retain the operation and maintenance log after the verification is approved.
[0194] Policy Increment Synchronization Unit 300: Used for pushing lightweight JSON format incremental policy data packets to the target smart terminal based on the MQTT protocol; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool.
[0195] Multi-dimensional strategy determination and conflict arbitration unit 400: When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out a set of candidate effective strategies; if there are multiple strategies in the set of candidate effective strategies, it completes conflict arbitration according to priority weight to determine a unique strategy to be executed.
[0196] The prompt tone playback and cache management unit 500 is used by the terminal audio execution engine to retrieve local sound effect files according to the execution strategy. If the sound effect file exists, it is directly decoded and played; if the sound effect file does not exist, it is downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm is used to clean up local low-frequency and expired sound effect caches to maintain terminal storage space.
[0197] It should be noted that the information interaction and execution process between the modules of the above-mentioned device are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.
[0198] Example 3
[0199] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores program code for a configurable prompt tone policy processing method for a smart terminal, the program code including instructions for executing the configurable prompt tone policy processing method for a smart terminal of Embodiment 1 or any possible implementation thereof.
[0200] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0201] Example 4
[0202] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0203] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the configurable prompt sound strategy processing method for smart terminals according to Embodiment 1 or any possible implementation thereof by calling the program instructions.
[0204] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.
[0205] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0206] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0207] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A configurable prompt sound strategy processing method for smart terminals, characterized in that, include: S1. Create a notification sound policy plan through the CMS backend and build a standardized data structure that includes basic information, notification sound policy configuration, and spatial activity range; Simultaneously, audio resources are uploaded / selected via dual-channel mode, and multi-level verification is performed on the sound effect files; S2. Manage the status flow of newly created policies through the review process engine. Verify the validity of the policy before it is approved. After the verification is passed, complete the policy release and retain the operation and maintenance logs. S3. The terminal policy is based on the MQTT protocol and pushes a lightweight JSON format incremental policy data packet to the target smart terminal; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool. S4. When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out the candidate effective strategy set; if there are multiple strategies in the candidate effective strategy set, it completes conflict arbitration according to priority weight to determine the unique strategy to be executed. S5. The terminal audio execution engine searches for local sound effect files according to the execution strategy. If the sound effect file exists, it is directly decoded and played. If the audio file does not exist, it will be downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm will be used to clean up the local low-frequency and expired audio cache to maintain the terminal storage capacity.
2. The configurable prompt tone strategy processing method for smart terminals according to claim 1, characterized in that, In S1, the basic information includes a unique policy identifier (ID), policy name, policy description, effective start and end timestamps, and priority weight value. The prompt sound strategy configuration establishes a mapping table between the trigger action enumeration value and the unique identifier of the sound effect resource, and binds them in batches; during the interaction of the graphical user interface, the trigger actions that have been associated with the current strategy are grayed out and cannot be selected in the candidate list; The activity scope defines the effective domain of the policy space, including the scope of inclusion by administrative division, custom geofence labels, and device location ID, as well as the exclusion scope of the device location blacklist.
3. The configurable prompt tone strategy processing method for smart terminals according to claim 1, characterized in that, In S1, the dual-channel mode includes two access channels: local file upload and access to an existing file library. The sound effect files undergo three levels of mandatory verification before being added to the database: Level 1 format verification: Forces a check of file extension and MIME type, allowing MP3 format files to pass; Level 2 capacity check: Forces a check on the binary size of the file, allowing files that do not exceed a preset threshold to pass through; The third level of deduplication verification: calculate the MD5 hash value of the file. If a file with the same filename and MD5 hash exists in the file library, the redundant write is rejected and the existing resource link is returned. The verified audio files are stored in a distributed object storage cluster, and a unique identifier for the audio resource containing the URL, MD5 hash, and file size is generated. The three-level mandatory verification serial determination rule is as follows: In the formula, For file extensions, For file MIME type, This refers to the binary size of the audio file, in bytes. This is the upper limit threshold for capacity. The file's MD5 hash value. For filename, It is a cloud-based audio file library.
4. The configurable prompt sound strategy processing method for smart terminals according to claim 1, characterized in that, In S2, the review process engine has a built-in state machine logic, and the prompt sound strategy plan flows sequentially between the draft, pending review, approved, published, and rejected states. Before the review is approved, check whether the policy end timestamp is greater than the current server system timestamp. If the check fails, the review operation is blocked and a message is displayed indicating that the policy has expired. If the verification passes, the employee ID of the reviewer, the operation timestamp, and the policy change content are recorded, and the operation and maintenance log is generated.
5. The configurable prompt tone strategy processing method for smart terminals according to claim 4, characterized in that, The set of state machines is as follows: The fixed flow path is: The formula for determining the approval time is as follows: In the formula, This is the strategy's end timestamp; This is the current server system timestamp.
6. The configurable prompt tone strategy processing method for smart terminals according to claim 1, characterized in that, In S3, the incremental policy data packet includes policy number, version number, priority, time rule, spatial rule, and trigger action-sound effect mapping relationship; After receiving the incremental policy data packet, the smart terminal does not perform a full Flash erase operation, but only updates the policy index table in the local SQLite database / KV storage, and refreshes the effective policy cache pool according to the local real-time clock and spatial location information.
7. The configurable prompt tone strategy processing method for smart terminals according to claim 1, characterized in that, In S4, the time validity determination parses the period type field in the prompt sound strategy plan. The period type includes unlimited, daily cycle, and weekly custom week combination. Combined with the start and end time period array, a Boolean time validity determination function is generated. The formula for determining time validity is as follows: In the formula, The current time corresponding to the terminal's RTC real-time clock. For strategy cycle type, , The start and end times of the strategy's single time period. For the weekday set that takes effect weekly; The spatial validity determination function analyzes the activity range type and blacklist data, and combines the real-time GPS coordinates of the smart terminal and the network base station positioning information / inherent point ID to generate a Boolean spatial validity determination function. The formula for determining the validity of a space is as follows: In the formula, For terminal location information, This is a whitelist set for the policy's effective space. A blacklist set for the strategy space; When both the time validity determination and the space validity determination results are valid, the corresponding strategy enters the candidate valid strategy set; the candidate valid strategy set is sorted in descending order of priority weight value, and the strategy with the highest weight value is selected as the strategy to be executed. If the set of candidate valid strategies is empty, the smart terminal executes the system default prompt sound strategy.
8. The configurable prompt tone strategy processing method for smart terminals according to claim 1, characterized in that, In S5, the terminal audio execution engine runs on an embedded Linux / RTOS real-time operating system and queries the local valid policy cache pool using the current triggered action ID as an index. If multiple valid policy records are matched, the conflict arbitration is invoked to determine the target policy with the highest priority. Check if the audio file with the MD5 value specified by the target policy exists in the local Flash storage; If the audio file exists, it is read directly from the local Flash and loaded into the memory decoding buffer. The underlying audio decoding interface is then called to convert the MP3 data stream into a PCM data stream before playback. If the audio file does not exist, the terminal initiates a Range request to the CDN via the HTTPS protocol, downloads the audio stream to a temporary buffer and plays it while downloading. After playback is complete, the file is persisted to Flash and the LRU list is updated.
9. The configurable prompt tone strategy processing method for smart terminals according to claim 8, characterized in that, The LRU algorithm formula is as follows: Cache hit: ,Will Move to head; Cache missed: Download from CDN and write to cache; like : Add directly to the cache and the head of the linked list; like :disuse The tail node is then written to the head of the linked list in a new file. In the formula, For the terminal's local audio effect cache pool, Maximum cache capacity This is an LRU ordered linked list, where the head of the list is the most recently used list and the tail is the least recently used list. This is the audio file to be loaded.
10. A configurable prompt tone strategy processing system for smart terminals, employing the configurable prompt tone strategy processing method for smart terminals as described in any one of claims 1-9, characterized in that, include: Policy configuration building unit: Used to create alert sound policy plans through the CMS backend, and build a standardized data structure including basic information, alert sound policy configuration, and spatial activity range; at the same time, it uploads / selects audio resources in dual-channel mode and performs multi-level verification on sound effect files; Policy review and release unit: Used to manage the status flow of newly created policies through the review process engine. Before the policy is approved, the policy validity is verified. After the verification is passed, the policy is released and the operation and maintenance logs are stored. Policy Increment Synchronization Unit: Used for pushing lightweight JSON format incremental policy data packets to the target smart terminal based on the MQTT protocol; after receiving the data, the smart terminal updates its local policy index table and refreshes its local valid policy cache pool. Multi-dimensional strategy determination and conflict arbitration unit: When the smart terminal triggers a preset action, it calls the multi-dimensional effective strategy execution time validity determination and space validity determination to filter out the candidate effective strategy set; if there are multiple strategies in the candidate effective strategy set, it performs conflict arbitration according to priority weight to determine the unique strategy to be executed. Prompt sound playback and cache management unit: used by the terminal audio execution engine to retrieve local sound effect files according to the execution strategy, and if the sound effect file exists, it is directly decoded and played. If the audio file does not exist, it will be downloaded and played from the remote CDN on demand. At the same time, the LRU algorithm will be used to clean up the local low-frequency and expired audio cache to maintain the terminal storage capacity.
