Disclosure of Invention
The invention mainly aims to provide a control method of a locker, the locker and a readable storage medium, aiming at reducing compiling and testing of a system mirror image, thereby reducing labor cost and time cost.
In order to achieve the above object, the present invention provides a control method of a storage cabinet, where the storage cabinet includes a display module and a dial switch, and the control method of the storage cabinet includes:
acquiring a dial value of the dial switch;
acquiring corresponding target display parameters according to the dial value;
and configuring the display module according to the target display parameters.
In an optional embodiment, the obtaining the corresponding target display parameter according to the dial value includes:
acquiring configuration information of the display module, wherein the configuration information comprises interface information and size information of the display module;
determining a target dial value of the dial switch according to the configuration information;
and when the target dial value is consistent with the dial value of the dial switch, taking the display parameter associated with the dial value of the dial switch as the target display parameter.
In an optional embodiment, after the step of determining the target dialing value of the dialing switch according to the configuration information, the step of obtaining the corresponding target display parameter according to the dialing value further includes:
when the target dial value is inconsistent with the dial value of the dial switch, acquiring preset display parameters;
and taking the preset display parameter as the target display parameter.
In an alternative embodiment, the control method of the locker further includes:
after the storage cabinet is electrified, initializing each dial bit in the display module and the dial switch.
In an alternative embodiment, the step of initializing each of the dial bits in the dial switch includes:
acquiring a configuration value of the dial switch;
and initializing and configuring each dial bit in the dial switch according to the configuration value.
In an optional embodiment, after the step of configuring the display module according to the display parameter, the method further includes:
and returning information of successful configuration to the storage cabinet.
In addition, in order to achieve the above object, the present invention further provides a locker, where the locker includes a memory, a processor, and a control program of the locker stored in the memory and capable of running on the processor, and the control program of the locker implements the steps of the control method of the locker when executed by the processor.
In an alternative embodiment, the lockers comprise express cabinets, item lockers, or vending cabinets.
In addition, in order to achieve the above object, the present invention further provides a readable storage medium, where a control program of a locker is stored, and the control program of the locker, when executed by a processor, implements the steps of the control method of the locker as described above.
The invention provides a control method of a storage cabinet, the storage cabinet and a readable storage medium, wherein the control method of the storage cabinet is to acquire a dialing value of a dialing switch, acquire corresponding target display parameters according to the dialing value, and configure a display module through the target display parameters, namely directly acquire the target display parameters of the display module according to the dialing value by acquiring the dialing value of the dialing switch, so as to configure the display module, thereby reducing compiling and testing of a system mirror image, and further reducing labor cost and time cost; and reduces configuration flow, thereby improving timeliness of production.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
In order to realize interaction between the storage cabinet and a user, a display module, namely a display screen, is arranged on a common storage cabinet, but the display parameters of the display screen are regulated as the display screen is not supported by a communication protocol, and the display parameters related to the dial value of a dial switch are specifically required to be regulated. Specifically, the invention provides a solution to obtain the dial value of the dial switch; acquiring corresponding target display parameters according to the dial value; the display module is configured according to the target display parameters, namely, the target display parameters of the display module are directly obtained according to the dial values by obtaining the dial values of the dial switches, so that the display module is configured, compiling and testing of a system mirror image are reduced, and therefore labor cost and time cost are reduced; and reduces configuration flow, thereby improving timeliness of production.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware operating environment of a terminal according to an embodiment of the present invention.
As shown in fig. 1, the terminal may be a locker or a control terminal communicatively connected to the locker, including: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display module (Display), an input unit such as a Keyboard (Keyboard), a remote controller, and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a memory), such as disk storage. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure of the terminal shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in FIG. 1, a memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a control program for the locker.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a control program of the locker stored in the memory 1005, and perform the following operations:
acquiring a dial value of the dial switch;
acquiring corresponding target display parameters according to the dial value;
and configuring the display module according to the target display parameters.
Further, the processor 1001 may call the control program of the locker stored in the memory 1005, and further perform the following operations:
acquiring configuration information of the display module, wherein the configuration information comprises interface information and size information of the display module;
determining a target dial value of the dial switch according to the configuration information;
and when the target dial value is consistent with the dial value of the dial switch, taking the display parameter associated with the dial value of the dial switch as the target display parameter.
Further, the processor 1001 may call the control program of the locker stored in the memory 1005, and further perform the following operations:
when the target dial value is inconsistent with the dial value of the dial switch, acquiring preset display parameters;
and taking the preset display parameter as the target display parameter.
Further, the processor 1001 may call the control program of the locker stored in the memory 1005, and further perform the following operations:
after the storage cabinet is electrified, each dial bit in the display module and the dial switch is initialized.
Further, the processor 1001 may call the control program of the locker stored in the memory 1005, and further perform the following operations:
acquiring a configuration value of the dial switch;
and initializing and configuring each dial bit in the dial switch according to the configuration value.
Further, the processor 1001 may call the control program of the locker stored in the memory 1005, and further perform the following operations:
and returning information of successful configuration to the storage cabinet.
The invention provides a control method of a storage cabinet.
Referring to fig. 2, fig. 2 is a flowchart illustrating a control method of a locker according to a first embodiment of the present invention.
The embodiment provides a control method of a storage cabinet, which comprises the following steps:
s10, acquiring a dial value of the dial switch;
s20, acquiring corresponding target display parameters according to the dial value;
s30, configuring the display module according to the target display parameters.
In an embodiment, the storage cabinet includes a display module and a dial switch, where the dial switch is provided with four dial bits, and a dial value of each dial bit is 0 or 1, that is, a dial value of the dial switch is 0000-1111.
Of course, in other embodiments, the dial switch is provided with two or three dial bits, which may be specifically set according to the requirement, and is not limited herein.
Optionally, the storage cabinet includes a dial switch state detection module, where the dial switch state detection module is configured to detect a state of the dial switch, that is, detect a current dial value of the dial switch, for example, the storage cabinet sends a detection instruction to the dial switch state detection module, and after the dial switch state detection module receives the detection instruction, detect the dial value of the dial switch and return to the storage cabinet.
Further, the locker obtains a dial value of the dial switch, obtains a corresponding target display parameter according to the dial value, and configures a display module according to the target display parameter. In this embodiment, the target display parameter of the display module is directly obtained by obtaining the dial value of the dial switch, so as to configure the display module, thereby reducing compiling and testing of the system mirror image, and reducing labor cost and time cost; and reduces configuration flow, thereby improving timeliness of production.
Optionally, the target display parameter may be a resolution parameter corresponding to the display module. And obtaining a corresponding resolution parameter according to the dial value so as to configure the display module according to the resolution parameter.
Further, after the display module is configured according to the display parameters, information of successful configuration is returned to the storage cabinet, and after the storage cabinet receives the information of successful configuration, the storage cabinet can display the information of 'completed configuration' on a display screen of the display module by controlling the storage cabinet so as to display a configuration result to a user; alternatively, the "configured successfully" may be broadcast by controlling a speaker associated with the locker, etc., without limitation.
Optionally, the locker includes an express delivery cabinet, an article locker, a vending cabinet, or the like, which is not limited herein.
Further, before S10, the display module and the dial switch need to be initialized, that is, after the locker is powered on, each dial bit in the display module and the dial switch is initialized.
When the display module is initialized, the display state of the display module is mainly initialized, for example, the current display interface is restored to the initial display interface. And when initializing each dial bit in the dial switch, acquiring a configuration value of the dial switch, and initializing each dial bit in the dial switch according to the configuration value, for example, the configuration value of the dial switch is 0000, that is, the dial values of four dial bits in the dial switch are all set to 0.
Of course, in this embodiment, after the configuration of the dial switch is initialized, the dial switch is dialed according to the display module a (for example, the display screen with the 7-inch LVDS interface is used as the a) that needs to be adapted to the current storage cabinet, so that the dial value of the dial switch is 0001 that corresponds to the dial of the display module a.
In the embodiment of the invention, the control method of the locker is to acquire the dialing value of the dialing switch, acquire corresponding target display parameters according to the dialing value, and configure the display module through the target display parameters, namely, acquire the dialing value of the dialing switch, and directly acquire the target display parameters of the display module according to the dialing value so as to configure the display module, thereby reducing compiling and testing of a system mirror image, and further reducing labor cost and time cost; and reduces configuration flow, thereby improving timeliness of production.
Based on the above embodiment, referring to fig. 3, in order to accurately obtain the target display parameter corresponding to the dial value, step S20 of this embodiment further includes:
s21, acquiring configuration information of the display module, wherein the configuration information comprises interface information and size information of the display module;
s22, determining a target dial value of the dial switch according to the configuration information;
s23, when the target dial value is consistent with the dial value of the dial switch, taking the display parameter associated with the dial value of the dial switch as the target display parameter.
Namely, after the dial value of the dial switch is obtained, the locker also needs to obtain the configuration parameters of the display module used by the locker. For example, the storage cabinet sends a configuration information acquisition instruction to the display module, and the display module returns configuration information to the storage cabinet after receiving the configuration information acquisition instruction of the storage cabinet; alternatively, the locker may directly obtain the configuration information of the display module used in combination with the locker from a local server or a cloud server, which is not limited herein.
Optionally, the configuration information includes interface information and size information of the display module. In this embodiment, the interface information includes an interface type, for example: LVDS interface, HDMI interface, VGA interface, etc., wherein the display module of LVDS interface has 7 inch, 10.1 inch, 10.4 inch, 15 inch, 17 inch, 19 inch, 21.5 inch and 32 inch display screen; the display module of HDMI interface has 50 cun display screen, and the display module of VGA interface has 27 cun display screen.
Of course, the foregoing merely describes the interface information and the size information of the display module by way of example, and in other embodiments, the interface type may be other types, and the sizes corresponding to the various interfaces may be specifically set according to the requirements, which is not limited herein.
Further, after the configuration information of the display module is obtained, determining a target dialing value of the dialing switch according to the configuration information, wherein the display screens of the LVDS interfaces, the HDMI interface and the VGA interface with different sizes correspond to different target dialing values, and the following table shows that:
| dialing value | Interface type | Size of the device | Resolution ratio |
| 0000 | LVDS | 21.5 | 1920*1080 |
| 0001 | LVDS | 7 | 800*480 |
| 0010 | LVDS | 10.1 | 1280*800 |
| 0011 | LVDS | 10.4 | 1024*768 |
| 0100 | LVDS | 15 | 1024*768 |
| 0101 | LVDS | 17 | 1280*1024 |
| 0110 | LVDS | 19 | 1440*900 |
| 0111 | LVDS | 32 | 1920*1080 |
| 1000 | HDMI | 50 | 1920*1080 |
| 1001 | VGA | 27 | 1920*1080 |
| 1010 | Default LVDS | 21.5 | 1920*1080 |
| 1011 | Default LVDS | 21.5 | 1920*1080 |
| 1100 | Default LVDS | 21.5 | 1920*1080 |
| 1101 | Default LVDS | 21.5 | 1920*1080 |
| 1110 | Default LVDS | 21.5 | 1920*1080 |
| 1111 | Default LVDS | 21.5 | 1920*1080 |
As shown in the table above, the display module of the storage cabinet mainly uses the display screen of the LVDS interface, that is, different sizes in the display screen of the LVDS interface correspond to one dialing value, in addition, due to the service requirement, the storage cabinet demand of the display screen of the 21.5-inch LVDS interface is more, and the resolution corresponding to the display screen of the 21.5-inch LVDS interface can be set as a default display parameter.
Of course, in other embodiments, the display screen of other size LVDS interfaces may be set to default display parameters, such as: 7 inches, 15 inches, etc.; or, setting the corresponding resolution of the display screen of other interfaces as default display parameters, such as: HDMI interface, VGA interface, etc., are not limited herein.
In this embodiment, after the configuration parameter of the display module is obtained, a table is checked to obtain a target dial value corresponding to the configuration parameter, at this time, whether the target dial value is consistent with the dial value of the dial switch is determined, and when the target dial value is consistent with the dial value of the dial switch, the display parameter associated with the dial value of the dial switch is used as the target display parameter. For example, if the dialing value of the dialing switch is 0001, the display module configuration information is obtained, and the target dialing value determined according to the configuration information is 0001, that is, if the target dialing value is determined to be consistent with the dialing value of the dialing switch, the display parameter "800×480" (resolution) corresponding to the dialing value of the dialing switch is obtained through table lookup, that is, the target display parameter of the display module, and at this time, the display module is configured according to the target display parameter.
Of course, whether the target dialing value is consistent with the dialing value of the dialing switch is judged, and when the target dialing value is inconsistent with the dialing value of the dialing switch, for example, the configuration information of the display module is a display screen of a 19-inch LVDS interface, and at the moment, the dialing value of the dialing switch is 0000 or is mistakenly dialed to 1111, which results in inconsistent with the target dialing value 0110 determined by the configuration information, at the moment, a preset display parameter is obtained, that is, a preset default display parameter '1920×1080' is obtained, the preset display parameter is used as the target display parameter, and the display module is configured according to a resolution of '1920×1080'.
In this embodiment, the configuration information of the display module is obtained, where the configuration information includes interface information and size information of the display module, a target dial value of the dial switch is determined according to the configuration information, and when the target dial value is consistent with the dial value of the dial switch, a display parameter associated with the dial value of the dial switch is used as the target display parameter, so that the target dial value determined according to the configuration information of the display module is compared with the dial value of the dial switch, and when the target dial value is consistent with the dial value of the dial switch, a display parameter associated with the dial value of the dial switch is obtained as the target display parameter, so that the obtained target display parameter is more accurate, that is, the success rate of configuration is improved.
The invention also provides a storage cabinet, which comprises: the storage device comprises a storage, a processor and a storage cabinet control program which is stored in the storage and can run on the processor, wherein the storage cabinet control program is executed by the processor to realize the steps of the storage cabinet control method according to the embodiment.
In this embodiment, the locker includes express delivery cabinet, article locker or vending cabinet. Of course, in other embodiments, the storage cabinet may also include other storage devices, which are not limited herein.
The invention also provides a readable storage medium, wherein a control program of the locker is stored on the readable storage medium, and when the control program of the locker is executed by a processor, the steps of the control method of the locker according to any embodiment are realized.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a cloud server, or a network device, etc.) to perform the method of the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., comprising several instructions for causing a computer device to perform the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above-mentioned locker, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.