A wechat automatic early warning system and method

The WeChat automatic early warning system solves the problem of untimely processing of traditional early warning information, and achieves efficient and accurate early warning information sending and feedback. It is applicable to the Windows platform and has cross-platform potential.

CN118509311BActive Publication Date: 2026-01-13SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410501826.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2026-01-13
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

Traditional software system monitoring and troubleshooting methods cannot meet rapidly changing business needs and complex system architectures, resulting in untimely processing of early warning information and potential missed detection of critical faults.

Method used

Design an automatic WeChat early warning system. The system generates and stores early warning information through an early warning information production module, and uses an early warning sending module to periodically query and simulate WeChat operations to send early warning information. Different sending strategies are executed according to the time of early warning generation. The system also includes an early warning feedback mechanism to record the information of the responsible person.

Benefits of technology

It improves the automation and efficiency of early warning processing, ensures that early warning information is promptly and accurately communicated to the responsible parties, reduces human error, has cross-platform operation potential, and possesses good scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509311B_ABST
    Figure CN118509311B_ABST
Patent Text Reader

Abstract

The application provides a WeChat automatic early warning system and method, and belongs to the technical field of automatic early warning. The system comprises an early warning information production module, an early warning sending module and the like. The early warning information production module is configured to define the content structure of early warning information, judge whether early warning information is generated by monitoring various indexes of a system, and send the early warning information to a message queue when the early warning information is generated. The early warning information is stored persistently by a consumer of the message queue. The early warning sending module is configured to query and process early warning information at regular time intervals, filter out unprocessed early warning information according to early warning states by querying early warning information in a database, and sort the early warning information in ascending order according to early warning generation time. The automation operation of a WeChat window is realized by calling a Windows API function and an FLAUI library. Different sending strategies are executed on early warning duty persons according to the different early warning generation time. The application greatly improves the automation and efficiency of early warning processing, and improves the accuracy and reliability of early warning processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic early warning system and method for WeChat, belonging to the field of automated early warning technology. Background Technology

[0002] Automated early warning systems for software systems are an important part of modern software development and operation. They automatically identify potential problems and anomalies by real-time monitoring and analysis of system performance indicators, log data and other key information, and by using machine learning and statistical analysis techniques. They then promptly send alerts to relevant personnel, thereby helping organizations respond quickly and resolve issues, ensuring the stability, reliability and availability of the system.

[0003] As software systems continue to grow in scale and complexity, and as users' demands for system performance and availability increase, system failures and performance issues have become inevitable. Traditional manual monitoring and troubleshooting methods can no longer meet rapidly changing business needs and complex system architectures. Therefore, automated early warning systems for software systems have emerged. Automated early warning technology leverages advancements in modern monitoring systems, big data analytics, machine learning, and artificial intelligence to monitor, analyze, and predict system behavior and status in real time. This allows for timely detection and action before failures occur, thereby improving system stability and availability.

[0004] When an alert is generated, relevant personnel are often notified via email, SMS, DingTalk, etc., to check the system and handle the alert. However, these contact methods are not commonly used communication software. Personnel may miss the alert due to delays in checking the information, leading to a failure to address system malfunctions promptly and potentially causing serious incidents. Summary of the Invention

[0005] The purpose of this invention is to provide a WeChat automatic early warning system and method, which greatly improves the automation and efficiency of early warning processing.

[0006] To achieve the above objectives, the present invention employs the following technical solution:

[0007] Early warning information production module: It is configured to define the content structure of early warning information, including the early warning text content, the person responsible for the early warning, the time of early warning generation, and the early warning status; it determines whether early warning information is generated by monitoring various indicators of the system; when early warning information is generated, it sends this information to the message queue; and through the message queue consumer, it persists the early warning information to the database or other storage media.

[0008] The early warning sending module is configured to periodically query and process early warning information. It queries the database periodically to filter out unprocessed early warnings based on their status and sorts them in ascending order by the time they were generated. It automates the operation of WeChat windows by calling Windows API functions and the FLAUI library. It also implements different sending strategies for the person responsible for the early warning based on the time the warning was generated.

