CN117412319A - Switching method, device, equipment and storage medium of abnormality detection program - Google Patents

Switching method, device, equipment and storage medium of abnormality detection program Download PDF

Info

Publication number
CN117412319A
CN117412319A CN202311465122.3A CN202311465122A CN117412319A CN 117412319 A CN117412319 A CN 117412319A CN 202311465122 A CN202311465122 A CN 202311465122A CN 117412319 A CN117412319 A CN 117412319A
Authority
CN
China
Prior art keywords
state
program
detection
wireless communication
subprogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311465122.3A
Other languages
Chinese (zh)
Inventor
袁新翼
胡国华
陈云龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Semiconductor Chengdu Co Ltd
Original Assignee
Spreadtrum Semiconductor Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Semiconductor Chengdu Co Ltd filed Critical Spreadtrum Semiconductor Chengdu Co Ltd
Priority to CN202311465122.3A priority Critical patent/CN117412319A/en
Publication of CN117412319A publication Critical patent/CN117412319A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the application provides a switching method, a device, equipment and a storage medium of an abnormality detection program, wherein the method is applied to terminal equipment, the terminal equipment comprises a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, and the method comprises the following steps: determining that the first wireless communication abnormality detection program is in an operating state and the second wireless communication abnormality detection program is in an alternative state, wherein the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity WiFi abnormal events; determining a program state of a first wireless communication abnormality detection program, wherein the program state is a normal state or an abnormal state; when the program state is abnormal, the first wireless communication abnormal detection program is switched to an alternative state, and the second wireless communication abnormal detection program is switched to an operating state, so that the timeliness of the terminal equipment accessing WiFi is improved.

Description

