CN110597205B - Control method and device of intelligent power strip, processor and intelligent power strip - Google Patents

Control method and device of intelligent power strip, processor and intelligent power strip Download PDF

Info

Publication number
CN110597205B
CN110597205B CN201910872946.XA CN201910872946A CN110597205B CN 110597205 B CN110597205 B CN 110597205B CN 201910872946 A CN201910872946 A CN 201910872946A CN 110597205 B CN110597205 B CN 110597205B
Authority
CN
China
Prior art keywords
socket
information
identifier
configuration file
relay
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
CN201910872946.XA
Other languages
Chinese (zh)
Other versions
CN110597205A (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.)
Shanghai Mxchip Information Technology Co Ltd
Original Assignee
Shanghai Mxchip Information 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 Shanghai Mxchip Information Technology Co Ltd filed Critical Shanghai Mxchip Information Technology Co Ltd
Priority to CN201910872946.XA priority Critical patent/CN110597205B/en
Publication of CN110597205A publication Critical patent/CN110597205A/en
Application granted granted Critical
Publication of CN110597205B publication Critical patent/CN110597205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house

Abstract

The invention discloses a control method and device of an intelligent socket, a processor and the intelligent socket. The method comprises the following steps: receiving a control instruction from a terminal, wherein information carried in the control instruction at least comprises: the intelligent socket is provided with a socket mark to be controlled; and adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file. The invention solves the technical problems of higher operation complexity and lower development efficiency caused by the need of independently developing adaptive firmware aiming at different types of socket in the related technology.

Description

