CN111918318A - Data processing method and related equipment - Google Patents

Data processing method and related equipment Download PDF

Info

Publication number
CN111918318A
CN111918318A CN202010752314.2A CN202010752314A CN111918318A CN 111918318 A CN111918318 A CN 111918318A CN 202010752314 A CN202010752314 A CN 202010752314A CN 111918318 A CN111918318 A CN 111918318A
Authority
CN
China
Prior art keywords
mcu
command
communication component
communication
response
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.)
Granted
Application number
CN202010752314.2A
Other languages
Chinese (zh)
Other versions
CN111918318B (en
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202010752314.2A priority Critical patent/CN111918318B/en
Publication of CN111918318A publication Critical patent/CN111918318A/en
Application granted granted Critical
Publication of CN111918318B publication Critical patent/CN111918318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]

Abstract

The embodiment of the application discloses a data processing method and related equipment thereof, which are used for controlling the running conditions of an MCU and a communication assembly mutually. The method in the embodiment of the application comprises the following steps: the single-chip microcomputer MCU sends a first command to the communication component at fixed time; the MCU receives a first response sent by the communication component based on the first command; the MCU judges whether the communication assembly normally operates according to the first response; and if not, the MCU restarts the communication assembly. The MCU receives a second command sent by the communication component at fixed time; and the MCU sends a second response to the communication assembly based on the second command, wherein the second response is a basis for judging whether the MCU is restarted or not by the communication module according to the second response to acquire the running state of the MCU.

Description