[0009] Preferably, the sending strategy is as follows: if the time of the warning is less than five minutes from the current time, the warning is sent only to the person primarily responsible; if it is more than five minutes from the current time, the warning is sent to all responsible persons.

[0010] Preferably, the warning sending module simulates WeChat operations to send warnings, including finding and clicking relevant sub-elements, setting text content, and sending warning information; the warning information contains a link that points to the warning feedback mechanism, which is used to process the warning and record the responsible person.

[0011] A systematic method for automatic WeChat alerts includes:

[0012] Define the content of the early warning information, continuously monitor various operating indicators of the system, and determine whether an early warning information is generated.

[0013] When the warning conditions are met, a warning message is generated and sent to the message queue. The message queue consumer listens for and receives the warning message and persists it to the database or other storage media.

[0014] Set a timer to periodically query the database for early warning information, filter out unprocessed early warnings based on their status, and sort the list of early warning information in ascending order by the time the early warnings were generated.

[0015] Preparing to automate operations on WeChat windows using Windows API and the FLAUI library;

[0016] Iterate through the list of unprocessed warning messages, determine the sending strategy based on the warning time, and send the warning text content to the corresponding responsible person by simulating WeChat operation;

[0017] The warning text contains a link pointing to the warning feedback mechanism. When the responsible person clicks the link, the warning feedback mechanism is triggered, the warning status is set to "processed", and the responsible person's information is recorded.

[0018] Repeat the alert sending process until all unprocessed alerts have been processed.

[0019] Preferably, the warning information includes: warning text content, the person responsible for the warning, the time the warning was generated, and the warning status; the person responsible for the warning includes the WeChat names of the first, second, and third responsible persons.

[0020] Preferably, the database includes MySQL, Oracle, and PostgreSQL.

[0021] Preferably, by simulating WeChat operations, the warning text content is sent to the corresponding responsible person in the following specific way:

[0022] In the WeChat window, search for all child elements whose names match the name of the person primarily responsible for the early warning by searching for child elements. Select the second child element in the list and click on it.

[0023] In the WeChat form, find the child control with the control type of text box, set the Text property of the text box to the warning text content, and attach a link that points to the warning feedback mechanism and contains the unique identifier of the warning and the name of the person in charge.

[0024] When the responsible person clicks the link, the early warning feedback mechanism is triggered. The service will update the status of the corresponding early warning in the database to "processed" and record the responsible person who handled it.

[0025] Send the warning information to the person primarily responsible for the warning. If the warning is issued more than five minutes after the current time, send the warning text to all persons responsible for the warning.

[0026] The advantages of this invention are as follows: Through the early warning information production module, the system can automatically monitor system indicators, determine and generate early warning information, and send it to a message queue for storage. The early warning sending module can automatically query and process early warning information periodically, and send early warning information by simulating WeChat operations, greatly improving the automation and efficiency of early warning processing. The system executes different sending strategies based on the time of early warning generation, ensuring that key responsible persons are quickly notified in emergency situations, while all relevant responsible persons are notified in non-emergency situations. This strategy improves the flexibility and accuracy of early warning sending, helping to ensure that early warning information is handled promptly and appropriately. By including a link to the early warning feedback mechanism in the early warning information, the system can receive and process feedback from responsible persons in real time, update the early warning status, and record responsible person information. This not only improves the real-time performance of early warning processing but also helps to track and monitor the early warning processing process. Using Windows API and the FLAUI library for automated WeChat window operations makes the system not only applicable to the Windows platform but also has the potential for cross-platform operation. At the same time, due to the modular design, the system has good scalability, allowing for the addition of more functions and modules according to actual needs. Through automated early warning sending and feedback processing, human error and omissions are reduced, improving the accuracy and reliability of early warning processing. Attached Figure Description

[0027] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0028] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.

[0030] Example 1

[0031] A WeChat automatic early warning system includes:

