Industrial monitoring intelligent alarm method, device and system based on dynamic speech synthesis and storage medium
By adopting a front-end and back-end separation architecture and a locally deployed speech synthesis engine in the industrial monitoring system, combined with an automatically expanding process pool and a consistent hashing algorithm, the problems of poor flexibility, insufficient security, and high concurrency in existing voice alarm schemes are solved, achieving highly reliable and real-time voice alarms, and supporting dynamic updates of the terminology library and localization adaptation.
Patent Information
- Application Number
- CN202511821589.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-01-30
AI Technical Summary
Existing voice alarm solutions in industrial monitoring systems cannot meet the requirements of high real-time performance, high concurrency, and high reliability. They also cannot support dynamic hot updates of terminology databases and pure intranet operation, making it difficult to adapt to the diverse alarm information needs of modern industrial systems.
It adopts a front-end and back-end separation architecture, and compiles index files in real time through a locally deployed speech synthesis engine. Combined with an automatically expanding process pool, it supports hot updates of the terminology library. Through a consistent hashing algorithm and an automatic scaling mechanism for the process pool, it achieves high concurrency and low latency voice alarms.
It enables hot updates of the terminology database and personalized alarm voice generation, ensuring high reliability and real-time performance of the system, meeting the requirements of industrial monitoring systems for data security and compatibility with domestically produced software and hardware, and reducing operation and maintenance costs.
Smart Images