Data processing method and related equipment
Technical Field
The embodiment of the application relates to the field of control, in particular to a data processing method and related equipment.
Background
A single chip Microcomputer (MCU) and a communication module are two different modules, each responsible for different operations. In the prior art, a watchdog (a monitoring program) is independently installed in an MCU and a communication component, and if the MCU or the communication component is out of function, the watchdog independently controls the installed object. For example, if the watchdog is installed in the MCU, the watchdog controls the MCU, wherein the watchdog controls the MCU according to a principle of continuously monitoring the operating state of the MCU, and when the MCU is monitored to be in an abnormal operating state, the watchdog resets the MCU, so that the MCU returns to a normal operating state. The communication components are similar as well.
At present, the trend of cooperative work of the MCU and the communication component is increasingly strengthened, and in the case of functional disorder, the MCU and the communication component can recover normal operation through the watchdog, but in the process from the occurrence of the functional disorder to the recovery of the functional disorder, the MCU and the communication component are independent from each other, and the cooperative work of the MCU and the communication component is affected.
Disclosure of Invention
The embodiment of the application provides a data processing method and related equipment thereof, which are used for controlling the running conditions of an MCU and a communication assembly mutually.
In a first aspect of the embodiments of the present application, a data processing method is provided, including:
the single-chip microcomputer MCU sends a first command to the communication component at fixed time;
the MCU receives a first response sent by the communication component based on the first command;
the MCU judges whether the communication assembly normally operates according to the first response;
if not, the MCU restarts the communication assembly;
the MCU receives a second command sent by the communication component at fixed time;
and the MCU sends a second response to the communication assembly based on the second command, and the second response is used for the communication module to determine the running state of the MCU according to the second response and judge whether to restart the MCU according to the running state of the MCU.
With reference to the first aspect, a first implementation manner of the first aspect of the embodiments of the present application includes:
the MCU comprises N first functional modules, the communication assembly comprises N second functional modules, the first functional modules correspond to the second functional modules one by one, and N is an integer and is at least 1;
and the MCU triggers the N first functional modules to respectively send the first commands to the corresponding second functional modules at fixed time.
With reference to the first implementation manner of the first aspect, a second implementation manner of the first aspect of the embodiments of the present application includes:
the MCU determines a target first functional module corresponding to a target second functional module which sends the second command, wherein the target first functional module is any one or more than one of the N first functional modules;
and the MCU triggers the target first functional module to send the second response to the target second functional module.
With reference to the first implementation manner of the first aspect or the second implementation manner of the first aspect, a third implementation manner of the first aspect of the examples of the present application includes:
and the MCU judges whether the first functional module receives the first response within a preset time period after the first command is sent, wherein the judgment result is used for indicating that the communication assembly operates normally, and the judgment result is used for indicating that the communication assembly operates abnormally.
With reference to the third implementation manner of the first aspect, the fourth implementation manner of the first aspect of the examples of this application includes:
the time intervals of the first commands sent by the first functional modules are the same or different, and the corresponding preset time periods of the first functional modules are the same or different.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, or the fourth implementation manner of the first aspect, a fifth implementation manner of the first aspect includes:
the MCU controls the power supply of the communication assembly;
the MCU disconnects the power supply of the communication assembly;
the MCU activates the communication component.
In addition, in a second aspect of the embodiments of the present application, there is provided a data processing method, including:
the communication component sends a first command to the MCU at regular time;
the communication component receives a first response sent by the MCU based on the first command;
the communication component judges whether the MCU normally operates according to the first response;
if not, the communication component restarts the MCU;
the communication component receives a second command sent by the MCU at fixed time;
and the communication component sends a second response to the MCU based on the second command, wherein the second response is used for the MCU to determine the operation state of the communication component according to the second response and judge whether to restart the communication component according to the operation state of the communication component.
With reference to the second aspect, a first implementation manner of the second aspect of the embodiments of the present application includes:
the communication assembly comprises N first functional modules, the MCU comprises N second functional modules, the first functional modules correspond to the second functional modules one by one, and N is an integer and is at least 1;
and the communication component triggers each of the N first functional modules to send the first command to the corresponding second functional module at fixed time.
With reference to the first implementation manner of the second aspect, the second implementation manner of the second aspect of the embodiments of the present application includes:
the communication assembly determines a target first functional module corresponding to a target second functional module which sends the second command, wherein the target first functional module is any one or more of the N first functional modules;
the communication component triggers the target first functional module to send the second reply to the target second functional module.
With reference to the first implementation manner of the second aspect or the second implementation manner of the second aspect, a third implementation manner of the second aspect of the embodiments of the present application includes:
and the communication assembly judges whether the first functional module receives the first response within a preset time period after the first command is sent, wherein the judgment result is used for indicating that the communication assembly operates normally, and the judgment result is used for indicating that the communication assembly operates abnormally.
In combination with the third embodiment of the second aspect, the fourth embodiment of the second aspect of the examples herein includes
The time intervals of the first commands sent by the first functional modules are the same or different, and the corresponding preset time periods of the first functional modules are the same or different.
With reference to the second aspect, the first embodiment of the second aspect, the second embodiment of the second aspect, the third embodiment of the second aspect, or the fourth embodiment of the second aspect, a fifth embodiment of the second aspect of the examples of the present application includes:
the communication component controls the power supply of the MCU;
the communication component cuts off the power supply of the MCU;
the communication component starts the MCU.
Further, a third aspect of the embodiments of the present application provides a one-chip microcomputer including:
the first sending unit is used for sending a first command to the communication component in a timing mode;
a first receiving unit, configured to receive a first response sent by the communication component based on the first command;
the judging unit is used for judging whether the communication assembly operates normally according to the first response;
the restarting unit is used for restarting the communication assembly when the communication assembly operates abnormally;
the second receiving unit is used for receiving a second command sent by the communication component in a timing mode;
and the second sending unit is used for sending a second response to the communication component based on the second command, wherein the second response is used for the communication module to determine the running state of the MCU according to the second response and judge whether to restart the MCU according to the running state of the MCU.
Furthermore, an implementation manner of a fourth aspect of an embodiment of the present application provides a communication assembly, including:
the first sending unit is used for sending a first command to the MCU at fixed time;
a first receiving unit, configured to receive a first response sent by the MCU based on the first command;
the judging unit is used for judging whether the MCU normally operates according to the first response;
the restarting unit is used for restarting the MCU when the MCU abnormally operates;
the second receiving unit is used for receiving a second command sent by the MCU at regular time;
and the second sending unit is used for sending a second response to the MCU based on the second command, wherein the second response is used for the MCU to determine the running state of the communication assembly according to the second response and judge whether to restart the communication assembly according to the running state of the communication assembly.
Furthermore, an embodiment of a fifth aspect of the embodiments of the present application provides a computer-readable storage medium, in which a program is stored, and when the program is executed by a computer, the method of any one of the first to second aspects is performed.
Furthermore, an embodiment of a sixth aspect of the embodiments of the present application provides a computer program product, when the computer program product is executed on a computer, the computer executes the method of any one of the first to second aspects.
Further, an implementation manner of a seventh aspect of an embodiment of the present application provides a one-chip microcomputer device including:
a processor, a memory, an input-output device and a bus thereof;
the processor, the memory and the input and output equipment are connected with the bus;
the processor is configured to perform the method of any of the preceding first aspects.
Furthermore, an implementation manner of an eighth aspect of an embodiment of the present application provides a communication component device including:
a processor, a memory, an input-output device and a bus thereof;
the processor, the memory and the input and output equipment are connected with the bus;
the processor is configured to perform the method of any of the preceding second aspects.
Furthermore, in a ninth aspect of embodiments of the present application, there is provided an electronic device, including an MCU that performs the method of any one of the foregoing first aspects and a communication component that performs the method of any one of the foregoing second aspects.
In the embodiment of the application, after the MCU sends the first command to the communication component at regular time and receives the first response of the communication component to the command, the MCU has the capability of monitoring the communication component in a request manner. And finally, restarting the communication assembly under the condition that the communication assembly is abnormal, which indicates that the MCU has the capability of controlling the operation condition of the communication assembly, particularly the abnormal operation condition of the communication assembly. And then, the MCU receives a second command sent by the communication component at regular time and feeds back a second response of the command, wherein the second response is used for the communication component to judge whether the MCU is restarted or not, and the second response shows that the opposite-end communication component of the MCU also has the capability of monitoring and managing the MCU. To sum up, MCU not only knows the information of opposite terminal communication subassembly running state, has the ability of control and management and control opposite terminal communication subassembly running state moreover, still feeds back self running state to opposite terminal communication subassembly simultaneously, has avoidd the condition that MCU does not know communication subassembly running state information among the prior art.
Drawings
FIG. 1 is a block diagram of a data processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method in an embodiment of the present application;
FIG. 3 is another flow chart of a data processing method in an embodiment of the present application;
FIG. 4 is another flow chart of a data processing method in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a one-chip microcomputer according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a communication component in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data processing method and related equipment thereof, which are used for controlling the running state of an MCU and a communication assembly mutually.
Referring to fig. 1, a block diagram of a data processing method in the embodiment of the present application includes:
an electronic device comprising an MCU and a communication component.
The MCU properly reduces the frequency and specification of the central processing unit, and integrates peripheral interfaces such as a memory, a counter, a USB, A/D conversion, a UART, a PLC, a DMA and the like, even an LCD driving circuit and the like on a single chip to form a chip-level computer, and different combination control is carried out for different application occasions.
The communication component is a hardware structure for realizing the communication function, can comprise circuit structures such as a communication interface and the like, and is used for supporting GPRS and short message double-channel data transmission.
The communication component and the MCU learn the operating state of the other party by sending commands to each other, and both parties can restart the system of the other party based on the specific operating state of the other party.
Based on the above-mentioned frame diagram, a data processing method in the embodiment of the present application is described below.
It should be clear that, in the cooperative work of the MCU and the communication component in the electronic device, the running state information of the other party needs to be continuously known, so as to provide the current running state information of the other party for the other party and the other party to deal with possible emergency situations in the later period. Based on this, the embodiment of the present application establishes an information interworking mechanism for monitoring the operating states of the other parties with each other and controlling the other party with a poor operating state, please refer to fig. 2, which includes:
201. the MCU sends commands at regular time.
The functional module of the MCU sends a command to the communication assembly at regular time, and the MCU needs to request the communication assembly for the running state information of the communication assembly in order to acquire the running state of the communication assembly. The timing is the interval that the MCU can set the transmission time according to the actual requirement, and the functional module of the MCU continuously transmits one command after another to the communication assembly in the preset time.
It should be noted that the MCU includes N functional blocks, where N is at least 1 and is an integer. The N functional modules of the MCU may send commands simultaneously, or may send commands independently, and the commands are set according to actual requirements, which is not limited herein. Similarly, the sending time intervals of the two modes can be the same or different, and are set according to actual requirements, and are not limited herein.
It should be noted and emphasized that the subsequent steps 202, 203, 204, 205 are only one command for timing transmission of commands to one functional module in the MCU to illustrate the operation content related thereto, and therefore, each command generated by timing transmission of commands to each functional module of the MCU has the same operation content as the subsequent steps 202, 203, 204, 205.
202. The communication component receives the command.
And after the MCU sends out a command regularly, the communication component receives the command.
203. The communication component sends the reply.
It should be noted and noted that the communication assembly also includes N functional modules, where N is at least 1 and is an integer, the total number of the functional modules of the communication assembly is the same as the total number of the functional modules of the MCU, and each functional module of the communication assembly and the functional module of the MCU have an adjustable preset relationship in a one-to-one correspondence.
After the communication component receives the command of step 202, the communication component determines, from the N functional modules of the communication component itself, a corresponding functional module to which the MCU has issued the command, and the functional module issues a response corresponding to the command.
It is to be noted that for each command received by the communication component, the communication component feeds back an answer.
204. The MCU receives the acknowledgement.
The MCU receives the acknowledgement from the communication component.
205. The MCU judges whether to restart the communication assembly.
After the MCU receives the response from the communication assembly, the MCU judges whether the response is received within a preset specified time, if so, the MCU judges that the operation state of the communication assembly is normal, and the MCU does not restart the communication assembly; if not, the MCU judges that the running state of the communication assembly is abnormal, and the MCU restarts the communication assembly.
And the preset time length which is set and adjustable for the MCU and the communication assembly according to the actual situation is set in the set time length.
The specified time length of each pair of functional modules in the MCU and the communication assembly can be the same or different according to the condition that the number of the respective functional modules of the MCU and the communication assembly is more than 1, and is preset according to actual requirements, and the specific time length is not limited here.
The specific process of restarting the communication assembly by the MCU is that the MCU firstly controls the power supply of the communication assembly, then the MCU disconnects the power supply of the communication assembly, and finally the MCU starts the communication assembly.
It should be noted and reiterated that in steps 201 to 205, steps 202, 203, 204 and 205 are triggered by a sequential association of a command in step 201, and each command generated by sending a command periodically to step 201 corresponds to the action of generating steps 202, 203, 204 and 205.
In the above steps 201 to 205, the MCU continuously sends commands to the communication components, the communication components must feed back responses to each command to the MCU, and the MCU obtains the operating status information of the communication components by determining the received responses, so that the MCU has a function of monitoring the communication components. And when the MCU learns that the communication assembly is in the abnormal operation state through judgment, the communication assembly is restarted, so that the MCU has the capacity of controlling the communication assembly.
206. The communication component sends commands in a timed manner.
This step is similar to step 201 and will not be described herein again.
207. The MCU receives the command.
This step is similar to step 202 and will not be described herein.
208. The MCU sends a reply.
This step is similar to step 203 and will not be described herein.
209. The communication component receives the reply.
This step is similar to step 204 and will not be described here.
210. The communication component judges whether to restart the MCU.
This step is similar to step 205 and will not be described herein again.
Similarly, in the above steps 206 to 210, the communication component continuously sends commands to the MCU, the MCU sends a response to each command to the communication component, and the communication component obtains the running state information of the MCU by determining the received response, so that the communication component has a function of monitoring the MCU. And moreover, the communication assembly restarts the MCU when knowing that the MCU is in an abnormal operation state through judgment, so that the communication assembly has the capability of controlling the MCU.
It should be noted that the execution sequence of steps 201 to 210 is not fixed after the execution sequence meets the necessary time logic, for example, the execution sequence of steps 201 to 205 may be after steps 206 to 210, steps 201 to 210 may also be executed synchronously with steps 206 to 210, steps 201 to 205 may also be executed alternately with each of steps 206 to 210, and the specific details are not limited herein.
Further, in an actual process, although the number of the functional modules of the MCU and the communication module in the electronic device is the same, the number of the functional modules may change according to actual requirements, which is described below:
the number of functional modules of the MCU and the communication assembly is respectively 1:
in this embodiment, an MCU in an electronic device is used as a description object for explanation, and peer communication components in the electronic device have similar operation contents. Wherein, both sides of MCU and communication subassembly have a functional module respectively, correspond to each other. In addition, in this embodiment, the MCU first determines whether the communication module operates normally, and then determines whether the MCU operates normally, referring to fig. 3, including:
301. the MCU sends a first command to the communication component in a timing mode.
In order to obtain the operating state information of the communication component, the MCU needs to continuously request the communication component. The functional module of the MCU sends the first command to the communication component at regular time through preset time, so that continuous first commands are formed in time and used for triggering the communication component to correspondingly respond to each continuous first command. The time interval of the preset time is preset according to the actual situation.
302. The MCU receives a first response sent by the communication component based on the first command.
And after the communication assembly receives each first command, the functional module of the communication assembly sends a first response corresponding to the first command to the MCU, and the MCU receives the first response.
It should be noted that, in step 301, for each first command sent by the MCU functional module, the functional module of the communication component corresponding to the first command needs to feed back a first response corresponding to the first command to the MCU.
303. And the MCU judges whether the communication assembly normally operates according to the first response.
The MCU calculates the time length of the sending and receiving processes based on each received first response and the first command corresponding to the first response, and compares the time length with the preset time length so as to judge whether the running state of the communication assembly is normal. Because, when the functional module of the communication component is in an abnormal state, its response may be delayed due to the abnormal operating state. The preset duration is set or adjusted in advance based on actual conditions, and is not limited herein.
Specifically, the MCU determines whether the first response is received within a preset time period, and if the first response received by the MCU is received within the preset time period, it indicates that the operation state of the communication module is normal, and executes step 307; if the first response received by the MCU is not received within the preset time period, it indicates that the operation status of the communication component is abnormal, and step 304 is performed.
304. The MCU restarts the communication component.
The MCU judges that the first response is not received within the preset time, controls the power supply of the communication assembly, disconnects the power supply of the communication assembly and restarts the communication assembly.
305. And the MCU receives a second command sent by the communication component at regular time.
Similarly, in order to know the running state information of the MCU, the communication component needs to continuously request the MCU. And the functional module of the communication assembly sends the second commands to the MCU at fixed time through preset time so as to form continuous second commands in time, and the MCU receives each second command.
306. The MCU sends a second reply to the communication component based on the second command.
And after the MCU receives each second command, the functional module of the MCU sends a second response corresponding to the second command to the communication component, and the communication component receives the second response. And in the later period, the communication assembly calculates the time length of the sending and receiving processes based on each received second response and the second command corresponding to the second response, and compares the time length with the preset time length so as to judge whether the running state of the MCU is normal.
It should be noted that, for each second command received by the MCU, the MCU functional module needs to feed back a second response corresponding to the second command to the communication component. Also, like step 302, the functional modules of the MCU have a pre-correspondence relationship with the functional modules of the communication assembly. Step 305 and step 306 may be executed simultaneously with or before or after any of steps 301 to 304, without being limited to being executed after step 304.
In this embodiment, the MCU and the communication module of the electronic device have 1 functional module respectively, and the MCU determines whether the communication module operates normally first, and determines whether the MCU operates normally after the communication module, and the following numbers of the two functional modules in the electronic device are 3 respectively, and the communication module determines whether the MCU operates normally first, and determines whether the communication module operates normally after the MCU, and the following description is made:
secondly, the number of functional modules of the MCU and the communication assembly is respectively 3:
in this embodiment, a communication component in an electronic device is taken as a description object for explanation, and an opposite-end MCU in the electronic device has similar operation contents, where both the MCU and the communication component have 3 functional modules, and correspond to each other. In this embodiment, the determining whether the MCU is normally operated by the communication module first and then by the MCU includes:
401. the communication component sends a first command to the MCU in a timing mode.
This step is substantially similar to step 301, except for slight changes caused by the functional block 3 of the communication assembly. On this basis, the variant is that the 3 functional modules of the communication assembly periodically send the first commands to the MCU according to their respective preset times, also forming respective successive first commands in time. The time intervals of the respective preset times may be the same, may be different, and are not limited herein.
402. And the communication component receives a first response sent by the MCU based on the first command.
After the MCU receives each first command, the functional module of the MCU sends a first response corresponding to the first command, and the communication component receives the first response.
The MCU functional module for sending the first response corresponding to the first command is corresponding to the functional module of the communication component for sending the first command in advance. That is, 3 functional modules of the MCU and 3 functional modules of the communication component are corresponded in advance. In each pair of functional modules, one functional module in the pair sends continuous first commands at regular time, and the other functional module in the pair sends first responses to the first commands; it can also be said that, by this pre-correspondence, each first command of the respective functional module of the MCU is answered one by the corresponding functional module in the communication assembly.
It should be reiterated that, for each first command sent by the functional module in the communication component in step 401, the functional module of the MCU needs to feed back a first response corresponding to the first command to the communication component.
403. And the communication component judges whether the MCU normally operates according to the first response.
And the communication component calculates the time length of the sending and receiving processes based on each received first response and the first command corresponding to the first response, and compares the time length with the preset time length so as to judge whether the running state of the MCU is normal. Because, when the functional module of the MCU is in an abnormal state, its response will be delayed due to the abnormal operation state. Each pair of preset time lengths is set or adjusted in advance based on actual conditions, and is not limited herein. The preset time lengths of different pairs of function modules may be the same or different, and are also set or adjusted in advance based on actual situations, and are not limited herein.
Specifically, the MCU determines whether the first response is received within a preset time period, and if the first response received by the MCU is received within the preset time period, it indicates that the operation state of the communication module is normal, and performs step 407; if the first response received by the MCU is not received within the preset time period, it indicates that the operating status of the communication component is abnormal, and step 404 is executed.
404. The communication component restarts the MCU.
This step is similar to step 304 and will not be described herein.
405. And the communication component receives a second command sent by the MCU at regular time.
This step is generally similar to step 305, except for the slight changes caused by the functional block of the MCU being 3. Based on this, the change is that the 3 functional modules of the MCU periodically send the second commands to the communication component according to their respective preset times, thereby forming consecutive second commands in time, and the communication component receives each second command sent by the 3 functional modules of the MCU.
406. The communication component sends a second reply to the MCU based on the second command.
And after the communication assembly receives each second command sent by 3 functional modules in the MCU, the functional module corresponding to the communication assembly sends a second response corresponding to the second command to the MCU, and the MCU receives the second response. And in the later period, the MCU calculates the time length of the sending and receiving processes based on each received second response and a second command corresponding to the second response, and compares the time length with the preset time length so as to judge whether the running state of the communication assembly is normal.
It should be noted that, for each second command received by the communication component, the functional module corresponding to the communication component needs to feed back a second response corresponding to the second command to the MCU. Similarly, as in step 402, the 3 functional modules in the MCU also have a pre-correspondence relationship with the 3 functional modules in the communication component. Further, steps 405 and 406 may not be limited to be executed after step 404, and may be executed simultaneously with or before or after any of steps 401 to 404.
It is understood that the execution sequence of the steps in fig. 3 and 4 is not fixed. When the MCU and the communication component judge and control the operation of the other side, the MCU and the communication component can also carry out the steps of the method.
In this embodiment, a case that the MCU and the communication module of the electronic device respectively have 3 corresponding functional modules and the communication module first determines whether the MCU normally operates or not, and then determines whether the communication module normally operates or not is described, where a structure of a single-chip microcomputer of the electronic device is described below with reference to fig. 5, including:
a first sending unit 501, configured to send a first command to the communication component at regular time;
a first receiving unit 502, configured to receive a first response sent by the communication component based on the first command;
a determining unit 503, configured to determine whether the communication component operates normally according to the first response;
a restart unit 504, configured to restart the communication component when the communication component operates abnormally;
a second receiving unit 505, configured to receive a second command sent by the communication component at a fixed time;
a second sending unit 506, configured to send a second response to the communication component based on the second command, where the second response is used by the communication module to determine the MCU running state according to the second response and determine whether to restart the MCU according to the MCU running state.
In this embodiment, the operations executed by the single-chip microcomputer are similar to those in fig. 2 and 3, and are not described again here.
One structure of the communication component of the electronic device is described below, with reference to fig. 6, including:
a first sending unit 601, configured to send a first command to the MCU at regular time;
a first receiving unit 602, configured to receive a first response sent by the MCU based on the first command;
a judging unit 603, configured to judge whether the MCU operates normally according to the first response;
a restarting unit 604, configured to restart the MCU when the MCU operates abnormally;
a second receiving unit 605, configured to receive a second command sent by the MCU at regular time;
a second sending unit 606, configured to send a second response to the MCU based on the second command, where the second response is used for the MCU to determine an operation state of the communication component according to the second response and determine whether to restart the communication component according to the operation state of the communication component.
In this embodiment, operations performed by the communication component are similar to those in fig. 2 and fig. 4, and are not described again here.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 701 may include one or more MCUs 702 and a memory 704, and one or more applications or data are stored in the memory 704.
Memory 704 may be volatile storage or persistent storage, among others. The program stored in the memory 704 may include one or more modules, each of which may include a sequence of instructions operating on an electronic device. Still further, the MCU702 may be disposed in communication with the memory 704 to execute a sequence of instruction operations in the memory 704 on the electronic device 701.
The electronic device 701 may also include one or more power supplies 703, one or more communication components 705, one or more input-output interfaces 706, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The electronic device 701 may perform the operations performed in the embodiments shown in fig. 2, fig. 3, or fig. 4, which are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A data processing method, comprising:
the single-chip microcomputer MCU sends a first command to the communication component at fixed time;
the MCU receives a first response sent by the communication component based on the first command;
the MCU judges whether the communication assembly normally operates according to the first response;
if not, the MCU restarts the communication assembly;
the MCU receives a second command sent by the communication component at fixed time;
and the MCU sends a second response to the communication assembly based on the second command, and the second response is used for the communication module to determine the running state of the MCU according to the second response and judge whether to restart the MCU according to the running state of the MCU.
2. The data processing method according to claim 1, wherein the MCU includes N first functional modules, the communication assembly includes N second functional modules, the first functional modules correspond to the second functional modules one to one, and N is an integer and is at least 1; the MCU sends a first command to the communication component in a timing mode, and the first command comprises:
and the MCU triggers the N first functional modules to respectively send the first commands to the corresponding second functional modules at fixed time.
3. The data processing method of claim 1, wherein the MCU sends a second acknowledgement to the communication component based on the second command comprises:
the MCU determines a target first functional module corresponding to a target second functional module which sends the second command, wherein the target first functional module is any one or more than one of the N first functional modules;
and the MCU triggers the target first functional module to send the second response to the target second functional module.
4. The data processing method of claim 1, wherein the MCU determining whether the communication component is operating normally according to the first reply comprises:
and the MCU judges whether the first functional module receives the first response within a preset time period after the first command is sent, wherein the judgment result is used for indicating that the communication assembly operates normally, and the judgment result is used for indicating that the communication assembly operates abnormally.
5. A data processing method, comprising:
the communication component sends a first command to the MCU at regular time;
the communication component receives a first response sent by the MCU based on the first command;
the communication component judges whether the MCU normally operates according to the first response;
if not, the communication component restarts the MCU;
the communication component receives a second command sent by the MCU at fixed time;
and the communication component sends a second response to the MCU based on the second command, wherein the second response is used for the MCU to determine the operation state of the communication component according to the second response and judge whether to restart the communication component according to the operation state of the communication component.
6. The data processing method according to claim 5, wherein the communication component includes N first functional modules, the MCU includes N second functional modules, the first functional modules and the second functional modules correspond to each other one by one, and N is an integer and is at least 1; the communication component sends the first command to the MCU in a timing mode, and the timing mode comprises the following steps:
and the communication component triggers each of the N first functional modules to send the first command to the corresponding second functional module at fixed time.
7. The data processing method of claim 5, wherein the sending, by the communication component, a second acknowledgement to the MCU based on the second command comprises:
the communication assembly determines a target first functional module corresponding to a target second functional module which sends the second command, wherein the target first functional module is any one or more of the N first functional modules;
the communication component triggers the target first functional module to send the second reply to the target second functional module.
8. The data processing method of claim 5, wherein the determining, by the communication component, whether the MCU is operating normally according to the first response comprises:
and the communication assembly judges whether the first functional module receives the first response within a preset time period after the first command is sent, wherein the judgment result is used for indicating that the communication assembly operates normally, and the judgment result is used for indicating that the communication assembly operates abnormally.
9. An electronic device comprising an MCU performing the method of any of claims 1 to 4 and a communication component performing the method of any of claims 5 to 8.
10. A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, which, when executed by the computer, performs the method according to any one of claims 1 to 4 or 5 to 8.
CN202010752314.2A 2020-07-30 2020-07-30 Data processing method and related equipment Active CN111918318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010752314.2A CN111918318B (en) 2020-07-30 2020-07-30 Data processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010752314.2A CN111918318B (en) 2020-07-30 2020-07-30 Data processing method and related equipment