Switching method, device, equipment and storage medium of abnormality detection program
Technical Field
The embodiment of the application relates to the technical fields of wireless communication networks (Wireless Communication Network, WCN) and wireless fidelity (Wireless Fidelity, wiFi), in particular to a switching method, device and equipment of an abnormality detection program and a storage medium.
Background
Currently, a terminal device may Access WiFi of an Access Point (AP).
In the related art, in the process of accessing the terminal device to the WiFi, abnormality detection is generally required to be performed on the WiFi component in the terminal device, so as to ensure that the terminal device is normally accessed to the WiFi. Under the condition that the terminal equipment supports the restarting of the WiFi assembly, if the abnormal state of the WiFi assembly is detected, restarting the WiFi assembly, and guaranteeing the terminal equipment to be accessed to the WiFi.
In the related art, when the state of the WiFi component is abnormal, the WiFi component is restarted, which wastes time, resulting in poor timeliness of accessing the WiFi by the terminal device.
Disclosure of Invention
The embodiment of the application provides a switching method, device and equipment of an abnormality detection program and a storage medium, which are used for improving the timeliness of terminal equipment accessing WiFi.
In a first aspect, an embodiment of the present application provides a method for switching an abnormality detection program, which is applied to a terminal device, where the terminal device includes a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, and the method includes:
determining that the first wireless communication abnormality detection program is in an operation state and the second wireless communication abnormality detection program is in an alternative state, wherein the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity (WiFi) abnormality events;
Determining a program state of the first wireless communication abnormality detection program, wherein the program state is a normal state or an abnormal state;
when the program state is the abnormal state, the first wireless communication abnormality detection program is switched to the alternative state, and the second wireless communication abnormality detection program is switched to the operating state.
In one possible embodiment, the first wireless communication abnormality detection program includes: a first control subroutine, a first drive detection subroutine, and a first firmware detection subroutine;
the second wireless communication abnormality detection program includes: a second control subroutine, a second drive detection subroutine, and a second firmware detection subroutine.
In one possible implementation manner, the determining the program state of the first wireless communication abnormality detection program includes:
acquiring a first sub-state of the first drive detection sub-program and a second sub-state of the first firmware detection sub-program;
when the first sub-state and the second sub-state are respectively in a normal state, determining that the program state is the normal state;
and determining that the program state is the abnormal state when at least one of the first sub-state and the second sub-state is the abnormal state.
In one possible implementation, the acquiring the first sub-state of the first drive detection sub-program and the second sub-state of the first firmware detection sub-program includes:
the first control subprogram sends first detection information to the first drive detection subprogram, receives a first response message sent by the first drive detection subprogram, and determines the first sub-state according to the first response message;
the first control subprogram sends a second detection message to the first firmware detection subprogram, receives a second response message sent by the first firmware detection subprogram, and determines the second sub-state according to the second response message.
In one possible embodiment, the switching the first wireless communication abnormality detection program to the alternative state and the switching the second wireless communication abnormality detection program to the operation state include:
controlling the first firmware detection subroutine to switch to the alternative state, and controlling the second firmware detection subroutine to switch to the running state;
controlling the first drive detection subroutine to switch to the alternative state, and controlling the second drive detection subroutine to switch to the running state;
And controlling the first control subprogram to be switched to the alternative state, and controlling the second control subprogram to be switched to the running state.
In one possible implementation, the controlling the first firmware detection subroutine to switch to the alternative state and the controlling the second firmware detection subroutine to switch to the running state includes:
the first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram according to the first switching instruction;
the first firmware detection subprogram sends a third switching instruction to the second firmware detection subprogram according to the second switching instruction;
the first firmware detection subprogram is switched to the alternative state according to the second switching instruction, and the second firmware detection subprogram is switched to the running state according to the third switching instruction.
In one possible embodiment, controlling the first drive detection subroutine to switch to the alternative state, and controlling the second drive detection subroutine to switch to the operating state, includes:
The first drive detection subprogram receives a first switching response message sent by the first firmware detection subprogram, wherein the first switching response message is used for indicating that the first firmware detection subprogram is successfully switched;
the first drive detection subprogram sends a fourth switching instruction to the second drive detection subprogram according to the first switching response message;
the first drive detection subroutine switches to the alternative state according to the first switching response message, and the second drive detection subroutine switches to the running state according to the fourth switching instruction.
In one possible embodiment, controlling the first control subroutine to switch to the alternative state and controlling the second control subroutine to switch to the operating state includes:
the first control subprogram receives a second switching response message sent by the first drive detection subprogram, wherein the second switching response message is used for indicating that the first drive detection subprogram is successfully switched;
the first control subprogram sends a fifth switching instruction to the second control subprogram according to the second switching response message;
the first control subroutine switches to the alternative state according to the second switching response message, and the second drive detection subroutine switches to the running state according to the fifth switching instruction.
In a second aspect, an embodiment of the present application provides a switching device of an abnormality detection program, which is applied to a terminal device, where the terminal device includes a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, and the device includes:
the first determining module is used for determining that the first wireless communication abnormality detection program is in an operating state and the second wireless communication abnormality detection program is in an alternative state, and the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity WiFi abnormality events;
a second determining module, configured to determine a program state of the first wireless communication abnormality detection program, where the program state is a normal state or an abnormal state;
and the switching module is used for switching the first wireless communication abnormality detection program to the alternative state and switching the second wireless communication abnormality detection program to the running state when the program state is the abnormal state.
In one possible embodiment, the first wireless communication abnormality detection program includes: a first control subroutine, a first drive detection subroutine, and a first firmware detection subroutine;
The second wireless communication abnormality detection program includes: a second control subroutine, a second drive detection subroutine, and a second firmware detection subroutine.
In one possible implementation manner, the second determining module is specifically configured to:
acquiring a first sub-state of the first drive detection sub-program and a second sub-state of the first firmware detection sub-program;
when the first sub-state and the second sub-state are respectively in a normal state, determining that the program state is the normal state;
and determining that the program state is the abnormal state when at least one of the first sub-state and the second sub-state is the abnormal state.
In one possible implementation manner, the second determining module is specifically configured to:
the first control subprogram sends first detection information to the first drive detection subprogram, receives a first response message sent by the first drive detection subprogram, and determines the first sub-state according to the first response message;
the first control subprogram sends a second detection message to the first firmware detection subprogram, receives a second response message sent by the first firmware detection subprogram, and determines the second sub-state according to the second response message.
In one possible implementation manner, the switching module is specifically configured to:
controlling the first firmware detection subroutine to switch to the alternative state, and controlling the second firmware detection subroutine to switch to the running state;
controlling the first drive detection subroutine to switch to the alternative state, and controlling the second drive detection subroutine to switch to the running state;
and controlling the first control subprogram to be switched to the alternative state, and controlling the second control subprogram to be switched to the running state.
In one possible implementation manner, the switching module is specifically configured to:
the first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram according to the first switching instruction;
the first firmware detection subprogram sends a third switching instruction to the second firmware detection subprogram according to the second switching instruction;
the first firmware detection subprogram is switched to the alternative state according to the second switching instruction, and the second firmware detection subprogram is switched to the running state according to the third switching instruction.
In one possible implementation manner, the switching module is specifically configured to:
the first drive detection subprogram receives a first switching response message sent by the first firmware detection subprogram, wherein the first switching response message is used for indicating that the first firmware detection subprogram is successfully switched;
the first drive detection subprogram sends a fourth switching instruction to the second drive detection subprogram according to the first switching response message;
the first drive detection subroutine switches to the alternative state according to the first switching response message, and the second drive detection subroutine switches to the running state according to the fourth switching instruction.
In one possible implementation manner, the switching module is specifically configured to:
the first control subprogram receives a second switching response message sent by the first drive detection subprogram, wherein the second switching response message is used for indicating that the first drive detection subprogram is successfully switched;
the first control subprogram sends a fifth switching instruction to the second control subprogram according to the second switching response message;
the first control subroutine switches to the alternative state according to the second switching response message, and the second drive detection subroutine switches to the running state according to the fifth switching instruction.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory and a processor;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory causes the processor to perform the method of any of the first aspects.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any one of the first aspects when the computer-executable instructions are executed by a processor.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first aspects.
In a sixth aspect, embodiments of the present application provide a chip on which a computer program is stored, which when executed by the chip, implements the method of any one of the first aspects.
In a seventh aspect, embodiments of the present application provide a chip module, where a computer program is stored on the chip module, and when the computer program is executed by the chip module, the method according to any one of the first aspect is implemented.
The embodiment of the application provides a switching method, a device, equipment and a storage medium of an abnormality detection program, wherein the method is applied to terminal equipment, the terminal equipment comprises a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, and the method comprises the following steps: determining that the first wireless communication abnormality detection program is in an operation state and the second wireless communication abnormality detection program is in an alternative state, wherein the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring WiFi abnormality events; determining a program state of the first wireless communication abnormality detection program, wherein the program state is a normal state or an abnormal state; when the program state is the abnormal state, the first wireless communication abnormality detection program is switched to the alternative state, and the second wireless communication abnormality detection program is switched to the operating state. In the method, the terminal equipment comprises the first wireless communication abnormality detection program and the second wireless communication abnormality detection program, when the program state of the first wireless communication abnormality detection program in the running state is the abnormal state, the first wireless communication abnormality detection program is switched to the alternative state, and the second wireless communication abnormality detection program in the alternative state is switched to the running state, so that the second wireless communication abnormality detection program is used for monitoring WiFi abnormal events, the wireless communication abnormality detection program is quickly recovered, a WiFi component or the terminal equipment does not need to be restarted, and the timeliness of the terminal equipment for accessing WiFi is improved.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flow chart of a switching method of an abnormality detection program according to an embodiment of the present disclosure;
FIG. 3 is a second flowchart of a switching method of an abnormality detection procedure according to an embodiment of the present disclosure;
FIG. 4 is a third flow chart of a switching method of an abnormality detection procedure according to the embodiment of the present application;
fig. 5 is a schematic flow chart of instruction and message transmission provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a switching device of an abnormality detection program according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the related art, a wireless communication abnormality detection program of a terminal device is used for abnormality detection of a WiFi component in the terminal device. The WiFi component includes a preset tool (e.g., wpa_supplicant), wiFi drivers, wiFi firmware, and the like. The abnormality detection of the WiFi component in the terminal equipment comprises the following steps: abnormality detection is performed on the WiFi drive and/or WiFi firmware. And detecting abnormality of the WiFi drive and/or the WiFi firmware, wherein the abnormality detection is used for monitoring abnormal events of the WiFi drive and/or the WiFi firmware. The wireless communication abnormality detection program of the terminal equipment comprises an abnormality detection subprogram in a preset tool, an abnormality detection subprogram in a WiFi drive and an abnormality detection subprogram in a WiFi firmware. During the use of WiFi by the terminal device, problems may occur with the abnormality detection subroutine in the WiFi driver and/or the abnormality detection subroutine in the WiFi firmware, resulting in abnormal status of the WiFi component.
In the related art, under the condition that the state of the WiFi component is abnormal, if the terminal device supports restarting the WiFi component, the WiFi component can be restarted through a preset tool and an adaptation layer of a higher layer, so as to recover a wireless communication abnormality detection program, and further ensure that the terminal device is re-accessed to WiFi. However, under the condition that the state of the WiFi component is abnormal, restarting the WiFi component is time-consuming, and the wireless communication abnormality detection program cannot be recovered quickly, so that the timeliness of the terminal device accessing the WiFi is poor. And moreover, the coupling degree among the preset tool, the WiFi drive and the WiFi firmware is high, and the maintenance difficulty is high.
In the related art, in case of abnormal state of the WiFi component, the upper module code may also be modified to restart the WiFi component. For some terminal devices, the upper module code of the terminal device cannot be modified, and the WiFi component cannot be restarted at this time, so that the terminal device cannot be restarted. However, restarting the terminal device is more time-consuming, and the wireless communication abnormality detection program cannot be quickly recovered, resulting in poor timeliness of accessing the terminal device to the WiFi.
In order to quickly recover a wireless communication abnormality detection program and improve the timeliness of the terminal equipment accessing WiFi, the application provides a switching method of the abnormality detection program. In the switching method of the abnormality detection program provided by the application, two wireless communication abnormality detection programs are included in the terminal equipment, when one of the wireless communication abnormality detection programs in the running state fails, the other wireless communication abnormality detection program in the alternative state starts to work, the WiFi assembly or the terminal equipment is prevented from being restarted, the wireless communication abnormality detection programs are quickly recovered, and the timeliness of the terminal equipment for accessing WiFi is improved.
For ease of explanation of understanding the present application, a scenario to which the present application is applied will be first explained with reference to fig. 1.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. As shown in fig. 1, includes: access point and terminal equipment. The terminal equipment comprises a WiFi component. The WiFi assembly comprises a plurality of wireless communication abnormality detection programs. The embodiment of the present application will be described by taking, as an example, a plurality of wireless communication abnormality detection programs including a first wireless communication abnormality detection program and a second wireless communication abnormality detection program.
In the case where the first wireless communication abnormality detection program is in the operation state, the second wireless communication abnormality detection program may be in an alternative state. Or in the case where the second wireless communication abnormality detection program is in the operation state, the first wireless communication abnormality detection program may be in an alternative state.
For example, when the first wireless communication abnormality detection program is in an operating state and the second wireless communication abnormality detection program is in an alternative state, the first wireless communication abnormality detection program may be switched to the alternative state, and the second wireless communication abnormality detection program may be switched to the operating state, so that the wireless communication abnormality detection program is quickly recovered, and the timeliness of the terminal device accessing WiFi may be improved.
Fig. 2 is a flow chart of a switching method of an abnormality detection procedure according to an embodiment of the present application. As shown in fig. 2, the method includes:
s201, determining that a first wireless communication abnormality detection program is in an operation state and a second wireless communication abnormality detection program is in an alternative state, wherein the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity WiFi abnormal events.
Alternatively, the execution body of the embodiment of the present application may be a terminal device, or may be a switching device of an abnormality detection program provided in the terminal device, where the switching device of the abnormality detection program may be implemented by a combination of software and/or hardware.
Optionally, after the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are successfully initialized, the first wireless communication abnormality detection program is determined to be in an operating state, and the second wireless communication abnormality detection program is determined to be in an alternative state. The first wireless communication abnormality detection program and the second wireless communication abnormality detection program may be sequentially initialized. For example, the first radio communication abnormality detection program is initialized, and after the initialization of the first radio communication abnormality detection program is completed, the second radio communication abnormality detection program is initialized.
The first wireless communication abnormality detection program and the second wireless communication abnormality detection program are identical in function and structure and are used for monitoring WiFi abnormal events.
Optionally, monitoring for WiFi abnormal events may include: abnormal disconnection of the link with the access point, wiFi thread stalling, timeout in response to a WiFi command, etc.
Alternatively, in the case where the terminal device is restarted each time or the WiFi component is restarted each time, the first wireless communication abnormality detection program may be determined to be in an operating state, and the second wireless communication abnormality detection program may be determined to be in an alternative state.
S202, determining a program state of a first wireless communication abnormality detection program, wherein the program state is a normal state or an abnormal state.
Optionally, the first wireless communication abnormality detection program includes: the method comprises the steps of presetting a first control subprogram in a tool, a first drive detection subprogram in a WiFi drive and a first firmware detection subprogram in a WiFi firmware.
Alternatively, when the first control subroutine, the first drive detection subroutine, and the first firmware detection subroutine are all in the normal state, it is determined that the program state of the first wireless communication abnormality detection routine is the normal state.
Alternatively, when the program state of any one of the first control subroutine, the first drive detection subroutine, and the first firmware detection subroutine is an abnormal state, the program state of the first wireless communication abnormality detection program is determined to be an abnormal state.
S203, when the program state is the abnormal state, switching the first wireless communication abnormality detection program to the alternative state, and switching the second wireless communication abnormality detection program to the operation state.
Optionally, in the process of using WiFi, the terminal device may further print a log, and record, in the log, state information of the first wireless communication abnormality detection program and state information of the second wireless communication abnormality detection program.
Alternatively, after the second wireless communication abnormality detection program is switched to the operation state, the first wireless communication abnormality detection program in the alternative state may be maintained according to the state information of the first wireless communication abnormality detection program in the log, so that the first wireless communication abnormality detection program can be switched to the operation state again when the program state of the second wireless communication abnormality detection program is the abnormality state.
In the switching method of the abnormality detection program provided in the embodiment of fig. 2, the terminal device includes a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, when the program state of the first wireless communication abnormality detection program in the running state is an abnormal state, the first wireless communication abnormality detection program is switched to an alternative state, and the second wireless communication abnormality detection program in the alternative state is switched to the running state, so that the second wireless communication abnormality detection program is used for monitoring a WiFi abnormal event, the wireless communication abnormality detection program is quickly recovered, a WiFi component or the terminal device does not need to be restarted, the timeliness of accessing WiFi by the terminal device is improved, and further user experience is improved.
In one possible embodiment, the first wireless communication abnormality detection program includes: a first control subroutine, a first drive detection subroutine, and a first firmware detection subroutine;
the second wireless communication abnormality detection program includes: a second control subroutine, a second drive detection subroutine, and a second firmware detection subroutine.
The second wireless communication abnormality detection program is the same as the first wireless communication abnormality detection program.
The first control subroutine and the second control subroutine are located in a predetermined tool. The first control subroutine is identical to the second control subroutine.
The first drive detection subroutine and the second drive detection subroutine are located in a WiFi drive. The first drive detection subroutine is identical to the second drive detection subroutine.
The first firmware detection subroutine and the second firmware detection subroutine are located in the WiFi firmware.
The first firmware detection subroutine is identical to the second firmware detection subroutine.
Unlike the prior art, in the prior art, the coupling degree between the WiFi driver and the WiFi firmware is high, so when the abnormality detection subroutine in the WiFi driver or the abnormality detection subroutine in the WiFi firmware is abnormal, the maintenance difficulty is large, and the independent maintenance can not be performed for the abnormality detection subroutine in the WiFi driver or the abnormality detection subroutine in the WiFi firmware. In the application, the first wireless communication abnormality detection program comprises a first drive detection subprogram and a first firmware detection subprogram, the second wireless communication abnormality detection program comprises a second drive detection subprogram and a second firmware detection subprogram, and when the program state of the first wireless communication abnormality detection program is determined to be an abnormal state, the second wireless communication abnormality detection program is switched to an operating state, so that the abnormality detection subprogram in the WiFi drive or the abnormality detection subprogram in the WiFi firmware is prevented from being independently maintained, and the maintenance difficulty is reduced.
In one possible implementation, S202 includes the following method steps shown in fig. 3. Specifically, please refer to the embodiment of fig. 3.
Fig. 3 is a second flowchart of a switching method of an abnormality detection procedure according to an embodiment of the present application. As shown in fig. 3, the method includes:
s301, a first sub-state of a first driving detection sub-program in the first wireless communication abnormality detection program and a second sub-state of a first firmware detection sub-program in the first wireless communication abnormality detection program are obtained.
Alternatively, S301 may be implemented in the following manner 11 and manner 12.
Mode 11, the first control sub-program sends first detection information to the first drive detection sub-program, receives a first response message sent by the first drive detection sub-program, and determines a first sub-state according to the first response message;
the first control subprogram sends a second detection message to the first firmware detection subprogram, receives a second response message sent by the first firmware detection subprogram, and determines a second sub-state according to the second response message.
The first response message is used for indicating whether the first sub-state is a normal state or not. And when the first response message indicates that the first sub-state is the normal state, determining that the first sub-state is the normal state. And when the first response message indicates that the first sub-state is the abnormal state, determining that the first sub-state is the abnormal state.
The second response message is used for indicating whether the second sub-state is a normal state or not. And when the second response message indicates that the second sub-state is the normal state, determining that the second sub-state is the normal state. And when the second response message indicates that the second sub-state is the abnormal state, determining that the second sub-state is the abnormal state.
Mode 12, the first control subroutine transmitting first probe information to the first drive detection subroutine;
the first drive detection subprogram forwards the first detection information to the first firmware detection subprogram;
the first drive detection subprogram receives third response information sent by the first firmware detection subprogram;
the first drive detection subprogram sends fourth response information to the first control subprogram according to the third response information;
the first control sub-program determines a first sub-state of the first drive detection sub-program and a second sub-state of the first firmware detection sub-program according to the fourth response information.
Optionally, the third response information includes a first identifier, where the first identifier is used to indicate whether the second sub-state of the first firmware detection subroutine is a normal state. For example, the first flag is 1 for indicating that the second sub-state is a normal state, and the first flag is 0 for indicating that the second sub-state is an abnormal state.
Optionally, the fourth response information includes a first identifier and/or a second identifier, where the second identifier is used to indicate whether the first sub-state of the first drive detection subroutine is a normal state. For example, the second flag is 1 for indicating that the first sub-state is a normal state, and the second flag is 0 for indicating that the first sub-state is an abnormal state.
Optionally, the first control sub-program determines a first sub-state of the first drive detection sub-program and a second sub-state of the first firmware detection sub-program according to the fourth response information, including:
when the first identifier in the fourth response information indicates that the second sub-state is a normal state, the second sub-state is determined to be the normal state;
when the first identifier in the fourth response information indicates that the second sub-state is an abnormal state, determining that the second sub-state is an abnormal state;
when the second identifier in the fourth response information indicates that the first sub-state is a normal state, the first sub-state is determined to be the normal state;
and when the second identifier in the fourth response information indicates that the first sub-state is the abnormal state, determining that the first sub-state is the abnormal state.
S302, when the first sub-state and the second sub-state are respectively in a normal state, determining that the program state of the first wireless communication abnormality detection program is in a normal state.
S303, when at least one of the first sub-state and the second sub-state is an abnormal state, determining that the program state of the first wireless communication abnormality detection program is an abnormal state.
In one possible implementation, S203 includes the following method steps shown in fig. 4, specifically, please refer to the example of fig. 4.
FIG. 4 is a third flow chart of a switching method of an abnormality detection procedure according to an embodiment of the present disclosure. As shown in fig. 4, the method includes:
s401, controlling the first firmware detection subprogram to be switched to an alternative state, and controlling the second firmware detection subprogram to be switched to an operation state.
In one possible implementation, S401 may include: the first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram according to the first switching instruction;
the first firmware detection subprogram sends a third switching instruction to the second firmware detection subprogram according to the second switching instruction;
the first firmware detection subroutine is switched to an alternative state according to the second switching instruction, and the second firmware detection subroutine is switched to an operating state according to the third switching instruction.
It should be noted that, the present application exemplarily provides a specific manner of implementing the switching of the first firmware detection subroutine to the alternative state and controlling the switching of the second firmware detection subroutine to the running state. In practical applications, any specific mode for implementing the switching of the first firmware detection subroutine to the alternative state and controlling the switching of the second firmware detection subroutine to the running state is within the scope of protection of the present application.
S402, controlling the first drive detection subroutine to switch to an alternative state, and controlling the second drive detection subroutine to switch to an operating state.
In one possible implementation, S402 includes: the first drive detection subprogram receives a first switching response message sent by the first firmware detection subprogram, wherein the first switching response message is used for indicating that the first firmware detection subprogram is successfully switched;
the first drive detection subprogram sends a fourth switching instruction to the second drive detection subprogram according to the first switching response message;
the first drive detection subroutine is switched to an alternative state according to the first switching response message, and the second drive detection subroutine is switched to an operating state according to the fourth switching instruction.
It should be noted that, the present application exemplarily provides a specific manner of implementing the switching of the first driving detection subroutine to the alternative state and controlling the switching of the second driving detection subroutine to the operation state. In practical applications, any specific mode for implementing the switching of the first driving detection subroutine to the alternative state and controlling the switching of the second driving detection subroutine to the running state is within the scope of protection of the present application.
S403, controlling the first control subprogram to be switched to the alternative state and controlling the second control subprogram to be switched to the running state.
In one possible implementation, S403 includes: the first control subprogram receives a second switching response message sent by the first drive detection subprogram, wherein the second switching response message is used for indicating that the first drive detection subprogram is successfully switched;
the first control subprogram sends a fifth switching instruction to the second control subprogram according to the second switching response message;
the first control subroutine is switched to the alternative state according to the second switching response message, and the second drive detection subroutine is switched to the operating state according to the fifth switching instruction.
It should be noted that, the present application exemplarily provides a specific manner of implementing the switching of the first control subroutine to the alternative state and controlling the switching of the second control subroutine to the operation state. In practical applications, any specific mode for implementing the switching of the first control subroutine to the alternative state and controlling the switching of the second control subroutine to the running state is within the scope of protection of the present application.
Fig. 5 is a schematic flow chart of instruction and message transmission provided in an embodiment of the present application. As shown in fig. 5, includes:
The first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram;
the first firmware detection subprogram is switched into an alternative state according to the second switching instruction, and a third switching instruction is sent to the second firmware detection subprogram;
the second firmware detection subprogram is switched into an operation state according to a third switching instruction;
the first firmware detection subprogram sending a first switching response message to the first drive detection subprogram;
the first drive detection subprogram is switched into an alternative state according to the first switching response message, and a fourth switching instruction is sent to the second drive detection subprogram;
the second drive detection subprogram is switched into an operation state according to a fourth switching instruction;
the first drive detection subprogram sending a second switch response message to the first control subprogram;
the first control subprogram is switched to an alternative state according to the second switching response message, and a fifth switching instruction is sent to the second control subprogram according to the second switching response message;
the second drive detection subroutine is switched to an operating state according to the fifth switching instruction.
Fig. 6 is a schematic structural diagram of a switching device of an abnormality detection program according to an embodiment of the present application. The switching device of the abnormality detection program is applied to the terminal equipment, and the terminal equipment comprises a first wireless communication abnormality detection program and a second wireless communication abnormality detection program. As shown in fig. 6, the switching device 10 of the abnormality detection program includes:
A first determining module 101, configured to determine that a first wireless communication anomaly detection program is in an operating state, and a second wireless communication anomaly detection program is in an alternative state, where the first wireless communication anomaly detection program and the second wireless communication anomaly detection program are used to monitor a WiFi anomaly event;
a second determining module 102, configured to determine a program state of the first wireless communication anomaly detection program, where the program state is a normal state or an anomaly state;
a switching module 103, configured to switch the first wireless communication abnormality detection program to an alternative state and switch the second wireless communication abnormality detection program to an operating state when the program state is an abnormal state.
The switching device for the abnormality detection program provided in the embodiment of the present application may execute the technical solution shown in the foregoing method embodiment, and its implementation principle and beneficial effects are similar, and will not be described herein again.
In one possible embodiment, the first wireless communication abnormality detection program includes: a first control subroutine, a first drive detection subroutine, and a first firmware detection subroutine;
the second wireless communication abnormality detection program includes: a second control subroutine, a second drive detection subroutine, and a second firmware detection subroutine;
The preset tool, the WiFi driver and the WiFi firmware are located in the terminal equipment.
In one possible implementation, the second determining module 102 is specifically configured to:
acquiring a first sub-state of a first drive detection sub-program and a second sub-state of a first firmware detection sub-program;
when the first sub-state and the second sub-state are respectively in a normal state, determining that the program state is in the normal state;
and determining that the program state is an abnormal state when at least one of the first sub-state and the second sub-state is the abnormal state.
In one possible implementation, the second determining module 102 is specifically configured to:
the first control subprogram sends first detection information to the first drive detection subprogram, receives a first response message sent by the first drive detection subprogram, and determines a first sub-state according to the first response message;
the first control subprogram sends a second detection message to the first firmware detection subprogram, receives a second response message sent by the first firmware detection subprogram, and determines a second sub-state according to the second response message.
In one possible implementation, the switching module 103 is specifically configured to:
controlling the first firmware detection subprogram to be switched to an alternative state, and controlling the second firmware detection subprogram to be switched to an operating state;
Controlling the first drive detection subroutine to switch to an alternative state, and controlling the second drive detection subroutine to switch to an operating state;
the first control subroutine is controlled to switch to an alternative state and the second control subroutine is controlled to switch to an operating state.
In one possible implementation, the switching module 103 is specifically configured to:
the first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram according to the first switching instruction;
the first firmware detection subprogram sends a third switching instruction to the second firmware detection subprogram according to the second switching instruction;
the first firmware detection subroutine is switched to an alternative state according to the second switching instruction, and the second firmware detection subroutine is switched to an operating state according to the third switching instruction.
In one possible implementation, the switching module 103 is specifically configured to:
the first drive detection subprogram receives a first switching response message sent by the first firmware detection subprogram, wherein the first switching response message is used for indicating that the first firmware detection subprogram is successfully switched;
the first drive detection subprogram sends a fourth switching instruction to the second drive detection subprogram according to the first switching response message;
The first drive detection subroutine is switched to an alternative state according to the first switching response message, and the second drive detection subroutine is switched to an operating state according to the fourth switching instruction.
In one possible implementation, the switching module 103 is specifically configured to:
the first control subprogram receives a second switching response message sent by the first drive detection subprogram, wherein the second switching response message is used for indicating that the first drive detection subprogram is successfully switched;
the first control subprogram sends a fifth switching instruction to the second control subprogram according to the second switching response message;
the first control subroutine is switched to the alternative state according to the second switching response message, and the second drive detection subroutine is switched to the operating state according to the fifth switching instruction.
The switching device for the abnormality detection program provided in the embodiment of the present application may execute the technical solution shown in the foregoing method embodiment, and its implementation principle and beneficial effects are similar, and will not be described herein again.
Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 7, the terminal device 20 may include a processor 201 and a memory 202. The processor 201 and the memory 202 are illustratively interconnected by a bus 203.
Memory 202 stores computer-executable instructions.
Processor 201 executes computer-executable instructions stored in memory 202, causing processor 201 to perform the methods as described in the method embodiments above.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape, floppy disk, optical disk (optical disc), and any combination thereof.
The present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the method of the above-described method embodiments when the computer-executable instructions are executed by a processor.
Embodiments of the present application also provide a computer program product, which includes a computer program, where the computer program can implement the method shown in the above-mentioned method embodiments when executed by a processor.
The embodiment of the application also provides a chip, and a computer program is stored on the chip, and when the computer program is executed by the chip, the method shown in the embodiment of the method is realized.
The embodiment of the application also provides a chip module, and the chip module stores a computer program, and when the computer program is executed by the chip module, the method shown in the embodiment of the method is realized.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to encompass such modifications and variations.
In the present application, the term "include" and variations thereof may refer to non-limiting inclusion; the term "or" and variations thereof may refer to "and/or". The terms "first," "second," and the like in this application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. In the present application, "plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.

