Background
The all-in-one device generally provides a device function of a built-in Windows system by integrating an OPS (Open plug capable Specification) computer, and the OPS computer as a built-in PC signal source can be displayed on a display screen of the all-in-one device. That is, the dual system of the all-in-one machine device includes the android system of the all-in-one machine device itself and the Windows system of the OPS computer built in.
Generally, after the all-in-one machine is started, a Windows system of an OPS computer needs to be started in a linkage manner; on the contrary, when the all-in-one machine device is closed, the Windows system of the OPS computer needs to be closed first, and then the all-in-one machine device needs to be closed.
The switch machine control related interfaces of the OPS computer comprise three interfaces: a power state detection interface, a computer access state detection interface and a startup and shutdown control interface. The all-in-one machine equipment uses the three interfaces to control the on-off of the OPS computer. Meanwhile, the standard interface standard of the OPS computer defines: when the level value of the power state detection interface is high level, the OPS computer is in a shutdown state; otherwise, the OPS computer is in a power-on state; when the level value of the computer access state detection interface is a low level, the OPS computer accesses the all-in-one machine equipment; otherwise, the OPS computer is not connected to the all-in-one machine equipment; when the level value of the power on/off control interface is low and lasts for more than 0.5s, the OPS computer is switched from the power-on state to the power-off state or from the power-off state to the power-on state. It can be known from the above standard interface specification definition that, when controlling the on/off of the OPS computer, the on/off state of the OPS computer needs to be determined depending on the level value of the power state detection interface, and then the state switching of the OPS computer is realized through the on/off control interface.
However, in the actual market, for many OPS computer devices, the interface specification is defined as follows: when the level value of the power state detection interface is high level, the OPS computer is in a starting state; otherwise, the OPS computer is in a power-off state. Therefore, because the interface specification definition of the OPS computer equipment on the market is inconsistent with the standard interface specification definition of the OPS computer in the all-in-one machine equipment, the judgment of the on-off state of the OPS computer by the all-in-one machine equipment is wrong, and the all-in-one machine equipment cannot be started or closed.
For example, after the all-in-one machine device is turned on, the all-in-one machine device detects that the level value of the power state detection interface is a high level, the all-in-one machine device considers that the OPS computer is in a shutdown state, and the OPS computer is switched from the shutdown state to a startup state through the startup and shutdown control interface; however, in practice, the power state detection interface of the OPS computer device is not defined according to the standard interface specification of the OPS computer in the all-in-one machine device, that is: when the level value of the power state detection interface is high level, the OPS computer is in a starting state. Therefore, when the state of the OPS computer is switched over under the control of the on-off machine control interface in the all-in-one machine equipment, the OPS computer is switched over from the on state to the off state because the OPS computer is in the on state, and the all-in-one machine equipment cannot be started.
In the prior art, generally, before connecting an OPS computer device, a user needs to know the interface specification definition of the connected OPS computer device in advance, and then reconfigures according to a configuration interface provided by an all-in-one machine device, but the configuration process is complex, needs professional engineering personnel to implement, has a high operation threshold, and is not favorable for subsequent maintenance cost; in addition, all-in-one machine equipment manufacturers customize all-in-one machine equipment according to interface specification definitions of OPS computer equipment used by merchants, so that the software batch development is not facilitated, and the software development cost is even increased.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a method for controlling an OPS computer of an all-in-one machine device, which can solve the problems in the prior art that the on/off control configuration of the OPS computer by the all-in-one machine device is difficult, or the software of the all-in-one machine device is customized.
Another object of the present invention is to provide an OPS computer control device and a storage medium for an all-in-one machine, which can solve the problems of the prior art, such as difficulty in on/off control configuration of the all-in-one machine for an OPS computer, software customization of the all-in-one machine, and the like.
The invention also aims to provide a storage medium which can solve the problems that the on-off control configuration of an OPS computer by an all-in-one machine device is difficult, the software of the all-in-one machine device is customized and the like in the prior art.
One of the purposes of the invention is realized by adopting the following technical scheme:
the OPS computer control method of the all-in-one machine equipment comprises a power state detection interface, a computer access state detection interface and a startup and shutdown control interface; the all-in-one machine equipment is electrically connected with the OPS computer through a power state detection interface, a computer access state detection interface and a power on/off control interface respectively; the OPS computer control method comprises the following steps:
a configuration step: firstly, when the integrated machine equipment is started up for 4E00 th time or after the integrated machine equipment is restored to factory settings, the system enters an OPS channel; then obtaining OPS computer access all-in-one machine equipment according to the level value of the computer access state detection interface, obtaining the level value of the power state detection interface and assigning the level value of the power state detection interface to the on-off state attribute value set by the system after obtaining that the OPS computer is in an off state according to no signal in the OPS channel;
a starting-up control step: when the integrated machine equipment receives a starting-up instruction and starts up, firstly obtaining the OPS computer access integrated machine equipment according to the level value of the computer access state detection interface, then obtaining that the OPS computer is in a shutdown state according to the power state detection interface and the attribute value of the starting-up and shutdown states, and then sending the starting-up instruction to the OPS computer through the starting-up and shutdown control interface to control the starting-up of the OPS computer;
shutdown control: when the all-in-one machine device receives a closing instruction, the level value of the computer access state detection interface is firstly used for obtaining the OPS computer access all-in-one machine device, then the OPS computer is obtained to be in a starting state according to the power state detection interface and the starting and closing state attribute value, and after the closing instruction is sent to the OPS computer through the starting and closing machine control interface, the OPS computer is controlled to be closed, and then the all-in-one machine device is closed.
Furthermore, the all-in-one machine equipment is electrically connected with the OPS computer through the OPS daughter card; the all-in-one machine equipment is electrically connected with the OPS daughter card through a power state detection interface, a computer access state detection interface and a startup and shutdown control interface respectively; and the OPS daughter card is electrically connected with the OPS computer through a JAE interface.
Further, the JAE interface is an 80-pin JAE interface.
Further, the all-in-one machine equipment comprises an all-in-one machine mainboard, wherein the all-in-one machine mainboard is provided with a power state detection interface, a computer access state detection interface and a startup and shutdown control interface, and the all-in-one machine mainboard is electrically connected with the OPS daughter card through the power state detection interface, the computer access state detection interface, the startup and shutdown control interface respectively.
Further, the boot-up control step includes:
an access state detection step: after the all-in-one machine device receives the starting-up instruction and starts up, acquiring and judging whether the level value of the computer access state detection interface is a low level, if so, accessing the OPS computer to the all-in-one machine device, and executing the step S2; if not, ending;
shutdown state detection: acquiring and judging whether the level value of the power state detection interface is the same as the attribute value of the power-on and power-off state, if so, turning off the OPS computer, and executing the step S3; if not, ending;
a starting-up step: and when the level value of the on-off control interface is set to be low level and lasts for more than 0.5s, the OPS computer is started.
Further, the shutdown control step includes:
an access state detection step: when the all-in-one machine device receives a shutdown instruction, acquiring and judging that the level value of the computer access state detection interface is a low level, if so, accessing the OPS computer to the all-in-one machine device, and executing a startup state detection step; if not, closing the all-in-one machine equipment;
a step of detecting a starting state: acquiring and judging whether the level value of the power state detection interface is the same as the attribute value of the power-on and power-off state, if not, the OPS computer is in the power-on state, and executing the power-off step; if yes, closing the all-in-one machine equipment;
shutdown step: and when the level value of the on-off control interface is set to be at a low level and lasts for more than 0.5s, the OPS computer is shut down, and the all-in-one machine equipment is closed.
Further, the step of shutting down includes: and when the level value of the on-off control interface is set to be at a low level and lasts for more than 0.5s, the OPS computer is shut down, the level value of the power state detection interface is detected in real time, and when the level value of the power state detection interface is the same as the attribute of the on-off state system, the all-in-one machine equipment is shut down.
The second purpose of the invention is realized by adopting the following technical scheme:
the OPS computer control device of the all-in-one machine equipment comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the computer program is an OPS computer control program, and the processor executes the OPS computer control program to realize the steps of the OPS computer control method of the all-in-one machine equipment adopted by one of the purposes of the invention.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium which is a computer-readable storage medium having stored thereon a computer program which is an OPS computer control program that, when executed by a processor, realizes the steps of an OPS computer control method of an all-in-one machine device employed as one of the objects of the present invention.
Compared with the prior art, the invention has the beneficial effects that:
the invention is used for storing the level value of the power state detection interface of the OPS computer in the shutdown state when the integrated machine equipment is initialized to be started by setting the attribute value of the startup and shutdown state in the system in advance, therefore, in the on-off control of the all-in-one machine, the on-off state of the OPS computer is judged according to the acquired level value of the power state detection interface and the on-off state attribute value stored in the system, the invention can realize the on-off control of the OPS computer through the on-off control interface, and the on-off control of the OPS computer can be automatically configured without acquiring the corresponding relation between the power state detection interface of the OPS computer and the on-off state of the OPS computer in advance, thereby solving the problems of large configuration difficulty and the like when the control logic of the OPS computer needs to be manually configured in advance during the control of the OPS computer in the prior art, meanwhile, the customization problem of the all-in-one machine equipment is solved, and the software design cost of the all-in-one machine equipment is reduced.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The invention provides an OPS computer control method of all-in-one machine equipment, which can automatically configure the control logic of the on/off of an OPS computer after the all-in-one machine equipment integrates the OPS computer equipment, and does not need to know the corresponding relation between the level value of a power state detection interface of the OPS computer and the on/off state of the OPS computer in advance, so that software on the all-in-one machine equipment does not need to be customized, personalized customization is not needed according to specific OPS computer equipment, universality is realized, and the development cost and the equipment cost of the software are reduced to a certain extent.
As shown in fig. 1, the all-in-one device includes an all-in-one motherboard, and a Windows system of an android system and an OPS computer is integrated on the all-in-one motherboard. The all-in-one machine mainboard is electrically connected with the OPS computer through the OPS daughter card, and communicates with the OPS computer through the OPS daughter card, so that the on-off of the OPS computer is controlled.
The plug adapter of the OPS computer adopts JAE 80pin connector. That is, the OPS daughter card is electrically connected to the OPS computer through the JAE interface. The JAE interface is an 80pin (pin: pin interface) JAE interface (also called as an 80pin connector).
Preferably, three interfaces are arranged on the integrated machine mainboard: the power state detection interface (PWR _ STATUS), the computer access state detection interface (PB _ DET) and the power ON/off control interface (PS _ ON #). The power state detection interface is used for detecting the on-off state of the OPS computer; the computer access state detection interface is used for detecting the state of the OPS computer access all-in-one machine equipment; and the power on/off control interface is used for controlling the power on/off of the OPS computer.
Under normal conditions, when the all-in-one machine is started and shut down, the OPS computer needs to be linked to start and shut down. Namely: starting an OPS computer to start up after the all-in-one machine equipment is started up; when the all-in-one machine equipment is shut down, the OPS computer is shut down firstly, and then the all-in-one machine equipment is shut down. Therefore, after the all-in-one machine is started or before the all-in-one machine is shut down, the on-off state of the accessed OPS computer needs to be detected, and the on-off or shutdown of the OPS computer is controlled.
Wherein, for the all-in-one machine mainboard:
the computer access state detection interface is an input interface: when the all-in-one machine equipment is connected with an OPS computer, the level value of the computer access state detection interface is a low level; otherwise, it is high.
The startup and shutdown control interface is an output interface: and when the level value of the on-off control interface is low level and continuously reaches more than 0.5s, controlling the OPS computer to be turned on or turned off. Specifically, if the level value of the power on/off control interface is low and continuously reaches 0.5s when the OPS computer is in a power off state, the OPS computer is started; otherwise, the OPS computer is shut down.
The power state detection interface is an input interface, and the OPS computer is judged to be in a power-off state or a power-on state according to the power state detection interface. In general, the standard interface specification for OPS computers in all-in-one devices specifies: when the level value of the power state detection interface is high level, the OPS computer is in a shutdown state; otherwise, the system is in a starting state.
However, for some existing OPS computer devices, the interface specification definition is opposite to the standard interface specification of the OPS computer in the all-in-one machine device, and further, an error occurs in the process of controlling the on/off of the OPS computer by the all-in-one machine device, so that the all-in-one machine device cannot be turned on or off. Therefore, in order to solve the above technical problems, the present invention is implemented by using the following technical solutions: when the all-in-one machine equipment leaves a factory, a startup and shutdown state attribute value is predefined on the all-in-one machine mainboard in advance. The power-on/off state attribute value is used for configuring the power-on/off state of the OPS computer.
Preferably, the initial default value of the on-off state attribute value is unbown, which indicates that the system of the all-in-one machine device is not configured with the OPS power state value.
That is, when detecting the power-on state or the power-off state of the OPS computer, the power-on state or the power-off state of the OPS computer is determined according to the defined attribute value of the power-on state in the system, instead of the power state detection interface, so that the problem that the actual definition of the power state detection interface is inconsistent with the standard interface definition can be avoided.
In addition, for the configuration of the attribute values of the on-off state, the invention is realized by automatic configuration, which specifically comprises the following steps: and after the integrated machine equipment is fixedly started or is started after factory settings are restored, configuring to obtain the configuration.
Preferably, after the all-in-one device is connected to the OPS computer, at this time, the level value of the computer access state detection interface is a low level:
when the all-in-one machine equipment is started for the first time or is started after factory settings are restored, the system enters an OPS channel and monitors whether signals exist in the OPS channel in real time;
and if no signal exists, the OPS computer is considered to be in a power-off state, and the level value of the power state detection interface is acquired and is endowed with the attribute value of the power-on and power-off state, so that the power-on and power-off control configuration of the OPS computer is completed.
Therefore, when the OPS computer is controlled to be turned on and turned off subsequently, only the level value of the power state detection interface is compared with the attribute value of the on-off state in the system, whether the level value and the attribute value of the on-off state are the same or not is judged, and if the level value and the attribute value are the same, the OPS computer is considered to be in the off state; otherwise, the OPS computer is in a power-on state.
The invention only judges whether the level value of the power state detection interface is the same as the configuration attribute value of the on-off state, does not need to limit the level value of the power state detection interface to be high level or low level, and the like, namely, after the OPS equipment is connected, the interface specification definition of the OPS equipment does not need to be obtained, and meanwhile, the configuration of the OPS on-off control is automatically completed without manual intervention, thereby solving the problems of high threshold and the like in the on-off configuration process of the OPS in the prior art, and also solving the problems of software customization and the like of the all-in-one machine equipment.
The OPS computer control method of the all-in-one machine equipment comprises an initialization configuration step, a starting step and a shutdown step. The initialization configuration step, the startup step and the shutdown step are all operated on the integrated mainboard.
As shown in fig. 2, the step of initializing configuration specifically includes:
and step S11, when the all-in-one machine equipment is started for the first time or is started after the factory setting is restored, the system enters an OPS channel.
Step S12, acquiring and judging whether the computer access state detection interface is at a low level, if so, monitoring an OPS channel in real time; if not, the process is ended.
When the computer access state detection interface is at a low level, the OPS computer accesses the all-in-one machine equipment.
And step S13, when no signal exists in the OPS channel, acquiring the level value of the power state detection interface and updating the on-off state attribute value in the system according to the level value of the voltage state detection interface.
If no signal exists in the OPS channel, the OPS computer is in a power-off state, and at the moment, the level value of the power state detection interface is assigned to the attribute value of the power-on/off state in the system.
Specifically, when the obtained level value of the power state detection interface is the same as the attribute value of the power on/off state, the OPS computer is in the power off state; and when the acquired level value of the power state detection interface is different from the attribute value of the power on/off state, the OPS computer is in the power on state.
Therefore, when the switching state of the OPS computer is detected, the power supply state detection method judges the switching state according to the level value and the switching state attribute value of the power supply state detection interface which are acquired currently.
The configuration process does not need any manual intervention operation and can automatically complete the configuration.
The booting step, as shown in fig. 3, specifically includes:
step S21, when the all-in-one machine device receives the starting-up instruction and starts up, acquiring and judging whether the level value of the computer access state detection interface is a low level, if so, executing step S22; if not, ending or executing other functions.
Step S22, obtaining and judging whether the level value of the power state detection interface is the same as the attribute value of the power on/off state, if so, the OPS is in the power off state, and executing step S23; if not, ending or executing other functions.
And step S23, controlling the OPS computer to start up through the on-off control interface.
Similarly, as shown in fig. 4, the shutdown step specifically includes:
step S31, when the all-in-one machine equipment receives the closing instruction, acquiring and judging whether the level value of the computer access state detection interface is a low level, if so, executing step S32; if not, step S34 is executed.
Step S32, obtaining and judging whether the level value of the power state detection interface is the same as the attribute value of the power on/off state, if not, the OPS is in the power on state, and executing step S33; if yes, go to step S34.
And step S33, controlling the OPS computer to be shut down through the on-off control interface.
And step S34, closing the all-in-one machine equipment.
Preferably, in order to ensure that the OPS computer is powered off, step S23 further includes: after the OPS computer is controlled to be powered off through the on-off control interface, the all-in-one machine equipment is turned off when the level value of the power state detection interface is detected to be the same as the on-off state attribute value.
Preferably, when the on-off control interface is used for controlling the on-off state switching of the OPS computer, the on-off control interface is pulled down continuously for more than 0.5 s.
That is, the invention sets an attribute value of the on-off state in the mainboard of the all-in-one machine device, and combines the on-off control interface to realize the on-off control of the OPS computer, and the system automatically configures the control flow of the OPS on-off without knowing the specific definition of the level value of the power state detection interface in the on-off state of the OPS computer, so that the all-in-one machine software of the all-in-one machine device does not need to be customized as software, and can be actively configured according to the actual OPS device.
In an actual application process, when the all-in-one machine device needs to integrate the OPS computer device, the configuration of the on-off control of the OPS computer can be realized without knowing the corresponding relation between the level value of the power state detection interface of the OPS computer device and the on-off state of the OPS computer and without testing the level value of the power state detection interface of the OPS computer device and the on-off state of the OPS computer.
Example two
The invention provides an OPS computer control program of all-in-one machine equipment. As shown in fig. 5, an internal structure diagram of an OPS computer control program of the all-in-one machine device according to an embodiment of the present invention is provided.
In this embodiment, the OPS Computer control program of the all-in-one machine device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, or a portable Computer. The OPS computer control program of the all-in-one machine device at least comprises: a processor 12, a communication bus 13, a network interface 14, and a memory 11.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the OPS computer control program of the all-in-one device, for example a hard disk of the OPS computer control program of the all-in-one device. The memory 11 may also be an external storage device of the OPS computer control program of the all-in-one device in other embodiments, such as a plug-in hard disk provided on the OPS computer control program of the all-in-one device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may include both an internal storage unit of the OPS computer control program of the all-in-one machine device and an external storage device. The memory 11 can be used not only for storing application software of the OPS computer control program installed in the all-in-one machine and various kinds of data, such as a code of the OPS computer control program, etc., but also for temporarily storing data that has been output or will be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing OPS computer control programs.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the OPS computer control program of the kiosk device and other electronic devices.
Optionally, the OPS computer control program of the all-in-one device may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is used to display information processed in the OPS computer control program of the kiosk device and to display a visual user interface.
While fig. 5 shows only the OPS computer control program of the all-in-one machine having the components 11 to 14 and the OPS computer control program, those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the OPS computer control program of the all-in-one machine, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
In the OPS computer control program embodiment of the all-in-one machine shown in fig. 5, the memory 11 stores therein an OPS computer control program; the processor 12, when executing the OPS computer control program stored in the memory 11, implements the following steps:
a configuration step: firstly, when the all-in-one machine equipment is started for the first time or is started after the factory setting is restored, the system enters an OPS channel; then obtaining OPS computer access all-in-one machine equipment according to the level value of the computer access state detection interface, obtaining the level value of the power state detection interface and assigning the level value of the power state detection interface to the on-off state attribute value set by the system after obtaining that the OPS computer is in an off state according to no signal in the OPS channel;
a starting-up control step: when the integrated machine equipment receives a starting-up instruction and starts up, firstly obtaining the OPS computer access integrated machine equipment according to the level value of the computer access state detection interface, then obtaining that the OPS computer is in a shutdown state according to the power state detection interface and the attribute value of the starting-up and shutdown states, and then sending the starting-up instruction to the OPS computer through the starting-up and shutdown control interface to control the starting-up of the OPS computer;
shutdown control: when the all-in-one machine device receives a closing instruction, the level value of the computer access state detection interface is firstly used for obtaining the OPS computer access all-in-one machine device, then the OPS computer is obtained to be in a starting state according to the power state detection interface and the starting and closing state attribute value, and after the closing instruction is sent to the OPS computer through the starting and closing machine control interface, the OPS computer is controlled to be closed, and then the all-in-one machine device is closed.
Further, the boot-up control step includes:
an access state detection step: after the all-in-one machine device receives the starting-up instruction and starts up, acquiring and judging whether the level value of the computer access state detection interface is a low level, if so, accessing the OPS computer to the all-in-one machine device, and executing the step S2; if not, ending;
shutdown state detection: acquiring and judging whether the level value of the power state detection interface is the same as the attribute value of the power-on and power-off state, if so, turning off the OPS computer, and executing the step S3; if not, ending;
a starting-up step: and when the level value of the on-off control interface is set to be low level and lasts for more than 0.5s, the OPS computer is started.
Further, the shutdown control step includes:
an access state detection step: when the all-in-one machine device receives a shutdown instruction, acquiring and judging that the level value of the computer access state detection interface is a low level, if so, accessing the OPS computer to the all-in-one machine device, and executing a startup state detection step; if not, closing the all-in-one machine equipment;
a step of detecting a starting state: acquiring and judging whether the level value of the power state detection interface is the same as the attribute value of the power-on and power-off state, if not, the OPS computer is in the power-on state, and executing the power-off step; if yes, closing the all-in-one machine equipment;
shutdown step: and when the level value of the on-off control interface is set to be at a low level and lasts for more than 0.5s, the OPS computer is shut down, and the all-in-one machine equipment is closed.
Further, the step of shutting down includes: and when the level value of the on-off control interface is set to be at a low level and lasts for more than 0.5s, the OPS computer is shut down, the level value of the power state detection interface is detected in real time, and when the level value of the power state detection interface is the same as the attribute of the on-off state system, the all-in-one machine equipment is shut down.
EXAMPLE III
A storage medium, which is a computer-readable storage medium, on which an OPS computer control program is stored, where the OPS computer control program is a computer program, and when the OPS computer control program is executed by a processor, the steps of the OPS computer control method of an all-in-one machine device according to an embodiment of the present invention are implemented.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.