CN114422560B - Method for stopping operation of target equipment, module, electronic equipment and readable medium - Google Patents

Method for stopping operation of target equipment, module, electronic equipment and readable medium Download PDF

Info

Publication number
CN114422560B
CN114422560B CN202210032732.3A CN202210032732A CN114422560B CN 114422560 B CN114422560 B CN 114422560B CN 202210032732 A CN202210032732 A CN 202210032732A CN 114422560 B CN114422560 B CN 114422560B
Authority
CN
China
Prior art keywords
local clock
time stamp
target
memory
timestamp
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.)
Active
Application number
CN202210032732.3A
Other languages
Chinese (zh)
Other versions
CN114422560A (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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202210032732.3A priority Critical patent/CN114422560B/en
Publication of CN114422560A publication Critical patent/CN114422560A/en
Application granted granted Critical
Publication of CN114422560B publication Critical patent/CN114422560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0647Synchronisation among TDM nodes
    • H04J3/065Synchronisation among TDM nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors

Abstract

The application provides a method for stopping operation of target equipment, a module, electronic equipment and a readable medium, and belongs to the technical field of intelligent equipment. The method comprises the following steps: after the target equipment is powered on, reading a target time stamp from a memory of the target equipment, and determining a network connection state of a local clock in the target equipment, wherein the target time stamp is a time stamp stored last time before the local clock is powered on; determining a time stamp reference of the local clock according to the network connection state of the local clock and the target time stamp; and according to the time stamp reference, under the condition that the local clock meets preset storage conditions, storing the current time stamp of the local clock into the memory once until the current time stamp exceeds a preset cut-off time stamp, and stopping running the target equipment. The method and the device avoid that the target equipment cannot stop running accurately.

Description

Method for stopping operation of target equipment, module, electronic equipment and readable medium
Technical Field
The application relates to the technical field of intelligent equipment, in particular to a method for stopping operation of target equipment, a module, electronic equipment and a readable medium.
Background
With the tremendous increase in population flow of society, electronic equipment rents into a great trend. Generally, a renter sets a lease deadline of an electronic device, a local clock of the electronic device continuously updates time through a network, and when the updated time of the electronic device reaches the lease deadline, the electronic device stops running.
However, if the electronic device is disconnected, the local clock stops running, but the electronic device is still leased and used, so that the electronic device cannot accurately stop running, and the electronic device brings benefits to leasers.
Disclosure of Invention
An object of the embodiment of the application is to provide a method, a module, an electronic device and a readable medium for stopping operation of a target device, so as to solve the problem that the electronic device cannot accurately stop operation. The specific technical scheme is as follows:
in a first aspect, a method for stopping operation of a target device is provided, where the method includes:
after the target equipment is powered on, reading a target time stamp from a memory of the target equipment, and determining a network connection state of a local clock in the target equipment, wherein the target time stamp is a time stamp stored last time before the local clock is powered on;
determining a time stamp reference of the local clock according to the network connection state of the local clock and the target time stamp;
and according to the time stamp reference, under the condition that the local clock meets preset storage conditions, storing the current time stamp of the local clock into the memory once until the current time stamp exceeds a preset cut-off time stamp, and stopping running the target equipment.
Optionally, determining the timestamp reference of the local clock according to the networking condition of the local clock and the target timestamp includes:
acquiring a cloud time stamp from a cloud under the condition that the network connection state of the local clock is a connected network;
under the condition that the cloud time stamp is different from the target time stamp, updating the local clock by taking the cloud time stamp as a reference;
and taking the cloud time stamp as a time stamp reference of the local clock.
Optionally, after the cloud timestamp is obtained from the cloud, the method further includes:
and taking the target timestamp as a timestamp reference of the local clock under the condition that the cloud timestamp is the same as the target timestamp.
Optionally, determining the current timestamp of the local clock according to the networking condition of the local clock and the target timestamp includes:
and taking the target time stamp as a time stamp reference of the local clock when the network connection state of the local clock is unconnected network.
Optionally, storing the current timestamp into the memory once each time the local clock satisfies a preset storage condition includes:
acquiring the recording time length of the local clock, wherein the recording time length is the time length between the current time and the time when the current time stamp is stored in the memory;
acquiring a current time stamp of the local clock under the condition that the recording time length reaches a preset time length threshold value;
storing the current timestamp in the memory.
Optionally, storing the current timestamp into the memory once each time the local clock satisfies a preset storage condition includes:
and after the local clock is updated by taking the cloud time stamp as a reference, storing the updated current time stamp into the memory.
Optionally, after storing the current timestamp of the local clock in the memory, the method further comprises:
and in the running process of the local clock, adjusting the running error of the local clock in an automatic compensation mode so as to enable the recording time length of the local clock to be consistent with the actual time length.
In a second aspect, there is provided a module for stopping operation of a target device, the module comprising:
the device comprises a reading module, a storage module and a storage module, wherein the reading module is used for reading a target time stamp from a memory of target equipment after the target equipment is electrified and determining the network connection state of a local clock in the target equipment, wherein the target time stamp is the last time the local clock is stored before the local clock is electrified;
the determining module is used for determining a time stamp reference of the local clock according to the network connection state of the local clock and the target time stamp;
and the storing module is used for storing the current time stamp of the local clock into the memory once under the condition that the local clock meets the preset storage condition according to the time stamp reference until the current time stamp exceeds the preset cut-off time stamp, and stopping running the target equipment.
In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method step that any one of the target devices stops running when executing the program stored in the memory.
In a fourth aspect, a computer readable storage medium is provided, in which a computer program is stored, which computer program, when being executed by a processor, implements the method steps of any of the target devices to stop running.
The beneficial effects of the embodiment of the application are that:
the embodiment of the application provides a method for stopping operation of target equipment, and when the target equipment is not connected with a network, the method can also determine the current timestamp through the target timestamp of a memory before power failure; when the target equipment is connected with the network, the current time stamp can be determined through the cloud time stamp, the target equipment in the method is not influenced by the network connection state, the current time stamp can be accurately determined, the situation that the target equipment cannot be accurately stopped to operate is avoided, and the benefits of renters are guaranteed.
Of course, not all of the above advantages need be achieved simultaneously in the practice of any one of the products or methods of this application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a method for stopping operation of a target device according to an embodiment of the present application;
fig. 2 is a process flow diagram of a method for stopping operation of a target device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a module structure of stopping operation of a target device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and are not of specific significance per se. Thus, "module" and "component" may be used in combination.
In order to solve the problems mentioned in the background art, according to an aspect of the embodiments of the present application, an embodiment of a method for stopping operation of a target device is provided.
A method for stopping an operation of a target device in the embodiments of the present application may be performed by a target device, which may be a device having a memory, such as a refrigerator, an air conditioner, a washing machine, or the like.
The following will describe a method for stopping operation of a target device according to an embodiment of the present application in detail with reference to a specific embodiment, as shown in fig. 1, and the specific steps are as follows:
step 101: after the target device is powered on, the target timestamp is read from the memory of the target device, and the network connection state of the local clock in the target device is determined.
The target time stamp is the time stamp stored last time before the local clock is powered up.
In the embodiment of the application, the target device is provided with a local clock which runs all the time, the local clock can store a time stamp into a memory of the target device periodically before the target device is powered off, the target device reads the last stored target time stamp before the power off from the memory after the target device is powered on again, and then the network connection state of the local clock in the target device is determined. Wherein the network connection status includes a connected network and an unconnected network. Illustratively, the memory is a memory chip.
The local Clock in the present application is an RTC (Real Time Clock), and there are two implementations of the local Clock, namely hardware and software. The hardware RTC is an integrated hardware circuit with a clock chip, the software RTC is a code program of a clock timing function realized by using a chip timer and a software algorithm, and the local clock in the application is the software RTC.
Step 102: and determining the time stamp reference of the local clock according to the network connection state of the local clock and the target time stamp.
In the embodiment of the present application, if the local clock is connected to the network, the target clock updates the local clock according to the cloud timestamp, and then uses the cloud timestamp as a timestamp reference for running the local clock. If the local clock is not connected with the network, the target clock takes the acquired target time stamp as a time stamp reference of the running of the local clock.
Step 103: and according to the time stamp reference, under the condition that the local clock meets the preset storage condition, storing the current time stamp of the local clock into a memory once until the current time stamp exceeds the preset cut-off time stamp, and stopping running the target equipment.
In the embodiment of the application, the target device controls the target clock to start running from the time stamp reference, the target device stores the current time stamp of the local clock into the memory once every time the local clock meets the preset storage condition, and after the target device executes the storage process at least once, if the target device determines that the current time stamp is the same as the preset cut-off time stamp, the running time of the target device reaches the cut-off time, the running of the target device is stopped.
The target device is a rental device, and the rental device stops running when the current time stamp of the rental device is the same as the preset expiration time stamp.
In the method, the target device determines a time stamp reference of the local clock according to the network connection state of the local clock and the target time stamp, and controls the target clock to run from the time stamp reference. If the target device determines that the current time stamp is different from the preset cut-off time stamp, the current time stamp is stored in the memory, and if the target device is suddenly powered off at the moment, the stored current time stamp can be used as a target time stamp read after the next power-on; and if the target device determines that the current time stamp is the same as the preset cut-off time stamp, stopping running the target device.
When the target equipment is not connected with the network, the current time stamp can be determined through the target time stamp of the memory before power failure; when the target equipment is connected with the network, the current time stamp can be determined through the cloud time stamp, the target equipment in the method is not influenced by the network connection state, the current time stamp can be accurately determined, the situation that the target equipment cannot be accurately stopped to operate is avoided, and the benefits of renters are guaranteed.
As an alternative embodiment, determining the timestamp reference of the local clock from the networking conditions of the local clock and the target timestamp includes three cases:
case one: under the condition that the network connection state of the local clock is a connected network, acquiring a cloud timestamp from a cloud; under the condition that the cloud time stamp is different from the target time stamp, updating the local clock by taking the cloud time stamp as a reference; and taking the cloud time stamp as a time stamp reference of the local clock.
If the network connection state of the local clock is the connected network, the target device acquires a cloud time stamp from the cloud, and then judges whether the cloud time stamp is identical to the target time stamp. If the local clocks are different, the fact that the local clocks are not accurately operated is indicated, the target equipment updates the local clocks by taking the cloud time stamp as a reference, and the cloud time stamp is taken as a time stamp reference of the local clocks. In addition, the target device also stores the cloud timestamp to memory as the local clock has been updated.
And a second case: after the cloud time stamp is obtained from the cloud, taking the target time stamp as a time stamp reference of the local clock under the condition that the cloud time stamp is identical to the target time stamp.
And the target equipment judges whether the cloud time stamp is the same as the target time stamp, if so, the target time stamp is used as a time stamp reference of the local clock, and if the cloud time stamp is the same as the target time stamp, the local clock is accurately operated.
And a third case: when the network connection state of the local clock is unconnected, the target timestamp is used as a timestamp reference of the local clock.
And if the network connection state of the local clock is unconnected, taking the target timestamp as a timestamp reference of the local clock.
As an alternative embodiment, storing the current timestamp in the memory once in each case the local clock satisfies the preset storage condition includes two cases:
case one: acquiring the recording time length of a local clock, wherein the recording time length is the time length between the current time and the time when the current time stamp is stored in a memory; under the condition that the recording duration reaches a preset duration threshold value, acquiring a current time stamp of the local clock; the current timestamp is stored in memory.
The target device stores the current time stamp into the memory once every preset time length, and the specific process is as follows: the target equipment judges whether the recording time length reaches a preset time length threshold value or not from the moment when the current time stamp is stored in the memory last time to the moment when the current time stamp is stored in the memory as the recording time length, if not, the target equipment continues to judge, and if so, the current time stamp of the local clock is obtained and stored in the memory.
And a second case: after the local clock is updated by taking the cloud time stamp as a reference, storing the updated current time stamp into a memory.
If the target device determines that the cloud time stamp is different from the target time stamp, the local clock is updated by taking the cloud time stamp as a reference, and then the updated current time stamp is stored in the memory.
And after the local clock is updated by taking the cloud time stamp as a reference, re-determining the recording time according to the updated time stamp, so that the starting time of the recording time of the local clock is the same as the cloud time stamp stored in the memory.
In addition, if the local clock is updated by human or other devices, the updated current time stamp is also stored in the memory. The manual update time stamp is that a user manually corrects the local clock in a mode of key and display screen; updating the time stamp by the other device corrects the local clock of the target device by transmitting clock data by other neighboring devices.
As an alternative implementation manner, in the running process of the local clock, an automatic compensation mode is adopted to adjust the running error of the local clock so as to enable the recording time length of the local clock to be consistent with the actual time length.
In the embodiment of the application, in the running process of the local clock, the running error of the local clock can be adjusted in an automatic compensation mode, and the method comprises two modes, wherein the target device firstly determines the error time length of the local clock in the preset time length, and adds or subtracts the error time length on the basis of the preset time length when the recording time length of the local clock reaches the preset time length, so that the accurate time length is obtained, and the recording time length of the local clock is identical with the actual time length. In another mode, the target device avoids operation errors through an algorithm in the operation process, and the recording time length of the local clock is consistent with the actual time length when the recording time length of the local clock reaches the preset time length.
Illustratively, the preset time length is one hour, the error time length of the local clock is 10S more, and each time the local clock runs for one hour automatically, the displayed time stamp is subtracted by 10S by means of automatic compensation to obtain the current time stamp, and then the current time stamp is stored in the memory.
According to the method and the device, the error of the local clock is reduced in an automatic compensation mode, and the accuracy of the current time stamp of the local clock is improved.
As an optional implementation manner, the method and the device can be applied to leased air conditioner products, if the leased air conditioner is provided with NB-IOT communication modules, NB signals of some leased air conditioner installation positions are poor and unstable, the situation that the latest time cannot be synchronized exists, after a user places a lease air conditioner, the server can issue an expiration time for the lease air conditioner, the expiration time is stored in the air conditioner, whether the current time stamp exceeds the locking time is judged in real time, if yes, the lease is expired to lock the air conditioner, and the user can use the lease again. The method and the device can ensure the timed stop operation of the target equipment and avoid the loss of benefits of renters.
Optionally, the embodiment of the application further provides a process flow chart of a method for stopping operation of the target device, as shown in fig. 2, and the specific steps are as follows.
Step 1: the target device is powered up.
Step 2: the target time stamp is read from the memory chip.
Step 3: judging whether the target equipment is connected with a network, and if so, executing the step 4; if the network is not connected, executing the step 5;
step 4: judging whether the cloud time stamp is the same as the target time stamp, if so, executing the step 5; if not, executing the step 6;
step 5: the target timestamp is used as a timestamp reference of the local clock.
Step 6: and taking the cloud time stamp as a time stamp reference of the local clock.
Step 7: the local clock is run starting from the time stamp reference.
Step 8: if the recording time length of the local clock reaches the preset time length, determining the current time stamp of the local clock.
Step 9: judging whether the current time stamp exceeds a preset cut-off time stamp, if so, executing the step 10; if not, executing the step 4.
Step 10: and stopping running the target equipment.
Based on the same technical concept, the embodiment of the application also provides a device for stopping operation of the target device, as shown in fig. 3, the device includes:
the reading module 301 is configured to read a target timestamp from a memory of the target device after the target device is powered on, and determine a network connection state of a local clock in the target device, where the target timestamp is a timestamp stored last time before the local clock is powered on;
a determining module 302, configured to determine a timestamp reference of the local clock according to the network connection status of the local clock and the target timestamp;
and a storing module 303, configured to store, according to the timestamp reference, the current timestamp of the local clock into the memory once every time the local clock meets the preset storage condition, until the current timestamp exceeds the preset deadline timestamp, and stop running the target device.
Optionally, the determining module 302 is configured to:
under the condition that the network connection state of the local clock is a connected network, acquiring a cloud timestamp from a cloud;
under the condition that the cloud time stamp is different from the target time stamp, updating the local clock by taking the cloud time stamp as a reference;
and taking the cloud time stamp as a time stamp reference of the local clock.
Optionally, the device is further configured to:
and taking the target timestamp as a timestamp reference of the local clock under the condition that the cloud timestamp is the same as the target timestamp.
Optionally, the determining module 302 is configured to:
when the network connection state of the local clock is unconnected, the target timestamp is used as a timestamp reference of the local clock.
Optionally, the logging module 303 is configured to:
acquiring the recording time length of a local clock, wherein the recording time length is the time length between the current time and the time when the current time stamp is stored in a memory;
under the condition that the recording duration reaches a preset duration threshold value, acquiring a current time stamp of the local clock;
the current timestamp is stored in memory.
Optionally, the logging module 303 is configured to:
after the local clock is updated by taking the cloud time stamp as a reference, storing the updated current time stamp into a memory.
Optionally, the device is further configured to:
in the running process of the local clock, the running error of the local clock is regulated by adopting an automatic compensation mode so as to enable the recording time length of the local clock to be consistent with the actual time length.
According to another aspect of the embodiments of the present application, as shown in fig. 4, an electronic device is provided, where the electronic device includes a memory 403, a processor 401, a communication interface 402, and a communication bus 404, a computer program executable on the processor 401 is stored in the memory 403, the processor 401 communicates with the communication bus 404 through the communication interface 402, and the processor 401 executes the steps of the method.
The memory and the processor in the electronic device communicate with the communication interface through a communication bus. The communication bus may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The communication bus may be classified as an address bus, a data bus, a control bus, or the like.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
There is also provided, in accordance with yet another aspect of an embodiment of the present application, a computer readable medium having non-volatile program code executable by a processor.
Optionally, in an embodiment of the present application, the computer readable medium is configured to store program code for the processor to perform the above method.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
In specific implementation, the embodiments of the present application may refer to the above embodiments, which have corresponding technical effects.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP devices, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or, what contributes to the prior art, or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc. It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for stopping operation of a target device, the method comprising:
after a target device is powered on, reading a target time stamp from a memory of the target device, and determining a network connection state of a local clock in the target device, wherein the target time stamp is a time stamp stored last time before the local clock is powered on, and the local clock is a code program of a clock timing function realized by using a chip timer and a software algorithm;
taking the target time stamp as a time stamp reference of the local clock when the network connection state of the local clock is unconnected network;
according to the time stamp reference, under the condition that the local clock meets preset storage conditions, storing the current time stamp of the local clock into the memory once until the current time stamp exceeds a preset cut-off time stamp, and stopping running the target equipment;
wherein storing the current timestamp into the memory once each time the local clock satisfies a preset storage condition comprises:
acquiring the recording time length of the local clock, wherein the recording time length is the time length between the current time and the time when the current time stamp is stored in the memory;
acquiring a current time stamp of the local clock under the condition that the recording time length reaches a preset time length threshold value;
storing the current timestamp in the memory.
2. The method of claim 1, wherein determining a timestamp reference for the local clock based on the network connection status of the local clock and the target timestamp comprises:
acquiring a cloud time stamp from a cloud under the condition that the network connection state of the local clock is a connected network;
under the condition that the cloud time stamp is different from the target time stamp, updating the local clock by taking the cloud time stamp as a reference;
and taking the cloud time stamp as a time stamp reference of the local clock.
3. The method of claim 2, wherein after the cloud timestamp is obtained from the cloud, the method further comprises:
and taking the target timestamp as a timestamp reference of the local clock under the condition that the cloud timestamp is the same as the target timestamp.
4. The method of claim 2, wherein storing the current timestamp into the memory once for each time the local clock satisfies a preset storage condition comprises:
and after the local clock is updated by taking the cloud time stamp as a reference, storing the updated current time stamp into the memory.
5. The method of claim 4, wherein after storing the current timestamp of the local clock in the memory, the method further comprises:
and in the running process of the local clock, adjusting the running error of the local clock in an automatic compensation mode so as to enable the recording time length of the local clock to be consistent with the actual time length.
6. An apparatus for stopping operation of a target device, the apparatus comprising:
the device comprises a reading module, a storage module and a storage module, wherein the reading module is used for reading a target timestamp from a memory of target equipment after the target equipment is electrified and determining a network connection state of a local clock in the target equipment, the target timestamp is the timestamp stored last time before the local clock is electrified, and the local clock is a code program of a clock timing function realized by a chip timer and a software algorithm;
the determining module is used for taking the target timestamp as a timestamp reference of the local clock when the network connection state of the local clock is a network which is not connected;
the storing module is used for storing the current time stamp of the local clock into the memory once under the condition that the local clock meets the preset storage condition according to the time stamp reference until the current time stamp exceeds the preset cut-off time stamp, and stopping running the target equipment;
wherein, the deposit module is used for:
acquiring the recording time length of the local clock, wherein the recording time length is the time length between the current time and the time when the current time stamp is stored in the memory;
acquiring a current time stamp of the local clock under the condition that the recording time length reaches a preset time length threshold value;
storing the current timestamp in the memory.
7. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-5 when executing a program stored on a memory.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-5.
CN202210032732.3A 2022-01-12 2022-01-12 Method for stopping operation of target equipment, module, electronic equipment and readable medium Active CN114422560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210032732.3A CN114422560B (en) 2022-01-12 2022-01-12 Method for stopping operation of target equipment, module, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210032732.3A CN114422560B (en) 2022-01-12 2022-01-12 Method for stopping operation of target equipment, module, electronic equipment and readable medium

Publications (2)

Publication Number Publication Date
CN114422560A CN114422560A (en) 2022-04-29
CN114422560B true CN114422560B (en) 2023-06-16

Family

ID=81272907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210032732.3A Active CN114422560B (en) 2022-01-12 2022-01-12 Method for stopping operation of target equipment, module, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN114422560B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116010413B (en) * 2022-12-27 2024-02-06 箭牌家居集团股份有限公司 Identification generation method, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019242131A1 (en) * 2018-06-19 2019-12-26 佛山市顺德区美的电热电器制造有限公司 Clock synchronization method and device, and computer storage medium
CN111327586A (en) * 2018-12-13 2020-06-23 施耐德电器工业公司 Time stamping of data in offline nodes
CN113420034A (en) * 2021-01-29 2021-09-21 阿里巴巴集团控股有限公司 Clock updating method, device, database and computer storage medium
CN113593094A (en) * 2021-08-06 2021-11-02 昇辉控股有限公司 Apartment intelligent lock management method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10944591B2 (en) * 2015-10-14 2021-03-09 Electrolux Home Products, Inc. Automatically setting a clock of a network-connected apparatus
CN110189476A (en) * 2019-04-30 2019-08-30 杭州友电科技有限公司 A kind of rental method of shared device, Compliance control equipment and mobile terminal
CN110943865A (en) * 2019-12-02 2020-03-31 国网智能科技股份有限公司 Method and device for diagnosing equipment fault time and related equipment
CN112788100A (en) * 2020-12-07 2021-05-11 青岛海尔科技有限公司 Time synchronization method and device, storage medium and electronic device
CN113259042B (en) * 2021-05-14 2024-01-02 湖南智领通信科技有限公司 Clock reference synchronization method, device, equipment and storage medium between multiple equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019242131A1 (en) * 2018-06-19 2019-12-26 佛山市顺德区美的电热电器制造有限公司 Clock synchronization method and device, and computer storage medium
CN111327586A (en) * 2018-12-13 2020-06-23 施耐德电器工业公司 Time stamping of data in offline nodes
CN113420034A (en) * 2021-01-29 2021-09-21 阿里巴巴集团控股有限公司 Clock updating method, device, database and computer storage medium
CN113593094A (en) * 2021-08-06 2021-11-02 昇辉控股有限公司 Apartment intelligent lock management method and system

Also Published As

Publication number Publication date
CN114422560A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN114422560B (en) Method for stopping operation of target equipment, module, electronic equipment and readable medium
CN108363343B (en) Household appliance control method, system and computer storage medium
US20150142140A1 (en) In-home-presence probability calculation method, server apparatus, and in-home-presence probability calculation system
US20080155244A1 (en) Method for updating the timing of a baseboard management controller
CN108919657B (en) Automatic configuration method and device of panel and panel
CN102449646A (en) Operating status determination device and operating status determination method
CN111323626A (en) Uncovering detection circuit integrated in MCU and uncovering detection method based on MCU
CN114401065A (en) Local time calibration method, device, equipment and storage medium
CN102394998A (en) Image processing system, management apparatus, image processing apparatus, power control method and power control program for image processing apparatus, and recording medium
CN107463393B (en) Peripheral device and driver installation method and system thereof
CN111091667A (en) Shared payment equipment and self-service equipment
CN111198519A (en) Information output method, information output device, and recording medium
CN112087353B (en) Function recommendation method of equipment, cloud server and storage medium
CN113783649B (en) Terminal timing method, system, electronic equipment and storage medium
CN113406992B (en) System clock control method, processing device and readable storage medium
CN110519001B (en) Clock synchronization method and device and ammeter communication module
CN111817820B (en) Equipment coding method and device and coding system based on two buses
CN115550427A (en) Equipment upgrading method, device, equipment and storage medium
JP2010086307A (en) Cradle, cradle control system and program
CN110286637B (en) Information acquisition method, device and system
CN109445824B (en) Updating method and system of measurement and control device and terminal equipment
CN112323343A (en) Laundry reminding method and device, electronic equipment and storage medium
CN110933663B (en) Multi-connected air conditioning unit and remote upgrading method thereof
KR102633790B1 (en) Remote meter reading terminal capable of reducing battery energy consumption and its control method
CN110704406B (en) Energy data processing method, device and equipment

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