Publications (2)

Publication Number Publication Date
CN111918318A true CN111918318A (en) 2020-11-10
CN111918318B CN111918318B (en) 2023-08-08

Family

ID=73286430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010752314.2A Active CN111918318B (en) 2020-07-30 2020-07-30 Data processing method and related equipment

Country Status (1)

Country Link
CN (1) CN111918318B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098345A (en) * 2006-06-26 2008-01-02 海尔集团公司 Communication interface and communication method for network household electrical appliance
CN102377445A (en) * 2010-08-10 2012-03-14 希姆通信息技术(上海)有限公司 Wireless communication module and self-recovery method thereof
CN103067034A (en) * 2012-12-31 2013-04-24 广州杰赛科技股份有限公司 Third generation telecommunication (3G) module capable of monitoring light-emitting diode (LED) release system
CN106033206A (en) * 2015-03-16 2016-10-19 佛山市顺德区美的电热电器制造有限公司 Self-checking method used for cooking utensil, self-checking system and the cooking utensil

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098345A (en) * 2006-06-26 2008-01-02 海尔集团公司 Communication interface and communication method for network household electrical appliance
CN102377445A (en) * 2010-08-10 2012-03-14 希姆通信息技术(上海)有限公司 Wireless communication module and self-recovery method thereof
CN103067034A (en) * 2012-12-31 2013-04-24 广州杰赛科技股份有限公司 Third generation telecommunication (3G) module capable of monitoring light-emitting diode (LED) release system
CN106033206A (en) * 2015-03-16 2016-10-19 佛山市顺德区美的电热电器制造有限公司 Self-checking method used for cooking utensil, self-checking system and the cooking utensil

