Disclosure of Invention
The present invention is directed to a method, an apparatus, an electronic device, and a storage medium for uploading trailer position information of a truck, which overcome at least some of the limitations and disadvantages of the related art.
According to one aspect of the invention, a method for uploading position information of a trailer of a truck is provided, the trailer of the truck comprises a first positioning module, the trailer of the truck comprises a second positioning module, and the uploading position information of the trailer of the truck comprises the following steps:
judging whether the trailer is in a static state or not according to second positioning data of the second positioning module;
if the trailer is in a static state, enabling the second positioning module to upload the second positioning data at a second uploading frequency;
if the trailer is in a moving state, the following steps:
enabling the second positioning module to upload the second positioning data at a first uploading frequency, wherein the first uploading frequency is greater than the second uploading frequency;
judging whether the main vehicle is matched with the trailer according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
and if the main vehicle is matched with the trailer, the second positioning module uploads the second positioning data at the second uploading frequency.
Optionally, the step of judging whether the trailer and the main vehicle are matched according to the first positioning data of the first positioning module and the second positioning data of the second positioning module comprises:
and if the distance between the first positioning module and the second positioning module is smaller than the preset distance in a preset time period according to the first positioning data of the first positioning module and the second positioning data of the second positioning module, and the second positioning data of the second positioning module indicates that the trailer keeps a moving state in the preset time period, the matching between the trailer and the main vehicle is judged.
Optionally, the predetermined distance is a sum of the length of the host vehicle, the length of the trailer vehicle and a parameter, and the parameter is a constant greater than or equal to 0.
Optionally, the predetermined time period is greater than the inverse of the first upload frequency.
Optionally, if the master vehicle and the trailer are matched, the method further includes, after the uploading the second positioning data by the second positioning module at the second uploading frequency:
and calculating the real-time position of the second positioning module according to the distance between the first positioning module and the second positioning module indicated by the first positioning data and the second positioning data and the first positioning data acquired by the first positioning module in real time when judging whether the main vehicle is matched with the trailer.
Optionally, if the master vehicle and the trailer are matched, the method further includes, after the uploading the second positioning data by the second positioning module at the second uploading frequency:
judging whether the trailer is changed from a static state to a moving state according to second positioning data of the second positioning module;
if the trailer is changed from a static state to a moving state, judging whether the states of the main vehicle and the trailer are consistent according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
and if the states of the main vehicle and the trailer are inconsistent, enabling the second positioning module to upload the second positioning data at the first uploading frequency.
Optionally, the second upload frequency is 0.
According to another aspect of the present invention, there is also provided a trailer position information uploading device for a truck, the truck of the truck including a first positioning module, the trailer of the truck including a second positioning module, the trailer position information uploading device for the truck including:
the state judgment module is used for judging whether the trailer is in a static state or not according to the second positioning data of the second positioning module;
the first uploading module is used for enabling the second positioning module to upload the second positioning data at a second uploading frequency if the trailer is in a static state;
a second uploading module, configured to enable the second positioning module to upload the second positioning data at a first uploading frequency if the trailer is in a moving state, where the first uploading frequency is greater than the second uploading frequency;
the matching module is used for judging whether the main vehicle is matched with the trailer according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
and the third uploading module is used for enabling the second positioning module to upload the second positioning data at the second uploading frequency if the main vehicle is matched with the trailer.
According to still another aspect of the present invention, there is also provided an electronic apparatus, including: a processor; a storage medium having stored thereon a computer program which, when executed by the processor, performs the steps as described above.
According to yet another aspect of the present invention, there is also provided a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps as described above.
Compared with the prior art, the invention has the advantages that:
through install orientation module respectively on main car and trailer to obtain the first location data of instructing main car position and the second location data of instructing the trailer position, through the motion relation of main car and trailer, the second location data of control setting on the trailer switches between first upload frequency and second upload frequency, wherein, the second upload frequency is less than first upload frequency, reduces data transmission volume, thereby reduce the required electric energy of trailer position information upload device upload data of second orientation module freight train, reach the technological effect who reduces the cost.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In various embodiments of the present invention, a truck to which a method and an apparatus for uploading trailer position information of a truck are applied is shown in fig. 1, and fig. 1 shows a schematic diagram of a truck according to an embodiment of the present invention. The truck comprises a truck 101 and a trailer 102, the truck comprising a first positioning module 103 and the trailer 102 comprising a second positioning module 104. The first positioning data acquired by the first positioning module 103 is used to indicate the position of the host vehicle. The first positioning data collected by the second positioning module 104 is used to indicate the position of the trailer. In order to reduce the amount and frequency of data uploaded by the second positioning module 104, the present invention employs a method for uploading trailer position information of a truck, as shown in fig. 2.
Fig. 2 is a flowchart illustrating a trailer position information uploading method for a truck according to an embodiment of the present invention. Referring to fig. 2, the method for uploading trailer position information of a truck includes the following steps:
step S110: judging whether the trailer is in a static state or not according to second positioning data of the second positioning module;
if the trailer is in a static state in step S110, step S120 is executed to enable the second positioning module to upload the second positioning data at a second uploading frequency;
if the trailer is determined to be in the moving state in step S110, step S130 is executed to enable the second positioning module to upload the second positioning data at a first uploading frequency, where the first uploading frequency is greater than the second uploading frequency;
step S140: judging whether the main vehicle is matched with the trailer according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
if the master vehicle and the trailer are matched in step S140, step S150 is executed to enable the second positioning module to upload the second positioning data at the second uploading frequency.
In the method for uploading trailer position information of a truck according to an exemplary embodiment of the present invention, positioning modules are respectively installed on a host vehicle and a trailer to obtain first positioning data indicating the position of the host vehicle and second positioning data indicating the position of the trailer, and the second positioning data set on the trailer is controlled to switch between a first uploading frequency and a second uploading frequency according to the motion relationship between the host vehicle and the trailer, wherein the second uploading frequency is less than the first uploading frequency, so that the data transmission amount is reduced, and the electric energy required by the second positioning module/the trailer position information uploading device of the truck to upload data is reduced, thereby achieving the technical effect of reducing the cost.
Specifically, in practical applications, the step may be performed to determine whether the second positioning module is in a static state according to second positioning data acquired by the second positioning module in real time. In other words, in the present invention, what changes is the frequency of uploading data by the second positioning module, and the frequency of acquiring the second positioning data by the second positioning module is not limited or processed. When the second positioning module is in a static state, only the second positioning data determined by the second positioning module to be in the static state is uploaded, and then the second positioning data acquired by the second positioning module in real time is uploaded at a second uploading frequency (for example, the second positioning data may be called as a static state or a large-scale down-conversion). When the second positioning module is judged to be displaced according to the second positioning data collected in real time, the second positioning module is awakened from a silent state (or greatly reduced frequency), and the second positioning data collected in real time is uploaded at the first uploading frequency.
Specifically, the host vehicle and the trailer in step S140 are matched, i.e., the trailer is mounted on the host vehicle. In other words, if the primary and trailer vehicles are matched, the second positioning module can be in a silent state again or be subjected to down-conversion by a large margin.
In various embodiments of the present invention, the first uploading frequency may be, for example, 60 times/hour, 120 times/hour, 240 times/hour, etc., which is not limited to the present invention. The second uploading frequency is greatly reduced compared with the first uploading frequency, and the second uploading frequency may be, for example, 0.5 times/hour, 0.25 times/hour, 0.1 times/hour, or no uploading (i.e., the second uploading frequency is zero), and the invention is not limited thereto.
In each embodiment of the present invention, in the above steps, the second positioning module uploads the second positioning data to the cloud server, so that the cloud server performs other operations of statistics, calculation and monitoring according to the uploaded data.
In various embodiments of the present invention, after the second positioning module uploads the second positioning data at the second uploading frequency in step S120, step S110 of determining whether the trailer is in a stationary state according to the second positioning data of the second positioning module may be further performed.
In various embodiments of the present invention, if it is determined in step S140 that the host vehicle and the trailer do not match, the step of determining in step S140 whether the host vehicle and the trailer match according to the first positioning data of the first positioning module and the second positioning data of the second positioning module may be performed again while maintaining step S130.
The method for matching the master vehicle and the trailer in step S140 is described below with reference to fig. 3, and fig. 3 shows a flow chart of master-trailer matching according to an embodiment of the present invention. Fig. 3 shows the following steps:
step S141: whether second positioning data of the second positioning module indicates that the trailer keeps moving for the predetermined time;
if it is determined in step S141 that the second positioning data of the second positioning module indicates that the trailer keeps moving within the predetermined time, step S142 is executed: judging whether the distance between the first positioning module and the second positioning module is always smaller than a preset distance or not according to the first positioning data of the first positioning module and the second positioning data of the second positioning module in the preset time period;
if it is determined in step S142 that the distance between the first positioning module and the second positioning module is always smaller than the predetermined distance within the predetermined time period, step S143 is executed: determining that the host vehicle and the trailer are matched.
Specifically, in the above step, the predetermined distance is a sum of the host vehicle length, the trailer vehicle length, and a parameter, and the parameter is a constant equal to or greater than 0. In one embodiment, the parameter may be 1 meter, 3 meters, 5 meters, etc., and the invention is not limited thereto.
Further, it is considered that the second positioning module uploads the second positioning data at the first uploading frequency within the predetermined time period, and therefore, in order to perform calculation and judgment by using enough second positioning data within the predetermined time period, the predetermined time period is greater than the reciprocal of the first uploading frequency. The predetermined time may be, for example, 5 minutes, 10 minutes, 15 minutes, etc., and the present invention is not limited thereto.
In this embodiment, if the determinations in the steps S141 and S142 are negative, the process may return to the step S141 again to determine the next predetermined time period from the current time.
Specifically, the present invention determines whether the trailer is mounted on the host vehicle during the movement through the above-described steps.
Referring now to fig. 4, fig. 4 is a flowchart illustrating a method for uploading trailer position information of a truck (steps subsequent to step S150 shown in fig. 1) according to an embodiment of the present invention.
In this embodiment, if the host vehicle and the trailer are matched in step S150, after the uploading the second positioning data by the second positioning module at the second uploading frequency, the method may further include:
step S160: and calculating the real-time position of the second positioning module according to the distance between the first positioning module and the second positioning module indicated by the first positioning data and the second positioning data and the first positioning data acquired by the first positioning module in real time when judging whether the main vehicle is matched with the trailer.
Thus, even when the second positioning module is in a quiet state or is down-converted to a large extent, the position of the second positioning module (and may be the position of the trailer) may be determined by extrapolation, taking into account that in the case where it has been determined in step S140 that the trailer is mounted to the host vehicle. In this embodiment, the calculating step is performed by the cloud server.
Further, after the step S150, if the host vehicle and the trailer are matched, enabling the second positioning module to upload the second positioning data at the second uploading frequency, the method may further include:
step S170: judging whether the trailer is changed from a static state to a moving state according to second positioning data of the second positioning module;
if the trailer is changed from the stationary state to the moving state in step S170, step S180 is executed: judging whether the states of the main vehicle and the trailer are consistent or not according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
if the state of the main vehicle is not consistent with the state of the trailer in the step S180, executing a step S190: and enabling the second positioning module to upload the second positioning data at the first uploading frequency.
In this embodiment, if it is determined in step S170 that the trailer is not changed from the stationary state to the moving state, step S170 is executed again when the second positioning module uploads the second positioning data according to the second frequency.
It is understood that when the second positioning module moves, in the case that the aforementioned step S140 has determined that the trailer is mounted on the host vehicle, the second positioning module uploads the second positioning data at the second uploading frequency until the first positioning module and the second positioning module change from the moving state to the stationary state, and when the second positioning module changes to the stationary state, the second positioning module will still upload the second positioning data at the uploading frequency until the second positioning module changes from the stationary state to the moving state again, the aforementioned steps S170 to S190 are performed.
In some implementations of the present embodiment, the step S180 determines whether the states of the host vehicle and the trailer are consistent only through the first positioning data and the second positioning data. In other implementations of this embodiment, the step S180 may also perform matching by using the master-hang matching method. Further variations can be implemented by those skilled in the art and will not be described herein.
The above description is only illustrative of the embodiments of the present invention, and the present invention is not limited thereto.
Referring now to fig. 5, fig. 5 is a schematic diagram illustrating a trailer position information uploading device of a truck according to an embodiment of the present invention. The device for uploading the trailer position information of the truck and the modules can be realized in the form of software and/or hardware. The trailer position information uploading apparatus 200 of the truck includes: the system comprises a state judgment module 210, a first uploading module 220, a second uploading module 230, a matching module 240 and a third uploading module 250.
The state judgment module 210 is configured to judge whether the trailer is in a stationary state according to the second positioning data of the second positioning module;
if the trailer is in a stationary state, the first uploading module 220 is configured to enable the second positioning module to upload the second positioning data at a second uploading frequency;
if the trailer is in a moving state, the second uploading module 230 is configured to enable the second positioning module to upload the second positioning data at a first uploading frequency, where the first uploading frequency is greater than the second uploading frequency;
the matching module 240 is configured to determine whether the main vehicle and the trailer are matched according to the first positioning data of the first positioning module and the second positioning data of the second positioning module;
if the main vehicle and the trailer are matched, the third uploading module 250 is configured to enable the second positioning module to upload the second positioning data at the second uploading frequency.
In the device for uploading trailer position information of a truck in the exemplary embodiment of the invention, the first positioning data indicating the position of the truck and the second positioning data indicating the position of the trailer are obtained by respectively installing the positioning modules on the truck and the trailer, and the second positioning data arranged on the trailer is controlled to be switched between the first uploading frequency and the second uploading frequency according to the motion relationship between the truck and the trailer, wherein the second uploading frequency is less than the first uploading frequency, so that the data transmission amount is reduced, the electric energy required by the second positioning module/the device for uploading trailer position information of the truck is reduced, and the technical effect of reducing the cost is achieved.
In various embodiments of the present invention, the above-mentioned trailer position information uploading device of the truck may be integrated in the second positioning module in a form of software, fixing, hardware, or any combination thereof.
Fig. 5 is a schematic diagram illustrating the device 400 for uploading trailer position information of trucks provided by the present invention, and the module separation, combination and addition are within the protection scope of the present invention without departing from the concept of the present invention.
In an exemplary embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored, which when executed by, for example, a processor, may implement the steps of the method for uploading trailer position information of a truck as described in any one of the above embodiments. In some possible embodiments, the various aspects of the present invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present invention described in the trailer position information uploading method section of a truck mentioned above in this specification, when the program product is run on the terminal device.
Referring to fig. 6, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the tenant computing device, partly on the tenant device, as a stand-alone software package, partly on the tenant computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing devices may be connected to the tenant computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In an exemplary embodiment of the invention, there is also provided an electronic device that may include a processor and a memory for storing executable instructions of the processor. Wherein the processor is configured to execute the steps of the method for uploading trailer position information of the truck in any one of the above embodiments by executing the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 7. The electronic device 500 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one memory unit 520, a bus 530 that couples various system components including the memory unit 520 and the processing unit 510, a display unit 540, and the like.
Wherein the storage unit stores program code executable by the processing unit 510 to cause the processing unit 510 to perform the steps according to various exemplary embodiments of the present invention described in the trailer position information uploading method section of the truck mentioned above in this specification. For example, the processing unit 510 may perform the steps as shown in fig. 2 to 4.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
The memory unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a tenant to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the method for uploading trailer position information of a truck according to the embodiment of the present invention.
Compared with the prior art, the invention has the advantages that:
through install orientation module respectively on main car and trailer to obtain the first location data of instructing main car position and the second location data of instructing the trailer position, through the motion relation of main car and trailer, the second location data of control setting on the trailer switches between first upload frequency and second upload frequency, wherein, the second upload frequency is less than first upload frequency, reduces data transmission volume, thereby reduce the required electric energy of trailer position information upload device upload data of second orientation module freight train, reach the technological effect who reduces the cost.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.