Control method and device of intelligent power strip, processor and intelligent power strip
Technical Field
The invention relates to the field of smart home, in particular to a control method and device of an intelligent socket, a processor and the intelligent socket.
Background
The socket is usually a movable multi-position socket with a power line and a plug, also called a patch board, a socket, a so-called wire extension assembly or an extension line socket. The power strip can be connected with more than one power plug, so that the space and the circuit can be saved. The intelligent switch socket has the advantages of convenience and energy conservation, so that the intelligent switch socket is widely favored by foreign consumers. Smart switching jacks are becoming the focus of research on new energy saving products.
The intelligent socket is specially designed for intelligent equipment, is provided with a Universal Serial Bus (USB) interface and can directly charge the intelligent equipment. Be different from traditional row of inserting, the row is inserted to intelligence no matter is in the aspect of appearance or all has carried out obvious improvement in the aspect of the performance, promotes space utilization and work efficiency from this, makes it more accord with the use custom. The intelligent power strip is an intelligent socket integrating functions of safety protection, USB quick charging, electricity metering and the like.
However, the firmware development process of the smart socket is a very complicated task. Fig. 1 is a schematic structural view of a smart socket according to the related art, and as shown in fig. 1, the smart socket 100 includes a first outlet 110, a second outlet 120, a third outlet 130, a fourth outlet 140, and a switching indicator 150. The switch indicator light 150 is used to indicate whether the intelligent socket is in a power-on state.
Currently, in the related art, each socket manufacturer has a difference in definition of the functional pins of each socket, and the definition of the functions is different. Therefore, it is necessary to develop adaptive firmware separately for each socket so that it can communicate with the intelligent terminal to realize intelligent control. For example, for the smart socket shown in fig. 1, in the first socket 110 of the smart socket 100 produced by different manufacturers, adaptive firmware needs to be developed separately for the smart socket. Fig. 2 is a schematic diagram of a module PIN configured for the first socket 110 of fig. 1 according to a manufacturer a of the related art, fig. 3 is a schematic diagram of a module PIN configured for the first socket 110 of fig. 1 according to a manufacturer B of the related art, as shown in fig. 2 and 3, the relay switch of the first socket 110 is connected by the same first PIN PIN110 of the manufacturer A and the manufacturer B, the relay switch of the second socket 120 is connected by the same second PIN PIN120 of the manufacturer A and the manufacturer B, and the relay switch of the fourth socket 140 is connected by the same fourth PIN PIN140 of the manufacturer A and the manufacturer B. However, manufacturer a and manufacturer B use a different third PIN130 to connect to the relay switch of the third socket 130. Therefore, for the firmware developers, the firmware developers need to respectively develop the corresponding firmware for the smart sockets of the manufacturer a and the smart sockets of the manufacturer B, which results in low development efficiency.
In addition, the types of the intelligent socket sold in the market are various, and besides the types of the intelligent sockets shown in fig. 1, the intelligent socket also comprises one-way intelligent socket, two-way intelligent socket, and even multi-way intelligent socket. For each socket, the corresponding firmware needs to be developed separately.
Fig. 4 is a schematic diagram of an overall software system structure of an intelligent socket according to the related art, and as shown in fig. 4, a storage space of a FLASH memory (FLASH) chip may be divided into three areas, i.e., a BOOT loader (BOOT), an Application program (Application), and a file system (FILESYS). The BOOT and Application further constitute the firmware in the FLASH memory space. The Application may include, but is not limited to, an OS, networking, socket control logic, cloud control logic. The content stored in FILESYS can include, but is not limited to, system parameters, light control status, wireless fidelity (Wi-Fi) information of the connection.
The interaction flow of the intelligent socket provided in the related art is as follows:
firstly, the intelligent socket executes power-on operation by running BOOT;
secondly, executing distribution network operation in Application through the BOOT function of the BOOT, and binding an Application (APP) on the user intelligent terminal; the method comprises the steps that an intelligent terminal APP sends a control instruction (STRUC 1) to a SERVER (SERVER), the control instruction (STRUC 1) is distributed to a router through the SERVER (SERVER), and Application is informed to achieve control over PIN PINs. Such as on-off control. FILESYS is mainly used for storing system parameters, lamp control states, connected Wi-Fi information and other contents.
Therefore, in the related art, due to the need to separately develop adaptive firmware for different types of socket strips, the operation complexity is high, and the development efficiency is low.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
At least some embodiments of the present invention provide a method, an apparatus, a processor, and an intelligent socket for controlling an intelligent socket, so as to at least solve the technical problems of high operation complexity and low development efficiency caused by the need to separately develop adaptive firmware for different types of sockets in the related art.
According to one embodiment of the invention, a control method of an intelligent socket is provided, which comprises the following steps:
receiving a control instruction from a terminal, wherein information carried in the control instruction at least comprises: the intelligent socket is provided with a socket mark to be controlled; and adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, adjusting the operating state of the socket according to the configuration file includes: searching a pin corresponding to the socket identifier to be controlled and a relay identifier corresponding to the pin from the configuration file; controlling the corresponding relay to be switched on according to the relay identifier, and adjusting the working state of the socket from a switching-off state to a switching-on state; or, the corresponding relay is controlled to be switched off according to the relay identifier, and the working state of the socket is adjusted from the on state to the off state.
Optionally, the information carried in the control instruction further includes: the time information, the working state of the socket is adjusted according to the configuration file, and the working state comprises the following steps: determining an adjustment opportunity according to time information, wherein the time information comprises one of the following: timing information, countdown information; and under the condition that the adjusting time is met, adjusting the working state of the socket according to the configuration file.
Optionally, the method further includes: and if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file, refusing to execute the control instruction, and feeding back the abnormal prompt information to the terminal.
Optionally, the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
Optionally, the configuration file is set in a file system area of the memory chip.
According to an embodiment of the present invention, there is also provided a control device for an intelligent socket, including:
a receiving module, configured to receive a control instruction from a terminal, where information carried in the control instruction at least includes: the intelligent socket is provided with a socket mark to be controlled; and the control module is used for adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, the control module comprises: the searching unit is used for searching pins corresponding to the socket identification to be controlled and relay identifications corresponding to the pins from the configuration file; the control unit is used for controlling the corresponding relay to be switched on according to the relay identifier and adjusting the working state of the socket from a switching-off state to a switching-on state; or, the corresponding relay is controlled to be switched off according to the relay identifier, and the working state of the socket is adjusted from the on state to the off state.
Optionally, the information carried in the control instruction further includes: the time information and the control module are used for determining the adjusting opportunity according to the time information, wherein the time information comprises one of the following: timing information, countdown information; and under the condition that the adjusting time is met, adjusting the working state of the socket according to the configuration file.
Optionally, the apparatus further comprises: and the processing module is used for refusing to execute the control instruction and feeding back the abnormal prompt information to the terminal if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file.
Optionally, the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
Optionally, the configuration file is set in a file system area of the memory chip.
According to an embodiment of the present invention, there is further provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the control method of the intelligent socket in any one of the above manners when running.
According to an embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program is configured to execute the control method of the intelligent socket in any one of the above aspects when running.
According to an embodiment of the present invention, there is also provided an intelligent socket, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to execute the control method of the intelligent socket in any one of the above.
In at least some embodiments of the present invention, a method of receiving a control instruction from a terminal, where information carried in the control instruction at least includes a to-be-controlled socket identifier in an intelligent socket is adopted, and a working state of a socket corresponding to the to-be-controlled socket identifier is adjusted by a configuration file, so that the purpose that an intelligent terminal can adaptively control various types of intelligent sockets is achieved by writing the configuration file into a specific storage area (e.g., a file system) of the intelligent socket in advance, and thus, the general purpose and integration of firmware is achieved by searching the configuration file, and adaptive firmware does not need to be developed for different types of intelligent sockets, so that technical effects of reducing operation complexity and improving development efficiency are achieved, and further, technical problems of high operation complexity and low development efficiency caused by separately developing adaptive firmware for different types of sockets in related technologies are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic structural view of an intelligent socket according to the related art;
fig. 2 is a schematic diagram of a module pin configured for the first socket 110 of fig. 1 according to manufacturer a of the related art;
fig. 3 is a schematic diagram of a module pin configured for the first socket 110 of fig. 1 according to manufacturer B of the related art;
FIG. 4 is a schematic diagram of an overall software system architecture of an intelligent socket according to the related art;
FIG. 5 is a flow chart of a method of controlling an intelligent socket according to one embodiment of the present invention;
FIG. 6 is a schematic diagram of an overall software system architecture of an intelligent patch panel according to an alternative embodiment of the present invention;
FIG. 7 is a schematic diagram of an application interface for controlling a smart power strip in accordance with an alternate embodiment of the present invention;
fig. 8 is a block diagram of a control apparatus of an intelligent socket according to an embodiment of the present invention;
fig. 9 is a block diagram of a control device of an intelligent socket according to an alternative embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with one embodiment of the present invention, there is provided an embodiment of a control method for an intelligent socket, where the steps illustrated in the flowchart of the drawings may be performed in a computer system, such as a set of computer-executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated or described herein.
The method embodiment can be executed in an intelligent socket or similar intelligent household equipment. For example, operating on an intelligent socket, the intelligent socket may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), or a programmable logic device (FPGA)), etc., and memory for storing data. Optionally, the intelligent socket may further include a transmission device for a communication function and an input/output device. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the intelligent socket. For example, the smart socket may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the control method of the intelligent socket in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer program stored in the memory, so as to implement the control method of the intelligent socket. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory remotely located from the processor, and these remote memories may be connected to the smart socket via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of such networks may include wireless networks provided by communication providers of intelligent banks. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a control method operating in the intelligent socket is provided, and fig. 5 is a flowchart of a control method of an intelligent socket according to an embodiment of the present invention, as shown in fig. 5, the method includes the following steps:
step S52, receiving a control instruction from the terminal, wherein the information carried in the control instruction at least comprises: the method comprises the following steps of (1) identifying a socket to be controlled in an intelligent socket;
and S54, adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Through the steps, the control instruction from the terminal can be received, the mode that the information carried in the control instruction at least comprises the socket identification to be controlled in the intelligent socket is adopted, the working state of the socket corresponding to the socket identification to be controlled is adjusted through the configuration file, the purpose that the intelligent terminal can self-adaptively control various types of intelligent socket by writing the configuration file into a specific storage area (such as a file system) of the intelligent socket in advance is achieved, the technical effects of reducing the operation complexity and improving the development efficiency are achieved, and the technical problems that in the related technology, the operation complexity is high and the development efficiency is low due to the fact that adaptive firmware needs to be separately developed for different types of socket are solved.
The terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet device (MID for short), and a PAD. According to the actual application scenario, the terminal can determine the sending mode of the control instruction according to whether the terminal and the intelligent socket are located in the same network environment (for example, in the same local area network). If the terminal and the intelligent socket are located in the same network environment, the terminal can directly send a control instruction to the intelligent socket. If the terminal and the intelligent socket are not located in the same network environment, the terminal needs to send a control instruction to the server first, and then the server forwards the control instruction to the intelligent socket.
Optionally, the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
Table 1 is an exemplary content contained in a configuration file, which may include, but is not limited to, as shown in table 1: socket type, relay Identification (ID), and pin function definition.
TABLE 1
NO. Type of socket Relay ID Pin function definition Socket ID
1 One way socket (SWITCH _ 01) Relay110 PIN110 (value is 0 or 1, which indicates whether the PIN is electrified) First socket 110
2 One way socket (SWITCH _ 01) Relay120 PIN120 (value is 0 or 1, which indicates whether the PIN is electrified) Second socket 120
3 One way socket (SWITCH _ 01) Relay130 PIN130 (value is 0 or 1, which indicates whether the PIN is electrified) Third socket 130
4 One way socket (SWITCH _ 01) Relay140 PIN140 (value is 0 or 1, which indicates whether the PIN is electrified) Fourth socket 140
It should be noted that table 1 above is only an exemplary illustration for adjusting the operating state of the outlet corresponding to the outlet identifier to be controlled according to the configuration file after the configuration file is written into the intelligent socket shown in fig. 1, and does not contain all contents of the configuration file.
Optionally, the configuration file is set in a file system area of the memory chip.
As mentioned above, the memory space of a chip such as FLASH may be generally divided into three areas, BOOT, application, and FILETYS. The BOOT and Application further constitute the firmware in the FLASH memory space. The firmware is typically located in a memory chip of the smart device, such as: an Electrically Erasable Programmable Read Only Memory (EEPROM) chip and a FLASH chip. The user can upgrade the firmware through a specific refresh program. Generally, the software that serves as the most basic and bottom layer of an electronic product is called firmware, for example: a Basic Input/output System (BIOS) on the main board of the computer. The firmware may be referred to as a COMBO's operating system, which may include, but is not limited to: the device comprises a driving component, a control component, a decoding component, a transmission component and a detection component. The content stored in FILESYS can include, but is not limited to, system parameters, light control status, wi-Fi information of connection.
In an alternative embodiment, fig. 6 is a schematic diagram of an overall software system structure of an intelligent socket according to an alternative embodiment of the present invention, as shown in fig. 6, on the basis of fig. 4, by writing a configuration file into FILESYS, after the intelligent socket receives a control instruction, the intelligent socket parses a socket identifier to be controlled in the intelligent socket from the control instruction, and then adjusts an operating state of a socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, in step S54, adjusting the operating state of the socket according to the configuration file may include performing the following steps:
step S541, searching pins corresponding to the socket identification to be controlled and relay identifications corresponding to the pins from the configuration file;
step S542, controlling the corresponding relay to be switched on according to the relay identifier, and adjusting the working state of the socket from a disconnected state to a switched-on state; or, the corresponding relay is controlled to be switched off according to the relay identifier, and the working state of the socket is adjusted from the on state to the off state.
In an optional embodiment, the main interaction flow of the intelligent socket and the terminal is as follows:
firstly, the intelligent socket executes power-on operation by running BOOT;
secondly, executing distribution network operation in Application through the guiding function of BOOT, and binding APP on the user intelligent terminal; the method comprises the steps that an intelligent terminal APP sends a control instruction (STRUC 1) to a SERVER (SERVER), the control instruction (STRUC 1) is distributed to a router through the SERVER (SERVER), and Application is informed to search a corresponding configuration file in a file system so as to control a PIN PIN and a relay corresponding to the PIN PIN.
In order to realize issuing a control instruction to the intelligent extension socket, a user needs to install a corresponding APP on a terminal. Fig. 7 is a schematic diagram of an application program interface for controlling an intelligent socket according to an alternative embodiment of the present invention, and as shown in fig. 7, a user may select a socket to be used on the application program interface according to actual use requirements. For example: if the user wishes to charge the smartphone using the second socket 120, the user may select the second socket 120 by performing a touch operation (e.g., a click operation) on the application interface. At this moment, the terminal can issue a control instruction to the intelligent socket. After receiving the control command, the smart socket may resolve the socket identifier of the second socket 120 from the control command. Then, the smart socket looks up the PIN120 corresponding to the socket identification of the second socket 120 and the Relay identification Relay120 corresponding to the PIN120 from the configuration file. Because the smart strip should be in the off state before charging the smart phone, the smart strip needs to control the corresponding Relay to be turned on according to the Relay identifier Relay120, and adjust the working state of the second socket 120 from the off state to the on state. Similarly, if the charging of the smart phone is finished, the terminal can also issue a control instruction to the smart socket under the touch operation of the user. After receiving the control command, the smart socket may resolve the socket identifier of the second socket 120 from the control command. The smart socket then looks up from the configuration file for the PIN120 corresponding to the socket identification of the second socket 120 and the Relay identification Relay120 corresponding to the PIN 120. Because the smart strip is still in the on state after charging the smart phone, the smart strip needs to control the corresponding Relay to be turned off according to the Relay identifier Relay120, and the working state of the second socket 120 is adjusted from the on state to the off state.
In another optional example, if the user wishes to charge the smartphone using the second socket 120 and the tablet computer using the third socket 130, the user may select the second socket 120 and the third socket 130 simultaneously by performing a touch operation (e.g., a click operation) on the application interface. At this moment, the terminal can issue a control instruction to the intelligent socket. After receiving the control command, the smart socket may parse the socket identifier of the second socket 120 and the socket identifier of the third socket 130 from the control command. Then, the smart socket searches the configuration file for the PIN120 corresponding to the socket identifier of the second socket 120, the Relay identifier Relay120 corresponding to the PIN120, the PIN130 corresponding to the socket identifier of the third socket 130, and the Relay identifier Relay130 corresponding to the PIN 130. Since the smart socket is supposed to be in the off state before charging the smart phone and the tablet computer, the smart socket needs to control the corresponding Relay to be turned on according to the Relay identifier Relay120, adjust the working state of the second socket 120 from the off state to the on state, and control the corresponding Relay to be turned on according to the Relay identifier Relay130, and adjust the working state of the third socket 130 from the off state to the on state. Similarly, if the smart phone is charged and the tablet computer is not charged, the terminal can also issue a control instruction to the smart socket under the touch operation of the user. After receiving the control command, the smart socket may resolve the socket identifier of the second socket 120 from the control command. Then, the smart socket looks up the PIN120 corresponding to the socket identification of the second socket 120 and the Relay identification Relay120 corresponding to the PIN120 from the configuration file. Because the smart socket is still in the on state after charging the smart phone, the smart socket needs to control the corresponding Relay to be turned off according to the Relay identifier Relay120, and the working state of the second socket 120 is adjusted from the on state to the off state.
Optionally, the information carried in the control instruction may further include: the time information, in step S54, adjusting the operating state of the socket according to the configuration file may include performing the steps of:
step S543, determining an adjustment opportunity according to the time information, wherein the time information includes one of: timing information, countdown information;
and step S544, if the adjusting time is met, adjusting the working state of the socket according to the configuration file.
In the control command, besides the socket identifier to be controlled, the control command can also carry time information. The time information includes one of: timing information, countdown information. Timing controls and countdown controls may be added to the application interface as shown in fig. 7. The user can set the turn-on time of the second socket 120 by performing a touch operation (e.g., a click operation) on the application interface. The user can set the turn-on time by means of a timing control, for example: the timing control is used for setting 23 o' clock at night to connect the second socket 120 to charge the smart phone. Thus, the smart socket, after parsing the timing information from the control command, will compare the timing information with the current time, and if the timing information does not arrive, the second outlet 120 is still in the off state. When 23 o' clock arrives at night, the intelligent socket bank needs to control the corresponding Relay to be switched on according to the Relay identifier Relay120, and the working state of the second socket 120 is adjusted from the off state to the on state.
Similarly, the user may also set the turn-on time through a countdown control, such as: the countdown control is used for setting that the second socket 120 is switched on to charge the smartphone after 1 hour counted from the current moment. Thus, after analyzing the timing information from the control command, the smart socket compares the timing information with the current time, and if the timing information does not arrive, the second outlet 120 is still in the off state. When the countdown ending time of 1 hour is reached, the intelligent socket needs to control the corresponding Relay to be switched on according to the Relay identifier Relay120, and the working state of the second socket 120 is adjusted from the off state to the on state.
Optionally, the method may further include the following steps:
and step S55, if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file, refusing to execute the control instruction, and feeding back abnormal prompt information to the terminal.
In the actual application process, all control instructions which are not sent to the intelligent socket by the terminal can not be executed by the intelligent socket. If the intelligent socket finds that the control instruction carries abnormal information after analyzing the control instruction, the intelligent socket refuses to execute the control instruction and feeds back abnormal prompt information to the terminal. For example: if the socket that current setting on the intelligent row of inserting includes: a first receptacle 110, a second receptacle 120, a third receptacle 130, and a fourth receptacle 140. However, the sockets displayed on the application interface due to the occurrence of a specific situation may also be the sockets in which the fifth socket 150, the sixth socket 160, and the like do not actually exist, in addition to the first socket 110, the second socket 120, the third socket 130, and the fourth socket 140. If the user wishes to charge the smartphone using the fifth socket 150, the user may select the fifth socket 150 by performing a touch operation (e.g., a click operation) on the application interface. At this moment, the terminal can issue a control instruction to the intelligent socket. After receiving the control command, the smart socket may parse the socket identifier of the fifth socket 150 from the control command. However, the smart socket does not find configuration information from the configuration file that is associated with the fifth outlet 150. At this time, the intelligent socket will refuse to execute the control command, and feed back an abnormal prompt message (e.g., the fifth socket 150 is not found) to the terminal.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a control device for an intelligent patch panel is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of which is already given is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a control device of an intelligent socket according to an embodiment of the present invention, and as shown in fig. 8, the device includes: a receiving module 10, configured to receive a control instruction from a terminal, where information carried in the control instruction at least includes: the intelligent socket is provided with a socket mark to be controlled; and the control module 20 is configured to adjust the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
Optionally, the configuration file is set in a file system area of the memory chip.
Optionally, the control module 20 comprises: a searching unit (not shown in the figure) for searching the pins corresponding to the socket identifiers to be controlled and the relay identifiers corresponding to the pins from the configuration file; a control unit (not shown in the figure) for controlling the corresponding relay to be switched on according to the relay identifier, and adjusting the working state of the socket from the off state to the on state; or, the corresponding relay is controlled to be switched off according to the relay identifier, and the working state of the socket is adjusted from the on state to the off state.
Optionally, the information carried in the control instruction further includes: time information, the control module 20 is configured to determine an adjustment opportunity according to the time information, where the time information includes one of: timing information, countdown information; and under the condition that the adjusting time is met, adjusting the working state of the socket according to the configuration file.
Optionally, fig. 9 is a block diagram of a control device of an intelligent socket according to an optional embodiment of the present invention, and as shown in fig. 9, the device includes all modules shown in fig. 8, and the device further includes: and the processing module 30 is configured to refuse to execute the control instruction and feed back the abnormal prompt information to the terminal if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
An embodiment of the present invention further provides a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the method embodiments described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a control instruction from a terminal, wherein information carried in the control instruction at least comprises: the intelligent socket is provided with a socket mark to be controlled;
and S2, adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, in this embodiment, the storage medium may include but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a control instruction from a terminal, wherein information carried in the control instruction at least comprises: the intelligent socket is provided with a socket mark to be controlled;
and S2, adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described in detail in a certain embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple 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, units or modules, and may be in an electrical 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 position, or may be distributed on a plurality of 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 invention 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 invention may be embodied in the form of 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 invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A control method of an intelligent socket is characterized by comprising the following steps:
receiving a control instruction from a terminal, wherein information carried in the control instruction at least comprises: the method comprises the following steps of (1) identifying a socket to be controlled in an intelligent socket; adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file;
wherein adjusting the operating state of the socket according to the configuration file comprises: searching a pin corresponding to the socket identifier to be controlled and a relay identifier corresponding to the pin from the configuration file; adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the relay identifier;
wherein the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
2. The method of claim 1, wherein adjusting the operating state of the socket corresponding to the socket identifier to be controlled according to the relay identifier comprises:
controlling the corresponding relay to be switched on according to the relay identifier, and adjusting the working state of the socket from a switching-off state to a switching-on state; or controlling the corresponding relay to be switched off according to the relay identifier, and adjusting the working state of the socket from a switching-on state to a switching-off state.
3. The method of claim 1, wherein the information carried in the control command further comprises: the time information and the adjustment of the working state of the socket according to the configuration file comprise:
determining an adjustment opportunity according to the time information, wherein the time information comprises one of: timing information, countdown information;
and under the condition that the adjusting time is met, adjusting the working state of the socket according to the configuration file.
4. The method of claim 1, further comprising:
and if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file, refusing to execute the control instruction, and feeding back abnormal prompt information to the terminal.
5. The method of claim 1, wherein the configuration file is located in a file system area of the memory chip.
6. The utility model provides a controlling means of row is inserted to intelligence which characterized in that includes:
a receiving module, configured to receive a control instruction from a terminal, where information carried in the control instruction at least includes: the intelligent socket is provided with a socket mark to be controlled;
the control module is used for adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the configuration file;
wherein the control module comprises: the searching unit is used for searching a pin corresponding to the socket identifier to be controlled and a relay identifier corresponding to the pin from the configuration file; the control unit is used for adjusting the working state of the socket corresponding to the socket identifier to be controlled according to the relay identifier;
wherein the configuration file comprises: socket type information, relay identification information, pin function definition information, socket identification information, and correspondence between different types of information.
7. The device according to claim 6, wherein the control unit is configured to control the corresponding relay to be turned on according to the relay identifier, and adjust the working state of the socket from an off state to an on state; or controlling the corresponding relay to be switched off according to the relay identifier, and adjusting the working state of the socket from a switching-on state to a switching-off state.
8. The apparatus of claim 6, wherein the information carried in the control command further comprises:
the control module is configured to determine an adjustment opportunity according to the time information, where the time information includes one of: timing information, countdown information; and under the condition that the adjusting opportunity is met, adjusting the working state of the socket according to the configuration file.
9. The apparatus of claim 6, further comprising:
and the processing module is used for refusing to execute the control instruction and feeding back abnormal prompt information to the terminal if the socket corresponding to the socket identifier to be controlled cannot be determined according to the configuration file.
10. A storage medium, in which a computer program is stored, wherein the computer program is configured to execute the control method of an intelligent socket of any one of claims 1 to 5 when running.
11. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the control method of the intelligent socket of any one of claims 1 to 5 when running.
12. An intelligent socket comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of controlling the intelligent socket of any one of claims 1 to 5.
CN201910872946.XA 2019-09-16 2019-09-16 Control method and device of intelligent power strip, processor and intelligent power strip Active CN110597205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910872946.XA CN110597205B (en) 2019-09-16 2019-09-16 Control method and device of intelligent power strip, processor and intelligent power strip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910872946.XA CN110597205B (en) 2019-09-16 2019-09-16 Control method and device of intelligent power strip, processor and intelligent power strip

Publications (2)

Publication Number Publication Date
CN110597205A CN110597205A (en) 2019-12-20
CN110597205B true CN110597205B (en) 2023-02-03

Family

ID=68859805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910872946.XA Active CN110597205B (en) 2019-09-16 2019-09-16 Control method and device of intelligent power strip, processor and intelligent power strip

Country Status (1)

Country Link
CN (1) CN110597205B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235584B (en) * 2013-04-26 2016-02-10 中国科学院微电子研究所 Intelligent home furnishing control method, device, MCU and system
CN104142644A (en) * 2014-07-22 2014-11-12 北京纽曼腾飞科技有限公司 Socket control methods and device
CN104678851B (en) * 2015-01-29 2018-03-16 小米科技有限责任公司 Smart jack method of controlling switch and device
CN105467880A (en) * 2015-12-18 2016-04-06 小米科技有限责任公司 Method and apparatus for controlling intelligent socket work state
CN105955097A (en) * 2016-04-15 2016-09-21 北京小米移动软件有限公司 Timing management method, timing management device and mobile terminal
CN106773931A (en) * 2016-12-06 2017-05-31 杭州联络互动信息科技股份有限公司 A kind of insert row control method, device and electronic equipment, system
CN106527166B (en) * 2016-12-20 2020-02-07 北京小米移动软件有限公司 Control method and device of electric appliance
CN106848772B (en) * 2017-01-20 2019-12-17 奇酷互联网络科技(深圳)有限公司 Intelligent socket, socket controller, control method and system
CN107807536A (en) * 2017-11-06 2018-03-16 广西富迈科技有限公司 Intelligent control method, insert row terminal and storage medium
CN109725546A (en) * 2018-12-29 2019-05-07 中商物联行(广州)商务有限公司 Socket management-control method, socket control device and socket managing and control system

Also Published As

Publication number Publication date
CN110597205A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
EP3171484B1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
US10412207B2 (en) Mobile terminal, power adapter, and upgrade method thereof
CN106411667A (en) Network chip based smart home multi-cloud control method and system
CN208094569U (en) A kind of intelligent domestic system based on narrowband Internet of Things
CN107765592B (en) Equipment control method and device and terminal equipment
CN103425506A (en) Powering off method, starting up method and communication terminal
CN105786573A (en) Method and system for rapidly upgrading ZigBee controller in smart home
CN105430702A (en) Network switching method and device, and communication terminal
CN110608521A (en) Air conditioner, air conditioner system and control method thereof
CN105992317A (en) Wireless communication module management method and wireless communication module management apparatus
CN107306443A (en) A kind of information processing method and terminal
CN114019817A (en) Control method and control device of intelligent household equipment and Internet of things system
CN103559910A (en) System and method applied in programming unit to realize intelligent switching of programmed chip timing
EP3422655A1 (en) Method for managing address of meter device, and acquisition terminal and meter device
WO2017049549A1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
CN111756858A (en) Remote development processing system, method and device of embedded equipment
CN110597205B (en) Control method and device of intelligent power strip, processor and intelligent power strip
CN109362130A (en) MIFI device systems and method
CN204424629U (en) Smart jack
CN107734496A (en) Mobile terminal searches network control method, device and mobile terminal
CN110850737A (en) Socket and timing method, system and computer readable storage medium
CN107037866B (en) Terminal reset circuit and terminal
CN110687910A (en) Equipment control method and device, storage medium and lower computer
CN202095106U (en) Third-generation (3G) router with multimode data card smart access system
CN111610995B (en) Device firmware upgrading method and device, electronic device and storage medium

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