Also Published As

Publication number Publication date
CN111918318B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US5781770A (en) Method and controller for controlling shutdown of a processing unit
CN104782082A (en) New approach for controller area network bus off handling
US5594893A (en) System for monitoring and controlling operation of multiple processing units
CN103036719A (en) Cross-regional service disaster method and device based on main cluster servers
CN109062753A (en) A kind of hard disk monitoring system and monitoring method
CN102957623A (en) Maintenance method and equipment of neighborhood of border gate protocol
CN111541762B (en) Data processing method, management server, device and storage medium
CN111930222A (en) Control method and device and electronic equipment
CN114064234A (en) Method and device for repairing WMI service
CN111918318A (en) Data processing method and related equipment
CN109582626B (en) Method, device and equipment for accessing bus and readable storage medium
CN110661043A (en) Battery management circuit, control method thereof and battery management system
CN214751843U (en) Watchdog monitoring system
CN112817818B (en) Method for monitoring time of deploying running program on cloud by edge security node
CN112087341B (en) Communication method, system, electronic equipment and storage medium based on multichannel compensation
CN110119111B (en) Communication method and device, storage medium, and electronic device
CN116939000A (en) Network reconnection method, device, terminal equipment and storage medium
CN103326897A (en) Distributed computing environment general monitoring device and failure detection method
CN114860512A (en) Method, device, equipment and system for detecting working state of SOC (system on chip) chip of vehicle
CN217575167U (en) Autonomous vehicle
CN111026586B (en) Main and standby state switching method and device of cluster equipment
CN210721145U (en) Unmanned vehicle
CN111039120B (en) Elevator state alarm method and device
CN112822039B (en) Main and standby mode switching method for dual-machine hot standby system
CN114090309B (en) Method and device for repairing WMI service

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
GR01 Patent grant
GR01 Patent grant