Claims (12)

1. A switching method of an abnormality detection program, characterized by being applied to a terminal device including a first wireless communication abnormality detection program and a second wireless communication abnormality detection program, the method comprising:
determining that the first wireless communication abnormality detection program is in an operation state and the second wireless communication abnormality detection program is in an alternative state, wherein the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity (WiFi) abnormality events;
Determining a program state of the first wireless communication abnormality detection program, wherein the program state is a normal state or an abnormal state;
when the program state is the abnormal state, the first wireless communication abnormality detection program is switched to the alternative state, and the second wireless communication abnormality detection program is switched to the operating state.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the first wireless communication abnormality detection program includes: a first control subroutine, a first drive detection subroutine, and a first firmware detection subroutine;
the second wireless communication abnormality detection program includes: a second control subroutine, a second drive detection subroutine, and a second firmware detection subroutine.
3. The method of claim 2, wherein the determining the program state of the first wireless communication abnormality detection program comprises:
acquiring a first sub-state of the first drive detection sub-program and a second sub-state of the first firmware detection sub-program;
when the first sub-state and the second sub-state are respectively in a normal state, determining that the program state is the normal state;
And determining that the program state is the abnormal state when at least one of the first sub-state and the second sub-state is the abnormal state.
4. A method according to claim 3, wherein said obtaining a first sub-state of said first drive detection subroutine and a second sub-state of said first firmware detection subroutine comprises:
the first control subprogram sends first detection information to the first drive detection subprogram, receives a first response message sent by the first drive detection subprogram, and determines the first sub-state according to the first response message;
the first control subprogram sends a second detection message to the first firmware detection subprogram, receives a second response message sent by the first firmware detection subprogram, and determines the second sub-state according to the second response message.
5. The method according to any one of claims 2 to 4, wherein switching the first wireless communication abnormality detection program to the alternative state and switching the second wireless communication abnormality detection program to the operating state includes:
controlling the first firmware detection subroutine to switch to the alternative state, and controlling the second firmware detection subroutine to switch to the running state;
Controlling the first drive detection subroutine to switch to the alternative state, and controlling the second drive detection subroutine to switch to the running state;
and controlling the first control subprogram to be switched to the alternative state, and controlling the second control subprogram to be switched to the running state.
6. The method of claim 5, wherein controlling the first firmware detection subroutine to switch to the alternative state and controlling the second firmware detection subroutine to switch to the run state comprises:
the first control subprogram sending a first switching instruction to the first drive detection subprogram;
the first drive detection subprogram sends a second switching instruction to the first firmware detection subprogram according to the first switching instruction;
the first firmware detection subprogram sends a third switching instruction to the second firmware detection subprogram according to the second switching instruction;
the first firmware detection subprogram is switched to the alternative state according to the second switching instruction, and the second firmware detection subprogram is switched to the running state according to the third switching instruction.
7. The method of claim 5 or 6, wherein controlling the first drive detection subroutine to switch to the alternative state and controlling the second drive detection subroutine to switch to the run state comprises:
the first drive detection subprogram receives a first switching response message sent by the first firmware detection subprogram, wherein the first switching response message is used for indicating that the first firmware detection subprogram is successfully switched;
the first drive detection subprogram sends a fourth switching instruction to the second drive detection subprogram according to the first switching response message;
the first drive detection subroutine switches to the alternative state according to the first switching response message, and the second drive detection subroutine switches to the running state according to the fourth switching instruction.
8. The method of any of claims 5-7, wherein controlling the first control subroutine to switch to the alternative state and controlling the second control subroutine to switch to the run state comprises:
the first control subprogram receives a second switching response message sent by the first drive detection subprogram, wherein the second switching response message is used for indicating that the first drive detection subprogram is successfully switched;
The first control subprogram sends a fifth switching instruction to the second control subprogram according to the second switching response message;
the first control subroutine switches to the alternative state according to the second switching response message, and the second drive detection subroutine switches to the running state according to the fifth switching instruction.
9. A switching apparatus of an abnormality detection program, characterized by being applied to a terminal device including a first wireless communication abnormality detection program and a second wireless communication abnormality detection program therein, the apparatus comprising:
the first determining module is used for determining that the first wireless communication abnormality detection program is in an operating state and the second wireless communication abnormality detection program is in an alternative state, and the first wireless communication abnormality detection program and the second wireless communication abnormality detection program are used for monitoring wireless fidelity WiFi abnormality events;
a second determining module, configured to determine a program state of the first wireless communication abnormality detection program, where the program state is a normal state or an abnormal state;
and the switching module is used for switching the first wireless communication abnormality detection program to the alternative state and switching the second wireless communication abnormality detection program to the running state when the program state is the abnormal state.
10. A terminal device, comprising: a memory and a processor;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored therein computer executable instructions for implementing the method of any of claims 1 to 8 when the computer executable instructions are executed by a processor.
12. A computer program product, comprising: a computer program; the computer program implementing the method of any of claims 1 to 8 when executed by a processor.
CN202311465122.3A 2023-11-06 2023-11-06 Switching method, device, equipment and storage medium of abnormality detection program Pending CN117412319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311465122.3A CN117412319A (en) 2023-11-06 2023-11-06 Switching method, device, equipment and storage medium of abnormality detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311465122.3A CN117412319A (en) 2023-11-06 2023-11-06 Switching method, device, equipment and storage medium of abnormality detection program