Figure CN121438804A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of industrial automation monitoring technology, specifically relating to an intelligent alarm method, device, system, and storage medium for industrial monitoring based on dynamic speech synthesis. Background Technology
[0002] Industrial monitoring systems are a core component for ensuring the safe, stable, and efficient operation of modern industrial production. Real-time alarm functionality, as a crucial aspect of human-machine interaction, directly impacts operators' perception and response speed to equipment anomalies. Traditional audible and visual alarms have limited information capacity, while text alarms require operators to continuously monitor the interface, easily leading to missed alarms in complex industrial environments. Therefore, voice alarm technology, capable of clearly broadcasting detailed alarm content, has become an important development direction for improving the efficiency of industrial monitoring.
[0003] Currently, there are three main technical solutions for implementing voice alarms, but all of them have significant limitations: The first type is based on splicing pre-recorded voice segments. This method requires pre-recording a large number of voice segments with fixed content, such as "equipment," "fault," and "high temperature," which are then combined and played according to logic when an alarm is triggered. The drawbacks of this method are particularly prominent: its flexibility and scalability are extremely poor, making it unable to adapt to alarm content containing dynamic variables, such as specific equipment names, real-time measurement values, and exceeding thresholds; furthermore, it requires pre-recording all possible voice combinations, resulting in high maintenance costs and difficulty in meeting the diverse alarm information needs of modern industrial systems.
[0004] The second type is a cloud-based text-to-speech (TTS) service. This solution sends the alarm text via the internet to a cloud-based TTS service provider for processing, such as Google TTS or Alibaba Cloud speech synthesis, and then returns the generated audio stream for playback. Although this type of solution can support dynamic content, its inherent limitations make it unsuitable for demanding industrial control environments: First, it is highly dependent on external networks, and the alarm function will completely fail when the network is interrupted or has high latency, violating the basic requirements of high reliability and real-time performance for industrial systems; second, transmitting alarm data containing sensitive information such as production processes and equipment status to external cloud platforms poses serious data security and leakage risks, failing to comply with the security isolation regulations for industrial control networks.
[0005] The third type is the solution of integrating an open-source TTS engine locally. This solution attempts to solve network dependency and security issues by deploying a localized TTS engine on the intranet. However, this type of solution faces new technical bottlenecks in complex industrial monitoring scenarios: 1. Rigid terminology database updates: Industrial terminology, equipment numbers, and parameter units are constantly emerging, while existing engines often require manual replacement of voice database files and service restarts to take effect, making it impossible to achieve dynamic hot updates of the terminology database and failing to meet the requirements of production continuity; 2. Concurrency performance bottlenecks: Open-source engines are usually not deeply optimized for multi-threaded concurrent requests. When a large number of alarms suddenly occur in a large-scale distributed system, the single-threaded processing mode is prone to request blocking, response delays, or even engine crashes, resulting in insufficient reliability; 3. Initialization delays: The engine takes a long time to load or rebuild the voice index for the first time, which cannot meet the real-time requirements of emergency alarms.
[0006] Furthermore, in the context of promoting the localization of industrial systems, the above-mentioned solutions, especially foreign commercial engines, face obstacles in terms of compatibility with domestic CPUs (such as Kunpeng and Loongson) and operating systems (such as Kylin OS), making it difficult to meet the security strategy requirements of independent control.
[0007] Therefore, there is an urgent need in this field for an intelligent voice alarm solution that can meet the industrial requirements of high real-time performance, high concurrency, and high reliability, while also supporting dynamic terminology updates, pure intranet operation, and full compatibility with domestic software and hardware environments. Summary of the Invention
[0008] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides an industrial monitoring intelligent alarm method, device, system and electronic medium based on dynamic speech synthesis. It adopts a front-end and back-end separation architecture, and uses a locally deployed speech synthesis engine to compile index files in real time to support hot updates of terminology library. Combined with an automatically expanding process pool, it solves the problems of poor flexibility, inability to take into account intranet security, hot updates of terminology, high concurrency and low latency in the existing voice alarm scheme.
[0009] To achieve the above objectives, this application adopts the following technical solution: an intelligent alarm method for industrial monitoring based on dynamic speech synthesis, employing a front-end and back-end separation architecture, including the following steps: S100: Receives alarm event data from the monitoring front end and transmits it to the backend server; S200: The server generates voice text based on the alarm event data and a preset voice template library; S300: Call the locally deployed speech synthesis engine to generate a corresponding audio file based on the speech text. The speech synthesis engine runs based on a pre-compiled speech index file and supports hot updates of the terminology library. During the speech synthesis process, process resources are dynamically adjusted based on real-time load monitoring. S400: The audio file is transmitted to the monitoring front end for playback via a segmented streaming method.
[0010] Furthermore, during the system initialization phase, the deployment of the speech synthesis engine includes: S001: Deploy the build toolchain and its dependent libraries in an offline environment; S002: Compile and install the dependency libraries of the speech synthesis engine; S003: After satisfying all dependent libraries, compile and install the speech synthesis engine locally.
[0011] Furthermore, the step of generating speech text includes: S201: Match a voice template corresponding to the alarm type from the voice template library, wherein the voice template contains variable placeholders; S202: Inject the device parameters and alarm values from the alarm event data into the variable placeholders to form a complete voice text.
[0012] Furthermore, the terminology database hot update method includes: S301: The server receives the terminology database update instruction and the updated terminology pronunciation rule file; S302: Dynamically regenerate the index file based on the updated terminology pronunciation rule file; S303: When the speech synthesis engine performs a synthesis task, it compiles and regenerates the index file in real time.
[0013] Furthermore, the step of dynamically adjusting process resources by the speech synthesis engine includes: Furthermore, during the speech-text synthesis process, if a synthesis anomaly is detected, multi-level fault tolerance processing is performed according to the anomaly type, including S311: using a consistent hashing algorithm to allocate the synthesis task to one of multiple speech synthesis processes for processing; S312: Monitor the load status of each speech synthesis process. When the load exceeds a preset threshold, automatically create a new speech synthesis process and add it to the process pool. S313: The process pool is divided into non-interfering computing resource groups, and each resource group is equipped with independent CPU and memory resources.
[0014] Furthermore, during the speech-to-text synthesis process, if a synthesis anomaly is detected, multi-level fault tolerance processing is performed based on the anomaly type, including: Synthesis timeout handling: If the synthesis time exceeds the first preset time threshold, switch to playing a pre-recorded general speech segment; Template error handling: If the voice template query result is empty or the template parameters fail to be filled, a simplified template containing only the device identifier and alarm type will be enabled; Engine crash handling: The process status is monitored through a heartbeat detection mechanism. If the process is unresponsive, a new process is automatically restarted and the synthesis task is resubmitted.
[0015] Furthermore, it also includes: If a network interruption is detected during streaming, the front end will automatically retransmit the alarm data. If the retransmission fails after exceeding the maximum number of attempts, the locally cached alarm sound will be played.
[0016] The present invention also provides another embodiment, an industrial monitoring intelligent alarm device based on dynamic speech synthesis, which adopts a front-end and back-end separation architecture, the device comprising: The data receiving module is used to receive alarm event data from the monitoring front end and transmit it to the back-end server; The text generation module is used to generate voice text based on the alarm event data and a preset voice template library; The speech synthesis module is used to call the locally deployed speech synthesis engine to process the speech text in order to generate the corresponding audio file; The terminology update module is used to dynamically update the speech terminology database and generate an index file. The speech synthesis engine compiles the index file in real time when performing synthesis tasks. The resource adjustment module is used to monitor the load status in real time and dynamically adjust process resources. The data transmission module is used to stream the audio file to the monitoring front end for playback.
[0017] This application also discloses an industrial monitoring intelligent alarm system based on dynamic speech synthesis, including: One or more processors; Computer-readable storage medium for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the method according to any one of claims 1 to 7.
[0018] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
[0019] The beneficial effects of this application are: 1. Hot update of terminology database and dynamic speech synthesis: The hot update technology of terminology database enables online upgrades with zero business interruption. It also supports parameterized alarm templates, which can embed variables such as device name and alarm value into the voice content in real time to generate personalized alarm voice.
[0020] 2. Secure and controllable domestic alarm configuration: Through a front-end and back-end separation architecture, the domestic TTS engine is deeply optimized and deployed in a pure intranet environment, completely eliminating the dependence on cloud services and meeting the requirements of industrial control systems for data security, network isolation and compatibility with domestic software and hardware.
[0021] 3. Achieving high concurrency and real-time requirements for the alarm process: Adopting a task scheduling and process pool automatic scaling mechanism based on consistent hashing greatly reduces the response latency of voice alarms and stably supports thousands of concurrent requests. This solves the problem of easy crashes in single-threaded processing of open source engines and ensures the stable operation of large-scale distributed systems. Attached Figure Description
[0022] This application is described with reference to the following figures: Figure 1 The timing diagram of the alarm method of this application is shown; Figure 2 The flowchart of the alarm method of this application is shown; Figure 3 The flowchart of the speech synthesis engine installation and deployment process of this application is shown; Figure 4 The flowchart of the speech-to-text synthesis process of this application is shown; Figure 5 A schematic diagram of the multi-level fault tolerance mechanism of this application is shown; Figure 6 The flowchart of the dynamic hot update process of the terminology database of this application is shown; Figure 7 The flowchart of dynamic resource adjustment in the application process is shown. Detailed Implementation
[0023] To better explain and facilitate understanding of the present invention, it is described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described below are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other; for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0024] As the background technology indicates, in the field of industrial control, with the development of Industry 4.0, the demand for real-time alarm feedback in industrial monitoring systems is increasing. Existing voice alarm solutions mainly suffer from the following problems: first, they rely on external networks and cloud services, posing data security risks; second, they cannot support hot updates of terminology libraries, resulting in high maintenance costs; third, their concurrency processing capabilities are weak, making them prone to crashing under high loads; and fourth, their real-time performance is poor, with high response latency. Existing solutions cannot simultaneously meet the core requirements of industrial monitoring for "flexibility, domestic security, high concurrency and low latency, and high reliability," necessitating a targeted technical solution to address these needs.
[0025] To address the aforementioned issues, this application provides an intelligent alarm method for industrial monitoring based on dynamic speech synthesis. It employs a front-end / back-end separation architecture, using a locally deployed speech synthesis engine to compile index files in real time to support hot updates of the terminology database. Combined with an automatically expanding process pool, this solves the problems of poor flexibility, inability to balance intranet security, hot terminology updates, high concurrency, and low latency in existing voice alarm solutions. The specific method is as follows: Figure 1 and Figure 2 As shown, it includes: S100: Receives alarm event data from the monitoring front end and transmits it to the back end server. Upon system startup, the back end server establishes a persistent connection with the real-time database, continuously listening to the alarm event stream, forming the data foundation for system operation. When industrial equipment malfunctions, the front end monitoring system captures the alarm event and transmits structured data containing equipment parameters and alarm levels to the back end server in real time via the WebSocket protocol.
[0026] Furthermore, during the system initialization phase, the localization deployment of the speech synthesis engine is completed, with specific steps as follows: Figure 3 As shown, it includes: S001: Deploy the compilation toolchain and its dependent libraries in an offline environment. In industrial intranet environments equipped with domestically produced chips such as Kunpeng / Loongson CPUs and the Kylin operating system, a complete C / C++ compilation toolchain (such as GCC) and its dependencies (such as GMP, MPFR, MPC) should be pre-installed offline. All source code or RPM packages need to be downloaded in advance and installed via rpm or source code compilation to ensure compatibility.
[0027] S002: Compile and install the dependency libraries of the speech synthesis engine. To meet the requirements of domestic production, this invention adopts the domestic fs-tts-sdk speech synthesis engine, uses a localized speech file library (such as the pinyin folder), and performs deep optimization for industrial environments. This mainly includes adding domestic CPU architecture detection and optimization instructions, implementing a memory pre-loading mechanism for the index file (pinyin.index), and improving initialization speed. Cross-compilation configurations are performed for different domestic platforms, specifying the target architecture and optimization parameters to ensure optimal performance on domestic processors such as Loongson and Kunpeng. Static linking is enabled during compilation to reduce runtime dependencies on external libraries.
[0028] S003: After satisfying all dependent libraries, follow the Linux compilation steps to compile, install, and deploy the fs-tts-sdk speech synthesis engine locally.
[0029] This offline deployment solution ensures that the fs-tts-sdk speech synthesis engine runs independently in a completely isolated industrial intranet environment, without relying on any external network resources. At the same time, through deep optimization and localization adaptation, it meets the stringent requirements of industrial monitoring systems for security, reliability, and performance.
[0030] S200: The server generates voice text based on the alarm event data and a pre-set voice template library. After receiving alarm event data from the front end, the server identifies key fields in the alarm data, including device identifier, real-time collected alarm values, alarm level identifier, timestamp, etc. Based on the information in these key fields, the server searches the pre-set voice template library for a voice template that matches the alarm information and injects the parameters of the keyword segment into the corresponding voice template, thereby generating voice text containing the key information of the alarm. The specific method is as follows... Figure 4 As shown, it includes the following steps.
[0031] S201: Match a voice template corresponding to the alarm type from the voice template library. The voice template contains variable placeholders. The backend server maintains a voice template library for industrial alarms. Each voice template contains fixed text and variable placeholders. The fixed text contains information such as device type, alarm type, and threshold, while the variable placeholders contain information such as the specific device name, current alarm value, and alarm severity level. When the server receives alarm event data, it performs multi-dimensional indexing and matching from the voice template library according to device type, alarm category, and severity level to determine the template with the highest matching degree to the alarm event data, and this template is determined as the voice text template.
[0032] S202: Inject the device parameters and alarm values from the alarm event data into the variable placeholders to form a complete voice text. After determining the voice text template, inject the device parameters, alarm values, and other information from the alarm time data into the variable placeholders, and combine them with the fixed text in the voice template to form a voice text containing complete alarm information. For example, after the pressure of reactor A exceeds the limit, the current pressure value of reactor A collected by the front end is 2.5MPa, and the pressure threshold of reactor A is 2.0MPa. The front-end monitoring interface will collect this alarm information and encapsulate key information such as device identifier, real-time collected alarm value, alarm level identifier, and timestamp, and transmit it to the back-end server in real time via the WebSocket protocol. After receiving the alarm time data, the back-end server parses the device parameters, alarm values, and other information in it, and matches it with the maintained voice template library to determine the voice template for the reactor pressure over-limit alarm. At the same time, it injects information such as device parameters, alarm values, and severity levels into the variable placeholders of the voice template to generate a complete voice text: "Reactor A pressure over-limit, threshold 2.0MPa, current value 2.5MPa". Furthermore, during the speech-to-text synthesis process, if a synthesis anomaly is detected, multi-level fault tolerance processing is performed based on the anomaly type. The specific steps are as follows: Figure 5 As shown, it includes: Synthesis Timeout Handling: During the speech-to-text synthesis process, the backend server sets a time threshold for each synthesis task, such as 200ms. If the synthesis time exceeds this time threshold, the current synthesis task is immediately interrupted, and the most suitable pre-recorded speech segment (e.g., check .wav for device malfunction, network communication interruption .wav) is selected from a core alarm speech library pre-loaded in the cache, based on the alarm reason and severity level, and transmitted to the front end for playback.
[0033] Template error handling: If the voice template query result is empty (no template with the corresponding alarm ID) or the template parameter filling fails (e.g., the alarm data lacks the required device field), a simplified template containing only the device identifier and alarm type is activated. During the voice text generation stage, if a voice template mismatch occurs, the current template matching process is terminated, and a preset simplified template is automatically activated to generate simplified voice text containing only the device identifier and alarm type, such as "Reactor A pressure abnormality." This solution effectively avoids interruptions to the entire alarm process due to non-core template configuration errors, enabling the system to provide valuable alarm information even with imperfect data or configurations.
[0034] Engine crash handling: A heartbeat detection mechanism monitors process status. If a process becomes unresponsive, a new process is automatically restarted and the synthesis task is resubmitted. When a process becomes unresponsive via heartbeat detection, it is immediately marked as a faulty thread, and the allocation of new tasks to it is suspended. Simultaneously, a new process is created and added to the process pool using a consistent hashing algorithm. Unfinished synthesis tasks from the faulty process are retrieved from the task queue and reallocated to the newly created process, ensuring that no tasks are lost.
[0035] By employing multi-level fault tolerance processing, a hierarchical processing structure for speech-text synthesis anomalies is constructed. Faults from different sources and at different levels are isolated and resolved at their respective levels, preventing single-point failures from causing overall system failure and improving system high availability. Simultaneously, the entire fault tolerance process requires no manual intervention; the system automatically performs self-checks and self-healing processes, significantly reducing operational costs. After executing multi-level fault tolerance processing, corresponding logs are generated, facilitating engineers to view the causes of alarms and anomalies, quickly troubleshoot system faults, and improve system availability.
[0036] S300: Call the locally deployed speech synthesis engine to generate a corresponding audio file based on the speech text. The speech synthesis engine runs based on a pre-compiled speech index file and supports hot updates of the terminology library. During the speech synthesis process, process resources are dynamically adjusted based on real-time load monitoring.
[0037] After obtaining the complete alarm text through step S200, the server calls the locally deployed speech synthesis engine fs-tts-sdk to generate the audio file. The fs-tts-sdk speech synthesis engine starts and runs based on the pre-compiled speech index file (pinyin.index) from the system initialization phase, ensuring that no additional index generation is needed for the first synthesis, reducing alarm response delays caused by the initial index file generation. It also supports hot updates of the terminology database.
[0038] Specific hot update methods are as follows: Figure 6 As shown, it includes: S301: The server receives terminology database update instructions and updated terminology pronunciation rule files. The terminology database update instructions include: 1. Manual update instructions, initiated by field engineers as needed, whereby they manually adjust relevant industrial terms and send them to the server for database updates; 2. System-periodic update instructions, where a scheduled task is configured within the system to perform terminology database updates according to a preset cycle, checking for the existence of a new version of the terminology database; 3. Event-triggered update instructions, triggered when equipment within the system is modified, such as by adjusting equipment parameters or changing equipment configuration information, dynamically adjusting the terminology database to ensure that the generated alarm audio files keep pace with equipment adjustments and that the terminology database is updated promptly.
[0039] S302: Dynamically regenerate the index file according to the updated pronunciation rule file for terms. For example, a field engineer sets the pronunciation rule of "PID" as "P-I-D" with segmented pronunciation and converts the pronunciation of "MPa" to "megapascal" according to the Chinese pronunciation rules, and generates an index file that conforms to the Chinese pinyin pronunciation rules.
[0040] Furthermore, in the pronunciation rule file for terms, an emotion parameter mapping engine is added, which adjusts the speech rate and pitch according to the alarm level. The specific adjustment ratios are shown in the following table. Each parameter in the emotion parameter mapping engine supports on-site dynamic adjustment by engineers and can be adjusted according to different industrial site environments. For example, in a noisy industrial site environment, the basic pitch can be appropriately increased. Through the emotion parameter mapping engine, voice alarms can generate differentiated voice broadcasts according to the alarm level, breaking the monotonous and mechanical broadcast mode, significantly enhancing the sense of urgency of the alarm audibly, enabling operators to identify and respond to the most critical events faster, and effectively avoiding ignoring important information due to alarm fatigue.
[0041] S303: When the speech synthesis engine executes the synthesis task, it compiles the regenerated index file in real time. The speech synthesis engine fs-tts-sdk starts running based on the pre-compiled speech index file during the system initialization phase. When executing each synthesis task, if the index file is adjusted, it compiles the regenerated index file in real time, and during the compilation process, it does not affect the execution of the current synthesis task. Subsequent synthesis tasks directly call the updated index file to achieve uninterrupted hot update of the term library.
[0042] The method for uninterrupted update of the term library includes: 1. Monitoring (Watch): The backend server deploys a file system listener (such as inotify in Linux) to monitor the specified industrial term library directory (i.e., the pinyin folder) in real time. When an engineer updates the instruction manually or the system updates the instruction regularly, and new, deleted or modified voice files are added, the listener captures the event, generates a term library update task and triggers the compilation process.
[0043] 2. Compilation (Compile): Call the pre-modified and encapsulated index compilation tool. This tool is derived from the index generation program in the tts source code but has been optimized to adapt to unattended automated operations. The compilation process creates an independent temporary directory to ensure complete isolation from the currently running index file without mutual influence.
[0044] 3. Switching: After successful compilation, new index files such as pinyin.index and pinyin.voice are generated. The server does not directly overwrite the production index files; instead, it moves the new index files to a new directory with a version number or timestamp (e.g., pinyin / v2 / ), enabling multiple versions to coexist. Subsequently, the server notifies the running speech synthesis tasks (Worker processes) to dynamically load the new version of the index by sending signals, HTTP requests, or updating shared memory pointers. The dynamic loading method is lazy loading; any synthesis task currently being processed continues to use the old version of the index file. When the next synthesis task is executed, the new index file is compiled and loaded in real time. This process does not require restarting any processes, achieving true hot updates and zero downtime.
[0045] 4. Rollback: If compilation fails (e.g., due to an incorrect speech file format), the management process logs the error and discards the generated index. The system continues to use the old, stable index version, ensuring uninterrupted service. If the speech synthesis service encounters numerous errors after the new index is loaded, the system triggers a circuit breaker mechanism, automatically rolling back to the previous known good version and issuing an emergency alert to notify on-site engineers to investigate. This effectively prevents a defective index from affecting the stability of the entire system.
[0046] Furthermore, during the speech synthesis process, process resources are dynamically adjusted based on real-time load monitoring, specifically through methods such as... Figure 7 As shown, it includes: S311: A consistent hashing algorithm is used to distribute the synthesis task to one of multiple speech synthesis processes for processing. Consistent hashing constructs a hash ring, mapping nodes and requests onto the hash ring. When a node needs to be added or removed, it only affects a portion of the data of adjacent nodes, while the mapping relationships of most other requests remain unchanged, ensuring the stability of the system when processing massive amounts of real-time alarm information.
[0047] S312: Monitors the load status of each speech synthesis process. When the load exceeds a preset threshold, it automatically creates a new speech synthesis process and adds it to the process pool. When the load status of a speech synthesis process exceeds a preset threshold, for example, a threshold set to 90% of the load, a new speech synthesis process is automatically created and added to the process pool using a consistent hashing algorithm. The newly generated speech synthesis tasks are adjusted to the newly created process, while some tasks from the overloaded process are smoothly migrated to the new process. Tasks on other processes remain unchanged, minimizing the data migration caused by the expansion operation and achieving smooth expansion of the speech synthesis process.
[0048] S313: The process pool is divided into non-interfering computing resource groups. Each resource group is equipped with independent CPU and memory resources to ensure that critical tasks are not affected by other processes, thereby realizing the high concurrency processing capability of the voice alarm system.
[0049] S400: The audio file is transmitted to the monitoring front end for playback via chunked streaming. This solution employs HTTP chunked streaming to create a pipeline operation that simultaneously generates, transmits, and plays the audio.
[0050] The speech synthesis engine does not wait for the entire audio file to be generated before sending it. Instead, it immediately encapsulates each synthesized segment of audio data into a chunk, with each chunk containing a length header and a data body. The server continuously pushes these audio chunks to the network, and using zero-copy technology, sends the audio data directly from the synthesis engine's buffer to the network card buffer, minimizing the number of data copies between kernel space and user space, thus reducing CPU overhead and transmission latency.
[0051] The front-end browser or client continuously reads the HTTP response stream, receives data blocks, and performs verification. If the data block verification fails, the data is automatically retransmitted. If the verification passes, the data is immediately decoded and sent to the audio buffer to start playback. Subsequent data blocks are continuously downloaded, decoded, and appended to the end of the buffer during playback, forming a continuous audio stream.
[0052] When the network is interrupted and data block verification fails, and multiple retransmissions (for example, three retransmissions all failing verification) fail, the front end immediately stops receiving data blocks and switches to a locally cached alarm tone, such as playing a "network error" voice alarm, to avoid interruption. The ability to trigger a locally cached alarm tone even in the event of a network interruption greatly improves the availability of the alarm system.
[0053] In summary, the beneficial effects of the method of the present invention are as follows: 1. Hot update of terminology database and dynamic speech synthesis: The hot update technology of terminology database enables online upgrades with zero business interruption. It also supports parameterized alarm templates, which can embed variables such as device name and alarm value into the voice content in real time to generate personalized alarm voice.
[0054] 2. Secure and controllable domestic alarm configuration: Through a front-end and back-end separation architecture, the domestic TTS engine is deeply optimized and deployed in a pure intranet environment, completely eliminating the dependence on cloud services and meeting the requirements of industrial control systems for data security, network isolation and compatibility with domestic software and hardware.
[0055] 3. Achieving high concurrency and real-time requirements for the alarm process: Adopting a task scheduling and process pool automatic scaling mechanism based on consistent hashing greatly reduces the response latency of voice alarms and stably supports thousands of concurrent requests. This solves the problem of easy crashes in single-threaded processing of open source engines and ensures the stable operation of large-scale distributed systems.
[0056] 4. Multi-level fault tolerance mechanism improves system reliability: Through layered design, faults of different sources and levels are isolated and resolved at the corresponding levels, avoiding the failure of the entire system due to a single point of failure. This solves the pain point of high false alarm risk in traditional solutions and greatly improves the high availability of the system.
[0057] The present invention also provides another embodiment, an industrial monitoring intelligent alarm device based on dynamic speech synthesis, which adopts a front-end and back-end separation architecture, the device comprising: The data receiving module is used to receive alarm event data from the monitoring front end and transmit it to the back-end server; The text generation module is used to generate voice text based on the alarm event data and a preset voice template library; The speech synthesis module is used to call the locally deployed speech synthesis engine to process the speech text in order to generate the corresponding audio file; The terminology update module is used to dynamically update the speech terminology database and generate an index file. The speech synthesis engine compiles the index file in real time when performing synthesis tasks. The resource adjustment module is used to monitor the load status in real time and dynamically adjust process resources. The data transmission module is used to stream the audio file to the monitoring front end for playback.
[0058] This device utilizes a locally deployed, domestically developed speech synthesis engine, fs-tts-sdk, which has undergone deep optimization to ensure optimal performance on domestic processors such as Loongson and Kunpeng. It operates independently within a completely isolated industrial intranet environment, without relying on any external network resources, thus meeting the security, reliability, and compatibility requirements of industrial monitoring systems for domestically developed hardware and software. Dynamic terminology updates via the terminology update module support zero-interruption online upgrades and personalized voice generation. Combined with a resource adjustment module, it leverages consistent hashing algorithm-based task scheduling and automatic process pool expansion to achieve high concurrency and real-time performance for alarm processes.
[0059] A third embodiment of the present invention provides an intelligent alarm system for industrial monitoring based on dynamic speech synthesis, comprising: One or more processors; Computer-readable storage medium for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the method according to any one of claims 1 to 7.
[0060] A fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
[0061] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The words "a" or "an" preceding a component do not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. The use of the terms first, second, third, etc., is for convenience only and does not indicate any order. These terms can be understood as part of the component names.
[0062] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0063] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0064] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.
Claims
1. A method of intelligent alarm for industrial monitoring based on dynamic speech synthesis, characterized in that, Adopting front and back end separation architecture, comprising the following steps: S100: receiving alarm event data from the monitoring front end and transmitting to the back-end server; S200: the server generates voice text according to the alarm event data and the preset voice template library; S300: calling the locally deployed voice synthesis engine to generate the corresponding audio file according to the voice text, the voice synthesis engine is based on the precompiled voice index file and supports hot update of the term library; During the voice synthesis process, the process resources are dynamically adjusted based on real-time load monitoring; S400: the audio file is transmitted to the monitoring front end for playing through block streaming mode.
2. The method of claim 1, wherein, In the system initialization phase, the deployment of the voice synthesis engine includes: S001: deploying the compilation tool chain and its dependent libraries in an offline environment; S002: compiling and installing the dependent libraries of the voice synthesis engine; S003: after all dependent libraries are met, compile and install the voice synthesis engine locally.
3. The method of claim 2, wherein, The step of generating voice text includes: S201: matching the voice template corresponding to the alarm type from the voice template library, the voice template contains variable placeholders; S202: injecting device parameters and alarm values in the alarm event data into the variable placeholders to form a complete voice text.
4. The method of claim 1, wherein, The term library hot update method includes: S301: the server receives the term library update instruction and the updated term pronunciation rule file; S302: dynamically regenerate the index file according to the updated term pronunciation rule file; S303: when the voice synthesis engine performs a synthesis task, the regenerated index file is compiled in real time.
5. The method of claim 1, wherein, The step of dynamically adjusting process resources of the voice synthesis engine includes: S311: using consistent hashing algorithm to distribute synthesis tasks to one of the multiple voice synthesis processes for processing; S312: monitor the load state of each voice synthesis process, when the load exceeds the preset threshold, automatically create a new voice synthesis process and join the process pool; S313: the process pool is divided into non-interfering computing resource groups, each resource group is allocated with independent CPU and memory resources.
6. The method of claim 1, wherein, During the voice text synthesis process, if an abnormality is detected, multi-level fault tolerance processing is performed according to the abnormality type, including: Synthesis timeout processing: if the synthesis time exceeds the first preset time threshold, switch to broadcast the pre-recorded general voice segment; Template error processing: if the voice template query result is empty or the template parameter filling fails, a simplified template containing only device identification and alarm type is enabled; Engine crash processing: monitor the process state through the heartbeat detection mechanism, if the process is unresponsive, automatically restart a new process and resubmit the synthesis task.
7. The method of claim 1, wherein, Further comprising: During streaming, if network interruption is detected, the front end automatically retransmits the alarm data, if retransmission exceeds the maximum number of times and still fails, play the locally cached alarm sound.
8. An industrial monitoring intelligent alarm device based on dynamic speech synthesis, characterized in that, Adopting front and back end separation architecture, the device comprises: A data receiving module for receiving alarm event data from the monitoring front end and transmitting to the back-end server; The text generation module is configured to generate voice text according to the alarm event data and a preset voice template library. The voice synthesis module is configured to call a locally deployed voice synthesis engine to process the voice text to generate a corresponding audio file. The term updating module is configured to dynamically update a voice term library and generate an index file, and the voice synthesis engine is configured to compile the index file in real time when performing a synthesis task. The resource adjusting module is configured to monitor a load state in real time and dynamically adjust process resources. The data transmission module is configured to stream the audio file to the monitoring front end for playing.
9. An industrial monitoring intelligent alarm system based on dynamic speech synthesis, characterized in that, The computer readable storage medium stores one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the method of any one of claims 1-7. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method of any one of claims 1-7. 10. A computer-readable storage medium, characterized in that,
