WeChat RPA management-based survival state detection method and device, and medium
By creating bypass processes and screening detection interfaces in the WeChat RPA management system, the survival status of the main process is detected in real time, and the problem of low survival rate of the WeChat RPA management system is solved, achieving efficient automated management and stable operation of the system.
Patent Information
- Application Number
- CN202510170530.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-23
AI Technical Summary
The existing WeChat RPA management system has a low survival rate due to the instability of third-party clients, and the system is prone to crash or lose connections, affecting overall stability and reliability.
By creating the bypass process corresponding to the main process managed by WeChat RPA, filtering the detection interface that meets the conditions, and calling the interface through the main process within the preset target time range to send test messages to the virtual server, recording the return time to generate test logs, the bypass process scans the log files regularly, parsing the timestamp to calculate the time difference, and detecting the survival status of the main process.
By monitoring the system status in real time and taking timely restart measures to prevent system crashes, the system's automation level and operating efficiency are improved, and the survival rate of WeChat RPA management is significantly improved.
Smart Images

Figure CN120029918A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a survival status detection method, device and medium based on WeChat RPA management. Background Art
[0002] With the rapid development of artificial intelligence, Robotic Process Automation (RPA) is widely used in various Internet applications, such as WeChat and Enterprise WeChat. On these platforms, RPA can be used to automate some repetitive and regular tasks, such as automatic replies, message processing, data analysis, etc. However, in order to improve the survival rate of Robotic Process Automation (RPA), it is necessary to detect the main process of Robotic Process Automation (RPA) to achieve a high survival rate of WeChat RPA management.
[0003] The instability of third-party clients in the existing WeChat RPA management will lead to a low survival rate of the WeChat RPA management system. Due to the instability of third-party clients, the RPA system is prone to crash or lose connection during execution, which in turn affects the stability and reliability of the overall system, resulting in a low survival rate when conducting WeChat RPA management detection. Summary of the invention
[0004] The present invention provides a survival status detection method, device and medium based on WeChat RPA management, the main purpose of which is to solve the problem of low survival rate during WeChat RPA management detection.
[0005] To achieve the above purpose, the present invention provides a survival status detection method based on WeChat RPA management, including:
[0006] Create a bypass process corresponding to the main process managed by WeChat RPA, and select a detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process;
[0007] Calling the screened detection interface through the main process within a preset target time range, and sending a test message to a preset virtual server using the screened detection interface;
[0008] When the screened detection interface receives a successful test result returned by the virtual server based on the test message, the return time corresponding to the successful test result is recorded, and a test log corresponding to the test message in the main process is generated according to the return time;
[0009] Scanning the log file in the main process through the bypass process within a preset target time interval, querying the test log in the scanned log file, and parsing the timestamp in the queried test log;
[0010] The time difference between the parsed timestamp and the real-time time point corresponding to the parsed test log is calculated, and the survival status of the main process managed by WeChat RPA is detected based on the time difference.
[0011] Optionally, the screening of a detection interface that meets the condition according to a preset interface condition and a functional requirement corresponding to the main process includes:
[0012] Extracting interface connection conditions, interface real-time conditions, interface security conditions and interface random call conditions from preset interface conditions;
[0013] Selecting a first interface that meets the interface connection condition in the main process;
[0014] Selecting a second interface that meets the real-time condition of the interface from the first interface;
[0015] Screening a third interface that meets the interface security condition from the second interface;
[0016] According to the functional requirement, a detection interface that meets the random calling condition of the interface is screened in the third interface.
[0017] Optionally, calling the screened detection interface by the main process within a preset target time range includes:
[0018] Sending an interface call request of the screened detection interface through the main process;
[0019] Calling the screened detection interface according to the interface call request, and recording the calling time of calling the screened detection interface;
[0020] Generate a random time interval within the target time range, and perform time superposition of the call time and the random time interval to obtain the next call time of the screened detection interface;
[0021] According to the next calling time, return to the step of randomly sending the interface calling request of the screened detection interface through the main process until the number of interface calling requests of the screened detection interface reaches a preset number of requests.
[0022] Optionally, generating a test log corresponding to the test message in the main process according to the return time includes:
[0023] Determine a timestamp of successful sending of the test message according to the return time;
[0024] Generate a target message after the test message is successfully sent through a preset message format;
[0025] The target message and the timestamp are merged into a test log of the test message in the main process.
[0026] Optionally, scanning the log file in the main process by the bypass process within a preset target time interval includes:
[0027] Extracting the target log file scanned by the bypass process according to the storage path of the log file, and recording the target scanning time of the target log file scanned by the bypass process;
[0028] Counting the next scanning time according to the target scanning time and the preset target time interval;
[0029] Returning to the step of extracting the target log file scanned by the bypass process according to the storage path of the log file at the next scanning time;
[0030] The target log files scanned by the aggregation are log files scanned by the bypass process.
[0031] Optionally, querying the test log in the scanned log file includes:
[0032] Extract all log entries in the scanned log file, and extract keywords in the test log;
[0033] Comparing the keywords in the test log with all log entries one by one;
[0034] Counting the log entries having the same keywords as those in the test log among the compared log entries;
[0035] The log entries with the same keywords are regarded as the queried test logs.
[0036] Optionally, parsing the timestamp in the queried test log includes:
[0037] Extract the time data from the queried test log;
[0038] Converting the time data into a time data object;
[0039] The timestamp in the queried test log is parsed according to the time attribute of the time data object.
[0040] Optionally, detecting the survival status of the main process managed by WeChat RPA according to the time difference includes:
[0041] Determine the survival time threshold of the main process based on preset business requirements;
[0042] When the time difference is within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is normal;
[0043] When the time difference is not within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is abnormal.
[0044] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0045] at least one processor; and,
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned survival status detection method based on WeChat RPA management.
[0048] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned survival status detection method based on WeChat RPA management.
[0049] The embodiment of the present invention sends a test message to the server through the main process regularly through the screened detection interface. The interface is not only used to maintain the login status, but also reflects the key operating status of the main process. The test message sending and log recording of the screened detection interface ensure that the key tasks of the system run in a stable state; if the test message is successfully sent, the main process will print a log in the target format, and the bypass process is responsible for regularly detecting the log file generated by the main process. If the test log is detected and the timestamp in the log is analyzed and compared with the current time, it is considered that the main process is running normally, so that the main process and the bypass process cooperate with each other to monitor the system status in real time. When the main process is not running normally, that is, when the main process is not alive, it is necessary to take restart measures for the main process in time to prevent the system from crashing, and the automatic detection and restart mechanism reduces the need for manual intervention, and improves the automation level and operation efficiency of the system. Therefore, the survival status detection method, device and medium based on WeChat RPA management proposed in the present invention can solve the problem of low survival rate when performing WeChat RPA management detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of a survival status detection method based on WeChat RPA management provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a process of calling a screened detection interface provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of the structure of an electronic device for implementing the survival status detection method based on WeChat RPA management provided in one embodiment of the present invention.
[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0055] The embodiment of the present application provides a survival status detection method based on WeChat RPA management. The execution subject of the survival status detection method based on WeChat RPA management includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the survival status detection method based on WeChat RPA management can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0056] Reference Figure 1 As shown, it is a flow chart of a survival status detection method based on WeChat RPA management provided by an embodiment of the present invention. In this embodiment, the survival status detection method based on WeChat RPA management includes:
[0057] S1. Create a bypass process corresponding to the main process managed by WeChat RPA, and select a detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process.
[0058] In the embodiment of the present invention, the main process managed by WeChat RPA refers to the RPA system itself. In normal business, there is generally only the main process itself. However, when forwarding messages or other operations, there may be risks, causing the main process to hang up. However, the forwarding of messages causing the main process to hang up is related to the mechanism of RPA itself. The main process cannot be directly forced to restart. It is still necessary to restart the main process at a time node. Therefore, it is necessary to create a bypass process for detecting the survival status of the main process. The bypass process is responsible for regularly detecting the log files generated by the main process in order to prevent the main process from hanging up or being abnormally interrupted.
[0059] Furthermore, after creating the bypass process, it is necessary to screen out a special interface and screen out the interface that has a core connection with the outside. Based on the special interface, it is meaningful to determine that the survival of the main process being detected is meaningful. If other interfaces have not exchanged cores with the remote server, then detecting this interface is meaningless. Only interfaces that have been connected to the main process are meaningful for detection.
[0060] In an embodiment of the present invention, the detection interface refers to an interface for detecting the survival rate of the main process, such as being used to simulate whether the main process is in a normal operating state. In order to ensure a high survival rate of the RPA management system, the selection of the detection interface is very critical. Not all interfaces can be used as detection interfaces, and it is necessary to screen detection interfaces that meet the conditions based on interface conditions.
[0061] In the embodiment of the present invention, the step of screening the detection interface that meets the condition according to the preset interface condition and the functional requirement corresponding to the main process includes:
[0062] Extracting interface connection conditions, interface real-time conditions, interface security conditions and interface random call conditions from preset interface conditions;
[0063] Selecting a first interface that meets the interface connection condition in the main process;
[0064] Selecting a second interface that meets the real-time condition of the interface from the first interface;
[0065] Screening a third interface that meets the interface security condition from the second interface;
[0066] According to the functional requirement, a detection interface that meets the random calling condition of the interface is screened in the third interface.
[0067] In detail, the interface connection condition in the interface condition means that the interface must satisfy the remote connection to maintain communication, that is, the interface is not blacklisted, and the successful call of the interface can represent the normal operation status of the main process. For example, when sending a message, a path must be established, then establishing the path is a key interface; the interface real-time condition means that the screened interface must interact with the server in real time to ensure that each call can reflect the current system status; the interface security condition means that the screened interface should be safe and will not be intercepted due to frequent calls, and the generated log format should be unique to facilitate accurate identification and parsing by bypass process B; the interface random call condition means that the call time of the interface cannot be a regular fixed interval.
[0068] Specifically, in the main process, screen out the interfaces that can meet the key status in the interface connection conditions, that is, the successful call of the interface can represent the normal operating status of the main process, all interfaces that meet the interface connection conditions are taken as the first interface, and the interface that can interact with the server in real time is screened out from the screened first interfaces, all interfaces that meet the interface real-time conditions are taken as the second interface, and the interfaces that are safe are screened out from the screened second interfaces, all interfaces that meet the interface security conditions are taken as the third interface, and from the screened third interfaces, according to the functional requirements of the main process, screen out interfaces whose calling time is not a regular fixed interval, and use the interface that meets the random calling conditions as the detection interface. The functional requirements include but are not limited to scanning the code to log in, forwarding messages, obtaining a friend list, obtaining group messages, @ someone, sending messages to someone, etc. Different interfaces support different monitoring tasks, so as to determine the detection interface to be called based on the functional requirements.
[0069] Furthermore, after the detection interface that meets the conditions is screened out, the detection interface that meets the conditions will be called through the main process to detect whether the main process can successfully call the interface and successfully send the message.
[0070] S2. Calling the screened detection interface through the main process within a preset target time range, and using the screened detection interface to send a test message to a preset virtual server.
[0071] In an embodiment of the present invention, the main process calls the screened detection interface at regular intervals (for example, randomly within a maximum of 2 minutes), that is, the time point of the call request is randomly selected, not a fixed interval, to achieve periodic calling of the screened detection interface.
[0072] In the embodiment of the present invention, refer to Figure 2 As shown, the detection interface filtered out by calling the main process within the preset target time range includes:
[0073] S21, sending an interface call request of the screened detection interface through the main process;
[0074] S22, calling the screened detection interface according to the interface calling request, and recording the calling time of calling the screened detection interface;
[0075] S23, generating a random time interval within the target time range, and superimposing the calling time with the random time interval to obtain the next calling time of the screened detection interface;
[0076] S24. Return to the step of sending the interface call request of the filtered detection interface through the main process according to the next call time, until the number of interface call requests of the filtered detection interface reaches a preset number of requests.
[0077] In detail, the interface call request of the filtered detection interface includes request parameters to execute the function or operation defined by the interface. The main process will randomly send the interface call request of the filtered detection interface within a preset time range. Each time the main process sends the interface call request, it will call the filtered detection interface and record the time of the call when calling the interface for subsequent statistics and calculation of the next call time. The next time the interface should be called is calculated based on the current call time and the preset target time range. After determining the time of the next call, the system will randomly call the filtered detection interface within any time interval between the current call time and the next call time. The preset target time range refers to the interval time between the main process calling the filtered detection interface, and the target time range can be custom configured.
[0078] Specifically, the detection interface filtered out by the main process call is random, because it is impossible for the user to send messages every moment when accessing, that is, it is randomly accessed, that is, the detection interface filtered out by the main process call is random, and a test message is sent to the preset virtual server according to the filtered detection interface after the call, that is, a test message or instruction is sent through the filtered detection interface, wherein the preset virtual server refers to a configured, simulated server environment for testing and verifying interface functions, rather than the actual production environment, simulating the behavior of the real server, then the virtual server can simulate various responses and states to ensure the performance of the interface under different conditions.
[0079] For example, assume that the business background is that the RPA robot sends messages from user A to user B via WeChat, and user B then forwards it to user C. Because it is necessary to ensure that every message from user A is forwarded, the main process must always exist. At this time, another person will be found in the message sending in the main process to let him send messages to another fixed person at a fixed time. This fixed person is the user party for simulation detection. This fixed person may not pay attention to what information is sent, that is, to ensure that user A can send messages successfully, so the sending of test messages in the main process is simulated.
[0080] Furthermore, after sending a test message based on the call to the filtered detection interface, an interface will return a result, and then the success of the interface call will be judged based on the return result of the interface, so as to further analyze the running status of the main process based on the return result of the interface.
[0081] S3. When the screened detection interface receives the test success result returned by the virtual server based on the test message, it records the return time corresponding to the test success result, and generates a test log corresponding to the test message in the main process according to the return time.
[0082] In an embodiment of the present invention, when the return result after the filtered detection interface sends a test message is successful, the main process will record the current time, record the current time as the return time, and generate a test log, wherein the test log refers to the log record corresponding to the test message generated after the main process calls the filtered detection interface at regular intervals and sends the test message.
[0083] In the embodiment of the present invention, generating a test log corresponding to the test message in the main process according to the return time includes:
[0084] Determine a timestamp of successful sending of the test message according to the return time;
[0085] Generate a target message after the test message is successfully sent through a preset message format;
[0086] The target message and the timestamp are combined into a test log of the test message.
[0087] In detail, after the interface returns successfully, the main process will record the current time, and determine the return time as the current time when the test message is successfully sent, that is, the current timestamp. Then, according to the message format, the target message after the test message is successfully sent can be determined. The target message is "###@@@###". Then, this target message and timestamp are merged into the test log of the test message. The test log is "###@@@###" + timestamp.
[0088] Furthermore, the main process randomly calls the screened detection interface at regular intervals and sends a test message. After the interface returns successfully, the main process records the current time and generates a test log "###@@@###" + timestamp. The bypass process is responsible for regularly checking the log files generated by the main process, and then judging whether the main process is running normally based on the detected log files.
[0089] S4. Scanning the log files in the main process through the bypass process within a preset target time interval, querying the test log in the scanned log files, and parsing the timestamp in the queried test log.
[0090] In the embodiment of the present invention, the log file refers to a record file generated by the main process during its operation, which records the activities, events, errors and status information of the main process.
[0091] In the embodiment of the present invention, scanning the log file in the main process by the bypass process within a preset target time interval includes:
[0092] Extracting the target log file scanned by the bypass process according to the storage path of the log file, and recording the target scanning time of the target log file scanned by the bypass process;
[0093] Counting the next scanning time according to the target scanning time and the preset target time interval;
[0094] Returning to the step of extracting the target log file scanned by the bypass process according to the storage path of the log file at the next scanning time;
[0095] The target log files scanned by the aggregation are log files scanned by the bypass process.
[0096] In detail, the log files after the bypass process scan are extracted from the storage path of the log files through preset computer statements (such as Java statements, Python statements, etc.). Whenever these log files are extracted, the timestamp or time information of the bypass process scan operation is recorded. According to the recorded scan time and the preset target time interval, the time for the next bypass process scan is calculated. Before the calculated next scan time point arrives, the program will return to the specified storage path again to prepare to extract the next bypass process scan log file, and the extracted bypass process scan log files are aggregated to form a complete bypass process scan log file collection, that is, the bypass process scans the log file at a certain interval (for example, 1 minute), and the log file is continuously updated during the scanning process.
[0097] For example, the target scanning time corresponding to the target log file at the first scan is 10:00, and the target time interval is 1 minute, so the time of the next scan is 10:01, and the bypass process continuously scans the log file according to the target time interval, where the target log file refers to the log file at the first scan, and the target scanning time refers to the time corresponding to the first scan of the log file.
[0098] Furthermore, the bypass process scans the log file at regular intervals (for example, 1 minute) to look for log entries containing "###@@@###" in the log file, and uses the log entries containing "###@@@###" as test logs, so that it can be determined whether the main process is running normally based on the queried test logs.
[0099] In the embodiment of the present invention, the step of querying the test log in the scanned log file includes:
[0100] Extract all log entries in the scanned log file, and extract keywords in the test log;
[0101] Comparing the keywords in the test log with all log entries one by one;
[0102] Counting the log entries having the same keywords as those in the test log among the compared log entries;
[0103] The log entries with the same keywords are regarded as the queried test logs.
[0104] In detail, all log entries are extracted from the log file through preset computer statements (such as Java statements, Python statements, etc.), and keywords in the test log are extracted, the keywords are "###@@@###", and each keyword in the test log is compared one by one with all the extracted log entries. After comparison, the log entries that match the keywords in the test log are counted, and the log entries with the same keywords contain "###@@@###", and the log entries that match the keywords in the test log are output as the queried test logs.
[0105] Furthermore, in order to determine whether the main process is running normally, it is necessary to compare the timestamp in the queried test log with the current time, so it is necessary to parse the timestamp in the test log.
[0106] In the embodiment of the present invention, the parsing of the timestamp in the queried test log includes:
[0107] Extract the time data from the queried test log;
[0108] Converting the time data into a time data object;
[0109] The timestamp in the queried test log is parsed according to the time attribute of the time data object.
[0110] In detail, extract the part containing time information from the log entry, convert the extracted time data into a time data object that can be understood and processed by the program, and use the built-in date and time processing function or library to parse the time data into a date and time object. For example, in Python, the datetime module can be used for parsing. Once the time data is converted into a date and time object, its various attributes can be accessed, such as year, month, day, hour, minute, second, etc. For example, assuming that the time data string extracted from the log is timestamp_str = "2024-07-15T10:30:00Z", parse the time data string into a datetime object, and parse the timestamp in the queried test log through the datetime object.
[0111] Furthermore, the bypass process parses the latest test log timestamp and compares it with the current time. By comparing the difference between the timestamp and the current time, the exact time when the event occurred can be determined, thereby detecting the survival status of the main process.
[0112] S5. Calculate the time difference between the parsed timestamp and the real-time time point corresponding to the parsed test log, and detect the survival status of the main process managed by WeChat RPA based on the time difference.
[0113] In an embodiment of the present invention, the parsed timestamp is compared with the current time to obtain the time difference between the parsed timestamp and the current time when parsing the test log, that is, the time difference is obtained by subtracting the real time from the parsed timestamp, so that the survival status of the main process can be judged based on the time difference.
[0114] In the embodiment of the present invention, the survival state refers to whether the main process is in a normal running state or an abnormal running state. If the main process is in a normal running state, the main process is alive, otherwise the main process is not alive.
[0115] In the embodiment of the present invention, the detecting the survival status of the main process managed by WeChat RPA according to the time difference includes:
[0116] Determine the survival time threshold of the main process based on preset business requirements;
[0117] When the time difference is within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is normal;
[0118] When the time difference is not within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is abnormal.
[0119] In detail, if the time difference is within 3 minutes, the main process is judged to be normal; otherwise, the bypass process triggers an alarm and restarts the main process. The survival time threshold can be 3 minutes, and the survival time threshold is custom configured. The survival time threshold refers to the time of the safety interval. If the business needs require higher sensitivity and faster speed, the survival time threshold can be custom configured to one second, that is, as long as the message is not sent successfully, it can be discovered at the first time.
[0120] For example, suppose WeChat is the main process A, which includes scanning code to log in, forwarding messages, obtaining friend lists, obtaining group information, and tagging a certain person. Then the main process A must select the interface for establishing interaction with the remote end, and the forwarded message is the interface for establishing interaction with the remote end. After the message is sent successfully, a test log will be printed with a timestamp. The bypass process will compare the current time with the time of the last test log mark to see how long the interval between them is. This interval time is a custom setting and can be set according to business characteristics. For example, suppose the interface selected by the main process A is every two minutes. Run it once, and you will definitely get one message within three minutes, but it cannot be less than two minutes. If it is set to one minute, the message may not be received. Therefore, it must be greater than this time. The time interval cannot be fixed. If it is a fixed time, it is easy to be detected by the outside world, that is, illegal access. Because user access is definitely random, it is called at a random time within two minutes, and then the time point of the most recent special record is detected at three minutes and compared with the current time. Or if no message sending result is obtained within three minutes, it is considered that the main process A of the service is abnormal.
[0121] The embodiment of the present invention sends a test message to the server through the main process regularly through the screened detection interface. The interface is not only used to maintain the login status, but also reflects the key operating status of the main process. The test message sending and log recording of the screened detection interface ensure that the key tasks of the system run in a stable state; if the test message is successfully sent, the main process will print a log in the target format, and the bypass process is responsible for regularly detecting the log file generated by the main process. If the test log is detected and the timestamp in the log is analyzed and compared with the current time, it is considered that the main process is running normally, so that the main process and the bypass process cooperate with each other to monitor the system status in real time. When the main process is not running normally, that is, when the main process is not alive, it is necessary to take restart measures for the main process in time to prevent the system from crashing, and the automatic detection and restart mechanism reduces the need for manual intervention, and improves the automation level and operation efficiency of the system. Therefore, the survival status detection method, device and medium based on WeChat RPA management proposed in the present invention can solve the problem of low survival rate when performing WeChat RPA management detection.
[0122] like Figure 3 As shown, it is a structural diagram of an electronic device for implementing a survival status detection method based on WeChat RPA management provided by one embodiment of the present invention.
[0123] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a survival status detection program based on WeChat RPA management.
[0124] Among them, the processor 10 can be composed of an integrated circuit in some embodiments, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors and various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes the program or module stored in the memory 11 (for example, executing the survival status detection program based on WeChat RPA management, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device and process data.
[0125] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 may be used not only to store application software and various types of data installed in the electronic device, such as the code of the survival status detection program based on WeChat RPA management, but also to temporarily store data that has been output or is to be output.
[0126] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0127] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0128] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0129] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0130] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0131] The survival status detection program based on WeChat RPA management stored in the memory 11 in the electronic device is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0132] Create a bypass process corresponding to the main process managed by WeChat RPA, and select a detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process;
[0133] Calling a detection interface that meets the conditions through the main process within a preset target time range, and using the screened detection interface to send a test message to a preset virtual server;
[0134] When the screened detection interface receives the test success result returned by the virtual server based on the test message, the return time corresponding to the test success result is recorded, and a test log corresponding to the test message in the main process is generated according to the return time;
[0135] Scanning the log file in the main process through the bypass process within a preset target time interval, querying the test log in the scanned log file, and parsing the timestamp in the queried test log;
[0136] The time difference between the parsed timestamp and the real-time time point corresponding to the parsed test log is calculated, and the survival status of the main process managed by WeChat RPA is detected based on the time difference.
[0137] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0138] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0139] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0140] Create a bypass process corresponding to the main process managed by WeChat RPA, and select a detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process;
[0141] Calling the screened detection interface through the main process within a preset target time range, and sending a test message to a preset virtual server using the screened detection interface;
[0142] When the screened detection interface receives the test success result returned by the virtual server based on the test message, the return time corresponding to the test success result is recorded, and a test log corresponding to the test message in the main process is generated according to the return time;
[0143] Scanning the log file in the main process through the bypass process within a preset target time interval, querying the test log in the scanned log file, and parsing the timestamp in the queried test log;
[0144] The time difference between the parsed timestamp and the real-time time point corresponding to the parsed test log is calculated, and the survival status of the main process managed by WeChat RPA is detected based on the time difference.
[0145] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, media and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0146] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0147] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0148] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0149] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is not limited only according to the above description, and it is intended that all changes within the meaning and scope of equivalent elements within the scope of protection are included in the present invention.
[0150] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0151] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A survival status detection method based on WeChat RPA management, characterized in that: The method comprises: Create a bypass process corresponding to the main process managed by WeChat RPA, and select a detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process; Calling the screened detection interface through the main process within a preset target time range, and sending a test message to a preset virtual server using the screened detection interface; When the screened detection interface receives the test success result returned by the virtual server based on the test message, the return time corresponding to the test success result is recorded, and a test log corresponding to the test message in the main process is generated according to the return time; Scanning the log file in the main process through the bypass process within a preset target time interval, querying the test log in the scanned log file, and parsing the timestamp in the queried test log; The time difference between the parsed timestamp and the real-time time point corresponding to the parsed test log is calculated, and the survival status of the main process managed by WeChat RPA is detected based on the time difference.
2. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The screening of the detection interface that meets the conditions according to the preset interface conditions and the functional requirements corresponding to the main process includes: Extracting interface connection conditions, interface real-time conditions, interface security conditions and interface random call conditions from preset interface conditions; Selecting a first interface that meets the interface connection condition in the main process; Selecting a second interface that meets the real-time condition of the interface from the first interface; Screening a third interface that meets the interface security condition from the second interface; According to the functional requirement, a detection interface that meets the random calling condition of the interface is screened in the third interface.
3. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The detection interface screened out by calling the main process within the preset target time range includes: Sending an interface call request of the screened detection interface through the main process; Calling the screened detection interface according to the interface call request, and recording the calling time of calling the screened detection interface; Generate a random time interval within the target time range, and perform time superposition of the call time and the random time interval to obtain the next call time of the screened detection interface; According to the next call time, return to the step of sending the interface call request of the filtered detection interface through the main process until the number of interface call requests of the filtered detection interface reaches a preset request number.
4. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The generating a test log corresponding to the test message in the main process according to the return time includes: Determine a timestamp of successful sending of the test message according to the return time; Generate a target message after the test message is successfully sent through a preset message format; The target message and the timestamp are merged into a test log of the test message in the main process.
5. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The scanning the log file in the main process by the bypass process within the preset target time interval includes: Extracting the target log file scanned by the bypass process according to the storage path of the log file, and recording the target scanning time of the target log file scanned by the bypass process; Counting the next scanning time according to the target scanning time and the preset target time interval; Returning to the step of extracting the target log file scanned by the bypass process according to the storage path of the log file at the next scanning time; The target log files scanned by the aggregation are log files scanned by the bypass process.
6. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The step of querying the test log in the scanned log file includes: Extract all log entries in the scanned log file, and extract keywords in the test log; Comparing the keywords in the test log with all log entries one by one; Counting the log entries having the same keywords as those in the test log among the compared log entries; The log entries with the same keywords are regarded as the queried test logs.
7. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The parsing of the timestamp in the queried test log includes: Extract the time data from the queried test log; Converting the time data into a time data object; The timestamp in the queried test log is parsed according to the time attribute of the time data object.
8. The survival status detection method based on WeChat RPA management as claimed in claim 1 is characterized in that: The detecting the survival status of the main process managed by WeChat RPA according to the time difference includes: Determine the survival time threshold of the main process based on preset business requirements; When the time difference is within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is normal; When the time difference is not within the survival time threshold, it is detected that the survival state of the main process managed by WeChat RPA is abnormal.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the survival status detection method based on WeChat RPA management as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the survival status detection method based on WeChat RPA management as described in any one of claims 1 to 8 is implemented.