[0032] Early warning information production module: It is configured to define the content structure of early warning information, including the early warning text content, the person responsible for the early warning, the time of early warning generation, and the early warning status; it determines whether early warning information is generated by monitoring various indicators of the system; when early warning information is generated, it sends this information to the message queue; and through the message queue consumer, it persists the early warning information to the database or other storage media.

[0033] The early warning sending module is configured to periodically query and process early warning information. It queries the database periodically to filter out unprocessed early warnings based on their status and sorts them in ascending order by the time they were generated. It automates the operation of WeChat windows by calling Windows API functions and the FLAUI library. It also implements different sending strategies for the person responsible for the early warning based on the time the warning was generated.

[0034] The sending strategy is as follows: if the time of the warning is less than five minutes from the current time, the warning will only be sent to the person primarily responsible; if it is more than five minutes from the current time, the warning will be sent to all responsible persons.

[0035] Optionally, the warning sending module simulates WeChat operations to send warnings, including finding and clicking relevant sub-elements, setting text content, and sending warning information; the warning information contains a link that points to the warning feedback mechanism, which is used to process the warning and record the responsible person.

[0036] Example 2

[0037] like Figure 1 As shown, a WeChat automatic alert method includes:

[0038] Define the content of the early warning information, continuously monitor various operating indicators of the system, and determine whether an early warning information is generated.

[0039] When the warning conditions are met, a warning message is generated and sent to a message queue. The message queue consumer listens for and receives the warning message and persists it to a database or other storage medium.

[0040] Set a timer to periodically query the database for early warning information, filter out unprocessed early warnings based on their status, and sort the list of early warning information in ascending order by the time the warnings were generated.

[0041] We are preparing to automate operations on WeChat windows using the Windows API and the FLAUI library.

[0042] Iterate through the list of unprocessed warning messages, determine the sending strategy based on the warning time, and send the warning text content to the corresponding responsible person by simulating WeChat operation.

[0043] The warning text contains a link pointing to the warning feedback mechanism. When the responsible person clicks the link, the warning feedback mechanism is triggered, the warning status is set to "processed", and the responsible person's information is recorded.

[0044] Repeat the alert sending process until all unprocessed alerts have been processed.

[0045] As a refinement of the embodiments of this disclosure, specifically:

[0046] S1. Define the warning information:

[0047] S1.1 Warning text content: Used to describe information such as the reason why the warning generation module generates the warning.

[0048] S1.2 Warning Responsible Person: The warning responsible person should include the WeChat names of the first responsible person, the second responsible person, and the third responsible person. The presence of three responsible persons can prevent the failure to check the fault due to the failure of one of the responsible persons to check the warning information in a timely manner.

[0049] S1.3 Warning generation time: Used to determine whether the warning needs to be notified to more responsible persons.

[0050] S1.4 Warning Status: Divided into Unprocessed and Processed, used to determine whether the warning needs to be notified to more responsible persons.

[0051] S2. Monitor various indicators of the system and determine whether to generate early warning information.

[0052] S3. If an early warning message should be generated, send the early warning message that meets the early warning message standard to the message queue to avoid performance bottlenecks when there are too many early warning messages.

[0053] S4. Message queue consumers listen to the message queue and persist alert information to MySQL, Oracle, PostgreSQL, or other storage media.

[0054] S5. Periodically query the database or other storage media for early warning information, filter unprocessed early warnings according to their status, and sort them in ascending order by the time they were generated.

[0055] S6. Log in to the WeChat client on Windows and ensure that all relevant responsible persons for the warning are included in your WeChat friends list.

[0056] S7. Use the DllImport attribute to link the dynamic link library user32.dll in the Windows operating system, which is used to create, manage, and manipulate windows, message queues, menus, cursors, and icons.

[0057] S8. Setting SetLastError=true tells the runtime to set an error code after the method is called for further error handling.

[0058] S9. Import the FindWindow and GetWindowThreadProcessId functions from the user32.dll library.

[0059] The S10.FindWindow function is used to find the top-level window with a specified class name and window name, and returns the window's handle. Specifically, it accepts two parameters: the class name and the window name.

[0060] The S11.GetWindowThreadProcessId function is used to retrieve the thread identifier and process identifier of a specified window. It accepts the window handle as an argument and returns the thread and process identifiers by reference.

[0061] S12. Call the FindWindow function, pass in the parameter "WeChat", and get the handle of WeChat in the Windows operating system.

[0062] S13. Check if the handle is a null pointer. If it is null, it means that the user is not logged into WeChat in the current system. Prompt the user to log in to WeChat.

[0063] S14. Call the GetWindowThreadProcessId function, pass in the parameter "Wechat", and obtain the process identifier of WeChat in the Windows operating system.

[0064] S15. Bind FLAUI based on WeChat process identifier.

[0065] S16. Obtain the WeChat window automation operation object in FLAUI.

[0066] S17. Set the WeChat window to the default focus state.

[0067] S18. Locate the child element named "Chat" in the WeChat window and click on it.

[0068] S19. Iterate through the list of early warning messages retrieved.

[0069] If the warning is issued less than five minutes from the current time, the warning text message will be sent to the person primarily responsible for the warning, as follows:

[0070] S1.1 Locate the child element named "Contacts" in the WeChat window and click on it.

[0071] S1.2 Then find the child element named "Search" and set its value to the name of the person responsible for the warning.

[0072] S1.3 Find all child elements whose names are the names of the person responsible for the early warning, take the second child element, and perform a click operation.

[0073] S1.4 Locate the first child control in wxWindow whose control type is text box (ControlType.Text), convert it to a text box object, set the Text property to the value of the variable warning text content, and attach a link pointing to the warning feedback mechanism, which includes a unique warning identifier and the name of the person responsible for the warning.

[0074] The S1.5 early warning feedback mechanism is an HTTP service that can set the early warning to the state pointed to by the unique early warning identifier in the connection to be processed, and record the person responsible for the early warning.

[0075] S1.6 searches for all child controls named "Send (S)" in wxWindow, then takes the first control that matches the condition and clicks it.

[0076] If the warning is issued more than five minutes after the current time, the warning text will be sent to all those responsible for the warning.

[0077] S20. Repeat steps S5-S19.

[0078] This disclosure also provides a WeChat automatic warning device, including a processor and a memory. Optionally, the device may further include a communication interface and a bus. The processor, communication interface, and memory can communicate with each other via the bus. The communication interface can be used for information transmission. The processor can call logical instructions in the memory to execute the WeChat automatic warning method described in the above embodiments.

[0079] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0080] Memory, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor executes the program instructions / modules stored in the memory to perform functional applications and data processing, thereby implementing the WeChat automatic warning method in the above embodiments.

[0081] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory.

[0082] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the aforementioned WeChat automatic warning method.

[0083] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0084] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0085] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A WeChat automatic early warning system, characterized in that, include: Early warning information production module: It is configured to define the content structure of early warning information, including the early warning text content, the person responsible for the early warning, the time of early warning generation, and the early warning status; By monitoring various indicators of the system, it is determined whether an early warning message is generated; when an early warning message is generated, this message is sent to a message queue; and through the message queue consumer, the early warning message is persistently stored in a database or other storage medium. The early warning sending module is configured to periodically query and process early warning information. It queries the database periodically to filter out unprocessed early warnings based on their status and sorts them in ascending order by the time they were generated. By calling Windows API functions and the FLAUI library, automated operations of WeChat windows are achieved; different sending strategies are implemented for the person responsible for the warning based on the time the warning is generated. By calling Windows API functions and the FLAUI library, automated operations of the WeChat window are achieved. The specific method is as follows: Log in to the WeChat client on Windows and ensure that all relevant responsible persons for the warning are included in your WeChat contacts; Use the DllImport attribute to link the dynamic link library user32.dll in the Windows operating system, which is used to create, manage, and manipulate windows, message queues, menus, cursors, and icons; Setting SetLastError=true tells the runtime to set the error code after the method is called for further error handling; Import the FindWindow and GetWindowThreadProcessId functions from the user32.dll library; The FindWindow function is used to find the top-level window with a specified class name and window name, and returns the handle of the window; specifically, it accepts two parameters, namely the class name and the window name. The GetWindowThreadProcessId function is used to obtain the thread identifier and process identifier of a specified window. It accepts the window handle as a parameter and returns the thread and process identifiers by reference. Call the FindWindow function, pass in the parameter "WeChat", and obtain the handle of WeChat in the Windows operating system; Check if the handle is a null pointer. If it is, it means that the user is not logged into WeChat in the current system, and prompt the user to log in to WeChat. Call the GetWindowThreadProcessId function, pass in the parameter "Wechat", and get the process identifier of WeChat in the Windows operating system; Bind FLAUI based on WeChat process identifier; Retrieve the WeChat window automation operation object in FLAUI.