Publications (1)

Publication Number Publication Date
CN117412319A true CN117412319A (en) 2024-01-16

Family

ID=89494245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311465122.3A Pending CN117412319A (en) 2023-11-06 2023-11-06 Switching method, device, equipment and storage medium of abnormality detection program

Country Status (1)

Country Link
CN (1) CN117412319A (en)

Similar Documents

Publication Publication Date Title
EP4049910A1 (en) Automatic driving control system, control method and device
CN102708018B (en) Method and system for exception handling, proxy equipment and control device
CN108430116B (en) Disconnected network reconnection method, medium, device and computing equipment
EP2330507A1 (en) Firmware update device and method
JP5494298B2 (en) Computer apparatus, failure recovery control program, and failure recovery control method
US20220036670A1 (en) Vehicle mounted update apparatus, update processing program, and program update method
CN111745650B (en) Operation method of robot operation system and control method of robot
CN112092824A (en) Automatic driving control method, system, equipment and storage medium
CN111913851A (en) Process monitoring method, system, terminal and storage medium
US20120047292A1 (en) Monitoring System, Device Server, Host Computer, Monitoring Method, and Storage Medium
CN104503861A (en) Abnormality handling method and system, agency device and control device
KR102019158B1 (en) Method and apparatus for controlling cloud virtual base station
CN108536545B (en) Information processing method and device for terminal equipment
CN117412319A (en) Switching method, device, equipment and storage medium of abnormality detection program
CN109286583B (en) Method, device, equipment and storage medium for managing network ports of controller
KR20160025028A (en) Information processing method and device thereof and communication system
CN112994988B (en) Heartbeat detection method among multiple operating systems and vehicle-mounted computer system
CN106951276B (en) Multi-controller software upgrading and address conflict detection method and device
US20220179680A1 (en) Application state control method apparatus, and terminal and computer-readable storage medium
US11954509B2 (en) Service continuation system and service continuation method between active and standby virtual servers
JP2009282601A (en) Operation monitoring program, monitoring system, and monitoring method
CN105335661A (en) USB device monitoring method and device based on USB interface granularity
JP3225999B2 (en) Switchback method and method based on system version
CN114095361B (en) Equipment convergence maintenance method, device and network system
EP4354944A1 (en) Information processing method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination