Detailed Description
In order to make the technical solutions of the present invention better understood, 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 sequences other 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 method for processing control instructions, it is noted that 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 that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
The method embodiment can be executed in a physical network platform module. The physical network platform module can be applied to intelligent air conditioners, intelligent refrigerators, intelligent microwave ovens or similar physical network platform equipment. Fig. 1 is a schematic structural diagram of a control instruction processing system according to an embodiment of the present invention, and as shown in fig. 1, the control instruction processing system includes: acontrol terminal 100 and a physicalnetwork platform module 200. And the control terminal is connected to any serial port of the plurality of serial ports on the physical network platform module through a serial port line.
Thecontrol terminal 100 may be a terminal device such as a smart phone (e.g., Android phone, iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a personal computer, etc. The physicalnetwork platform module 200 may include: listening component, boot component, first serial port 201, second serial port 202, third serial port 203 … nth serial port 20N. Thecontrol terminal 100 may select any serial port from the first serial port 201, the second serial port 202, and the third serial port 203 …, and the nth serial port 20N performs control instruction interaction in the BOOT mode with the physicalnetwork platform module 200.
On this basis, physicalnetwork platform module 200 may include one or more processors (which may include, but are not limited to, a processing device such as 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)), and memory for storing data. Optionally, the above physical network platform module may further include a transmission device for a communication function. It will be understood by those skilled in the art that the above structural description is only illustrative and not limiting to the structure of the above physical network platform module. For example, the physical network platform module 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 computer programs corresponding to the processing method of the control instruction in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the processing method of the control instruction. 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 physical network platform module through 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. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the physical network platform module. 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.
Optionally, the monitoring component is configured to monitor a plurality of serial ports simultaneously; if the detection instruction is monitored from the current serial port, determining that the control terminal is connected to the current serial port through a serial port line, and determining that the physical network platform module performs control instruction interaction in a guide mode with the control terminal through the current serial port; and monitoring a control instruction from the current serial port.
Optionally, the guidance component is configured to parse the control instruction, and determine a control object, where the control object includes: setting firmware, setting operating system parameters and setting memory space; and executing corresponding control operation based on the control object.
Optionally, the boot component is further configured to perform a read and/or update operation on the boot program firmware when the control content includes the firmware setting; performing a read and/or update operation on the application firmware; and performing read and/or update operations on the radio frequency driver firmware.
Optionally, the guidance component is further configured to, when the control content includes an operating system parameter setting, perform a read operation on the operating system parameter setting; performing an update operation on the operating system parameter settings; and performing an erase operation on the operating system parameter settings.
Optionally, the guidance component is further configured to, when the control content includes a memory space setting, perform a read operation on data content stored in a specified memory space; executing updating operation on the data content stored in the appointed memory space; executing erasing operation on the data content stored in the designated memory space; and executing query operation on the memory address allocation list.
Optionally, an internet of things access operating system based on a microcontroller is run on the physical network platform module, wherein a system architecture of the internet of things access operating system includes: the system comprises an application layer framework, a hardware configuration framework and a cloud service access framework.
In an optional embodiment, the operating system applied in the physical network platform module may be an internet of things access operating system based on a microcontroller, and is a software platform for developing internet of things devices. The operating system is internally provided with a real-time operating system kernel facing the equipment of the Internet of things, and is particularly suitable for running on the micro-control equipment with limited resources. The operating system comprises a bottom chip driver, a wireless network protocol, a radio frequency control technology and an application framework. In addition, the operating system also comprises a network communication protocol stack, a security algorithm and protocol, a hardware abstraction layer, a programming tool and other software function packages essential for developing the Internet of things.
Fig. 2 is a schematic diagram of an operating system architecture applied in a physical network platform module according to an alternative embodiment of the present invention, and as shown in fig. 2, the operating system architecture may include: the system comprises an application layer framework, a hardware configuration framework and a cloud service access framework. In the application layer framework, a special operation flow can be realized by setting and directly calling an Application Program Interface (API). In the hardware configuration framework, connection parameters can be quickly and simply modified in the board level configuration by changing the connection mode (for example, pin modification) of the hardware device. In the cloud service access framework, the cloud access protocol component can provide a simple and effective application framework for the application program, and the application program can quickly realize the application function only by realizing the part related to the application.
Optionally, the boot program provided by the boot component is a pre-program that runs before the operating system kernel or user application starts.
The boot component on the physical network platform module (which is responsible for providing the boot program) may be viewed as a piece of pre-boot program that runs before the operating system kernel or user application starts. Hardware equipment can be initialized and a mapping chart of a memory space can be established by running a bootstrap program, so that the software and hardware environment of the whole operating system is brought into a proper running state, and a good running environment is provided for finally calling an operating system kernel or a user application program.
In addition, the control terminal may include a display device. The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the control terminal. In some embodiments, the control terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on the touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for processing a control instruction running on the above-mentioned physical network platform module is provided, and fig. 3 is a flowchart of a method for processing a control instruction according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
step S32, in a boot mode, monitoring a control instruction sent by a control terminal to a current serial port, wherein the current serial port is any one of a plurality of serial ports pre-configured on a physical network platform module, and the plurality of serial ports are all used for communication interaction between the physical network platform module and the control terminal;
and step S34, executing corresponding control operation according to the control command.
Through the steps, the technical effects that the control instruction sent by the control terminal to the current serial port can be monitored in the guide mode, the current serial port is any one of a plurality of serial ports which are pre-configured on the physical network platform module, and the plurality of serial ports are all used for the communication interaction between the physical network platform module and the control terminal, the control instruction executes corresponding control operation, the control terminal can flexibly select any one of the plurality of serial ports which are pre-configured on the physical network platform module to carry out the control instruction interaction in the BOOT mode with the physical network platform module are achieved, the limitation that only a single fixed serial port can be used for carrying out the control instruction interaction between the physical network platform module and the control terminal in the guide mode is eliminated, the usability is strong, and the physical network platform modules with different mechanical structures can be flexibly adapted, and then solved the physics net platform module that provides among the correlation technique under the guide mode, the in-process that communicates with control terminal can only use single fixed serial ports to carry out control command interaction usually, leads to physics net platform module control process to have obvious limitation, its easy-to-use relatively poor technical problem.
Optionally, in step S32, monitoring the control command sent by the control terminal to the current serial port may include the following steps:
step S321, monitoring a plurality of serial ports simultaneously by adopting a monitoring component;
step S322, if the detection instruction is monitored from the current serial port, determining that the control terminal is connected to the current serial port through a serial port line, and determining that the physical network platform module performs control instruction interaction in a guide mode with the control terminal through the current serial port;
and step S323, monitoring a control instruction from the current serial port.
Under the BOOT mode, the physical network platform module can monitor a plurality of serial ports simultaneously through the monitoring component. The control terminal can select any one of the plurality of serial ports which are configured in advance on the physical network platform module according to actual conditions and perform control instruction interaction in the BOOT mode with the physical network platform module. Before sending the control instruction to the physical network platform module, the control terminal can send a detection instruction to a serial port (namely a current serial port) connected with the control terminal through a serial port line, so that the monitoring component can monitor that the control terminal is connected to the current serial port through the serial port line and determine that the physical network platform module conducts control instruction interaction in a guide mode with the control terminal through the current serial port. Then, the control terminal can successively send control instructions to the current serial port, so as to control the physical network platform module to execute corresponding control operation.
Optionally, in step S34, executing the corresponding control operation according to the control instruction may include the following steps:
step S341, analyzing the control instruction, and determining a control object, where the control object includes: setting firmware, setting operating system parameters and setting memory space;
in step S342, a corresponding control operation is performed based on the control object.
The physical network platform module can determine a control object by analyzing the control instruction. The control objects may include, but are not limited to: firmware setting, operating system parameter setting and memory space setting. Then, the guide component on the physical network platform module executes the corresponding control operation based on the control object.
Alternatively, in step S342, when the control content includes the firmware setting, performing the corresponding control operation based on the control object may include performing the steps of:
step S3420, performing a read and/or update operation on the boot firmware;
the control terminal may perform a read and/or update operation on the boot firmware on the physical network platform module by using a control instruction having a command code of 0 and a command name of BOOTUPDATA. That is, the control command can not only read the boot firmware and save the read boot firmware in the specified file directory, but also update the read boot firmware.
Step S3421, performing a read and/or update operation on the application firmware;
the control terminal may perform a read and/or update operation on the application firmware on the physical network platform module by using a control instruction with a command code of 1 and a command name of FWUPDATA. That is, not only can the application firmware be read and saved under the specified file directory by the control command, but also the user can select the application firmware to be updated from the application firmware and click to confirm, so as to complete the updating operation of the application firmware.
In step S3422, a read and/or update operation is performed on the rf driver firmware.
The control terminal may perform a read and/or update operation on the rf driver firmware on the physical network platform module by using a control command with a command code of 2 and a command name of driver update. That is, through the control command, not only can the rf driving firmware be read and saved to the designated file directory, but also the user can select the rf driving firmware to be updated and click to confirm, so as to complete the update operation of the rf driving firmware.
Alternatively, when the control content includes the operating system parameter setting, performing the corresponding control operation based on the control object in step S342 may include performing the steps of:
step S3423, performing a read operation on the operating system parameter setting;
step S3424, performing an update operation on the operating system parameter setting;
in step S3425, an erase operation is performed on the operating system parameter settings.
The control terminal may perform at least one of a read operation, an update operation, and an erase operation on the operating system parameter set on the physical network platform module by using a control instruction having a command code of 3 and a command name of PARAUPDATE. That is, through the control command, not only can the operating system parameters be read and saved in the specified file directory, but also the user can select the operating system parameters to be updated from the operating system parameters and click to confirm, so as to complete the updating operation of the operating system parameters. In addition, the user can also select the operating system parameters needing to be erased from the operating system parameters and click the confirmation to complete the erasing operation of the operating system parameters.
Optionally, in step S342, when the control content includes the memory space setting, executing the corresponding control operation based on the control object may include executing steps of:
step S3426, performing a read operation on the data content stored in the designated memory space;
step S3427, performing an update operation on the data content stored in the specified memory space;
step S3428, performing an erasing operation on the data content stored in the designated memory space;
in step S3429, a query operation is performed on the memory address allocation list.
The control terminal may perform at least one of a read operation, an update operation, and an erase operation on data contents stored in a designated memory space on the physical network platform module by using a control command having a command code of 4 and a command name of flag. That is, by the control command, not only the data contents stored in the specified memory space can be read and the read data contents stored in the specified memory space can be saved in the specified file directory, but also the user can select the data contents stored in the specified memory space to be updated from the data contents stored in the plurality of memory spaces and click to confirm, so as to complete the updating operation of the data contents stored in the specified memory space. In addition, the user can also select the data content stored in the designated memory space which needs to be erased from the data contents stored in the plurality of designated memory spaces and click to confirm, so as to complete the erasing operation of the data content stored in the designated memory space.
Further, the control terminal may also perform a query operation on the memory address allocation list on the physical network platform module by using a control instruction with a command code of 5 and a command name of memomomap.
In addition to the above control instructions, the control terminal may run the application on the physical network platform module by using the control instruction with the command code of 6 and the command name of BOOT. The control terminal may also perform a restart operation on the physical network platform module by using a control instruction with a command code of 7 and a command name of REBOOT.
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 instruction processing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are 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. 4 is a block diagram of a control instruction processing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes: the monitoring module 10 is used for monitoring a control instruction sent by the control terminal to a current serial port in a boot mode, wherein the current serial port is any one of a plurality of serial ports which are pre-configured on the physical network platform module, and the plurality of serial ports are all used for communication interaction between the physical network platform module and the control terminal; and the processing module 20 is configured to execute a corresponding control operation according to the control instruction.
Optionally, the listening module 10 includes: a first monitoring unit (not shown in the figure) for monitoring the plurality of serial ports simultaneously by using the monitoring component; a first determining unit (not shown in the figure) configured to determine that the control terminal is connected to the current serial port through a serial port line if the detection instruction is monitored from the current serial port, and determine that the physical network platform module performs control instruction interaction in a boot mode with the control terminal via the current serial port; and the second monitoring unit (not shown in the figure) is used for monitoring the control command from the current serial port.
Optionally, the processing module 20 comprises: a second determining unit (not shown in the figure), configured to parse the control instruction, and determine a control object, where the control object includes: setting firmware, setting operating system parameters and setting memory space; and a processing unit (not shown in the figure) for performing a corresponding control operation based on the control object.
Optionally, when the control content includes a firmware setting, a processing unit (not shown in the figure) for performing a read and/or update operation on the boot firmware; performing a read and/or update operation on the application firmware; and performing read and/or update operations on the radio frequency driver firmware.
Alternatively, when the control content includes operating system parameter settings, a processing unit (not shown in the figure) for performing a read operation on the operating system parameter settings; performing an update operation on the operating system parameter settings; and performing an erase operation on the operating system parameter settings.
Optionally, when the control content includes a memory space setting, a processing unit (not shown in the figure) for performing a read operation on the data content stored in the specified memory space; executing updating operation on the data content stored in the appointed memory space; executing erasing operation on the data content stored in the designated memory space; and executing query operation on the memory address allocation list.
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 respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, monitoring a control instruction sent by the control terminal to a current serial port in a boot mode, wherein the current serial port is any one of a plurality of serial ports pre-configured on the physical network platform module, and the plurality of serial ports are all used for communication interaction between the physical network platform module and the control terminal;
and S3, executing corresponding control operation according to the control command.
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, monitoring a control instruction sent by the control terminal to a current serial port in a boot mode, wherein the current serial port is any one of a plurality of serial ports pre-configured on the physical network platform module, and the plurality of serial ports are all used for communication interaction between the physical network platform module and the control terminal;
and S3, executing corresponding control operation according to the control command.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, 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 descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
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 place, 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 or optical disk, and other 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.