2. The WeChat automatic early warning system according to claim 1, characterized in that, The sending strategy is as follows: if the time of the warning is less than five minutes from the current time, the warning will only be sent to the person primarily responsible; if it is more than five minutes from the current time, the warning will be sent to all responsible persons.

3. The WeChat automatic early warning system according to claim 1, characterized in that, The warning sending module simulates WeChat operations to send warnings, including finding and clicking relevant sub-elements, setting text content, and sending warning information. The warning information contains a link that points to the warning feedback mechanism, which is used to process warnings and record the responsible party.

4. A WeChat automatic early warning method using the system described in any one of claims 1-3, characterized in that, include: Define the content of the early warning information, continuously monitor various operating indicators of the system, and determine whether an early warning information is generated. When the warning conditions are met, a warning message is generated and sent to the message queue. The message queue consumer listens for and receives the warning message and persists it to the database or other storage media. Set a timer to periodically query the database for early warning information, filter out unprocessed early warnings based on their status, and sort the list of early warning information in ascending order by the time the early warnings were generated. Preparing to automate operations on WeChat windows using Windows API and the FLAUI library; Iterate through the list of unprocessed warning messages, determine the sending strategy based on the warning time, and send the warning text content to the corresponding responsible person by simulating WeChat operation; The warning text contains a link pointing to the warning feedback mechanism. When the responsible person clicks the link, the warning feedback mechanism is triggered, the warning status is set to "processed", and the responsible person's information is recorded. Repeat the alert sending process until all unprocessed alerts have been processed.

5. The WeChat automatic early warning method according to claim 4, characterized in that, The warning information includes: the warning text content, the person responsible for the warning, the time the warning was generated, and the warning status; the person responsible for the warning includes the WeChat names of the first, second, and third responsible persons.

6. The WeChat automatic early warning method according to claim 4, characterized in that, The databases include MySQL, Oracle, and PostgreSQL.

7. The WeChat automatic early warning method according to claim 4, characterized in that, The method for sending warning text messages to the relevant responsible persons by simulating WeChat operation is as follows: In the WeChat window, search for all child elements whose names match the name of the person primarily responsible for the early warning by searching for child elements. Select the second child element in the list and click on it. In the WeChat form, find the child control with the control type of text box, set the Text property of the text box to the warning text content, and attach a link that points to the warning feedback mechanism and contains the unique identifier of the warning and the name of the person in charge. When the responsible person clicks the link, the early warning feedback mechanism is triggered. This mechanism will update the status of the corresponding early warning in the database to "processed" and record the responsible person who handled it. Send the warning information to the person primarily responsible for the warning. If the warning is issued more than five minutes after the current time, send the warning text to all persons responsible for the warning.

8. A WeChat automatic warning device, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the WeChat automatic warning method as described in any one of claims 4-7 when running the program instructions.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 4-7 above.

Citation Information

Patent Citations

  • Data center synthesized alarming system and method

    CN107102932A

  • Method and apparatus for capturing information of user interface UI elements, and storage medium

    CN109542553A