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.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. 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 means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture 100 may include an intelligent logistics apparatus 101, an intermediate server 102, a logistics data server 103, and a network 104. The network 104 serves as a medium for providing communication links between the intelligent logistics apparatus 101, the intermediate server 102, and the logistics data server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. It should be understood that the numbers of the intelligent logistics apparatuses, the intermediate servers, the logistics data servers, and the networks in fig. 1 are merely illustrative. There may be any number of intelligent logistics devices, networks, and servers, as desired for implementation. For example, the intermediate server 102 or the logistics data server 103 may be a server cluster composed of a plurality of servers, and the like.
In the intermediate server 102, the intermediate server 102 responds to the data packet from the target intelligent logistics apparatus 101 and detects the communication link type between the intermediate server 102 and the target intelligent logistics apparatus 101; determining a target communication protocol adopted by the data packet during transmission according to the type of a communication link between the intermediate server 102 and the target intelligent logistics device 101; analyzing the data packet based on the target communication protocol to obtain analyzed data; packaging the analyzed data according to a communication protocol corresponding to the type of the communication link between the intermediate server 102 and the logistics data server 103 to generate a packaged data packet; and sending the encapsulated data packet to the logistics data server 103 through a communication link between the intermediate server 102 and the logistics data server 103.
Therefore, the technical scheme of the embodiment of the application can enable the logistics data server to support various types of intelligent logistics equipment and various communication link types between the intelligent logistics equipment and the logistics data server, and simultaneously can reduce the system load of the logistics data service platform.
The data processing method provided by the embodiments of the present application is generally performed by the intermediary server 102. However, it is easily understood by those skilled in the art that the data processing method provided in the embodiment of the present application may also be executed by the logistics data server 103, and this is not particularly limited.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 schematically shows a flowchart of a data processing method according to an embodiment of the present application, which may be performed by the intermediate server 102 shown in fig. 1, and the present embodiment is described by taking the intermediate server as an example. Referring to fig. 2, the data processing method at least includes steps S210 to S230, which are described in detail as follows:
in step S210, a communication link type between the intermediate server and the target intelligent logistics apparatus is detected in response to the data packet from the target intelligent logistics apparatus.
In one embodiment, the intelligent logistics device is a logistics device capable of performing intelligent control, and specifically, the intelligent logistics device can realize certain specific functions of sorting, carrying, storing and the like. The intelligent logistics equipment can receive the control instruction or upload the data of the intelligent logistics equipment to the corresponding intermediate server, and then the data are forwarded to the logistics data server by the intermediate server, so that the communication connection between the intelligent logistics equipment and the logistics data server is realized.
The communication link is a link when the intelligent logistics device is in communication connection with the intermediate server, the communication link between the intelligent logistics device and the intermediate server may include an LPWA (Low-Power Wide-Area) cellular communication link, a 5G global system for mobile communication (gsm) communication link, a Radio Frequency Identification (RFID) communication link, and a satellite communication link, and the satellite communication link may specifically include a Low-orbit satellite communication link such as an Orbcomm satellite communication link, an astronomical satellite communication link, and a cloud satellite communication link, which is not limited herein. The data packet is a data packet sent by the intelligent logistics equipment to the intermediate server through any one type of communication link.
The intermediate server can detect the type of the communication link between the intermediate server and the target intelligent logistics device after receiving the data packet of any target intelligent logistics device.
Referring to fig. 3, fig. 3 schematically shows a flowchart of a data processing method according to an embodiment of the present application, and referring to fig. 3, the step of detecting the type of the communication link between the intermediate server and the target intelligent logistics device may specifically include steps S310 to S320, which are described in detail as follows.
In step S310, a destination receiving port number of the received packet is detected.
In an embodiment, the receiving port is a specific function module in the intermediate server for receiving a data packet, and for different types of communication links, the intermediate server may receive the data packet from the target intelligent logistics device through different receiving ports, and the receiving port number is certain identification information for uniquely identifying different receiving ports, where the identification information may specifically be a serial number of the receiving port or a device identification of the receiving port, which is not limited herein. When determining the type of the communication link between the intermediate server and the target intelligent logistics device, a target receiving port receiving the data packet may be monitored first, and a receiving port number corresponding to the target receiving port may be obtained.
In step S320, a communication link type between the intermediate server and the target intelligent logistics device is determined based on the target receiving port number and the corresponding relationship between the port number and the communication link type.
In one embodiment, the intermediate server may pre-store a corresponding relationship between receiving port numbers of different receiving ports and corresponding communication link types, and the intermediate server determines the communication link type between the intermediate server and the target intelligent logistics device according to the determined receiving port number of the target receiving port and the corresponding relationship.
In the technical solution of the embodiment shown in fig. 3, by pre-establishing the correspondence between the number of the receiving port corresponding to each different receiving port and the type of the communication link, the type of the communication link between the intermediate server and the target intelligent logistics device can be determined quickly and accurately, and the efficiency of data processing is improved.
In step S220, a target communication protocol used in the transmission of the data packet is determined according to the communication link type between the intermediate server and the target intelligent logistics device.
In an embodiment, an association relationship exists between a communication link type between the intermediate server and the target intelligent logistics device and a target communication protocol adopted by the data packet during transmission, and after the communication link type between the intermediate server and the target intelligent logistics device is determined, the target communication protocol adopted by the data packet during transmission can be determined according to the determined communication link type and the association relationship, so that the data packet is analyzed and processed. It will be appreciated that the determined target communication protocol may be one or more, as the same communication link type may correspond to a plurality of different communication protocols.
Referring to fig. 4, fig. 4 schematically illustrates a specific flowchart of step S220 according to an embodiment of the present application, and referring to fig. 4, step S220 may specifically include step S410 to step S4230, which are described in detail below.
In step S410, the device type of the target intelligent logistics device is acquired.
In an embodiment, since the same type of communication link may correspond to a plurality of different communication protocols, and when the intelligent logistics devices of different device types communicate with the intermediate server by using the same type of communication link, on the premise that the device types of the intelligent logistics devices are different, the corresponding communication protocols may also be different, so that the target communication protocol used in the transmission of the data packet needs to be determined based on the device types of the intelligent logistics devices and the communication link types for transmitting the data packet between the two types of information of the intelligent logistics devices and the intermediate server.
Optionally, the device identifier of the target intelligent logistics device may be obtained, and the device type of the target intelligent logistics device is determined according to the device identifier of the target intelligent logistics device.
In step S420, target environment configuration information is generated according to the device type of the target intelligent logistics device and the communication link type between the intermediate server and the target intelligent logistics device.
In an embodiment, after the device type of the target intelligent logistics device and the communication link type between the intermediate server and the target intelligent logistics device are obtained, target environment configuration information corresponding to the target intelligent logistics device may be generated according to the two types of information, and a target communication protocol adopted in transmission of the data packet is determined based on the environment configuration information. It can be understood that the intermediate server may store in advance a correspondence between environment configuration information corresponding to different types of intelligent logistics devices and a communication protocol used in transmission of the data packet, so as to determine the communication protocol used in transmission according to the environment configuration information.
In step S430, a target communication protocol used by the data packet in transmission is determined based on the target environment configuration information and the corresponding relationship between the environment configuration information and the communication protocol.
In an embodiment, the intermediate server may search for a correspondence between the pre-stored environment configuration information and the communication protocol according to the generated target environment configuration information as an index, and determine a target communication protocol used when the data packet from the target intelligent logistics device is transmitted.
In the technical solution of the embodiment shown in fig. 4, by storing the correspondence between different environment configuration information and the communication protocol used in the transmission of the data packet, the intermediate server can support the intelligent logistics devices of different device types, and more quickly determine the target communication protocol used in the transmission of the data packet, thereby improving the efficiency of data processing.
In step S230, the data packet is analyzed based on the target communication protocol, so as to obtain analyzed data.
In an embodiment, after determining a target communication protocol used by a data packet of a target intelligent logistics device during transmission, in order to enable the logistics data server to smoothly receive and analyze the data packet, the data packet needs to be analyzed according to the determined target communication protocol to obtain analyzed data.
Optionally, the data packet may be specifically analyzed according to an analysis function corresponding to the target communication protocol, so as to obtain analyzed data.
In step S240, the analyzed data is encapsulated according to the communication protocol corresponding to the communication link type between the intermediate server and the logistics data server, and an encapsulated data packet is generated.
In one embodiment, the type of the communication link between the intermediate server and the logistics data server is a certain type of communication link agreed in advance by the intermediate server and the logistics data server. After the intermediate server obtains the analyzed data, in order to facilitate sending the analyzed data to the logistics data server and enable the logistics data server to read the analyzed information, the intermediate server may perform encapsulation processing on the analyzed data according to a communication protocol corresponding to a communication link type between the intermediate server and the logistics data server, and generate an encapsulated data packet.
In step S250, the encapsulated data packet is transmitted to the logistics data server through the communication link between the intermediate server and the logistics data server.
In an embodiment, the intermediate server sends the encapsulated data packet to the logistics data server through a communication link between the intermediate server and the logistics data server, and specifically, the encapsulated data packet may be sent to the logistics data server based on a sending port corresponding to the communication link between the intermediate server and the logistics data server.
Fig. 5 schematically shows a detailed flowchart of step S250 according to an embodiment of the present application, and referring to fig. 5, step S250 may include step S510 to step S530, which are described in detail as follows.
In step S510, a write message packet is generated from the encapsulated data packet.
In step S520, the write message packet is added to the message transmission queue.
In step S530, the write message packet included in the message transmission queue is transmitted to the logistics data server through a communication link between the intermediate server and the logistics data server.
In one embodiment, when the intermediate server sends the encapsulated data packet to the logistics data server, a corresponding write message packet is generated according to the encapsulated data packet and is used as a data packet to be sent. And the intermediate server adds all the generated message packets into the message sending queue, and sends all the write message packets in the message sending queue to the logistics data server through the thread for sending the messages.
Specifically, the intermediate server transmits the write message packet included in the message transmission queue to the logistics data server through a communication link in communication connection with the logistics data server.
By generating the write-in message packet according to the encapsulated data packet and adding the generated write-in message packet to the message sending queue, the intermediate server can effectively send the write-in messages corresponding to the intelligent logistics devices to the logistics data server in order, and the write-in message packet is prevented from being missed.
Fig. 6 schematically shows a flowchart of a data processing method according to an embodiment of the present application, and referring to fig. 6, the step of sending the write message packet contained in the message sending queue to the logistics data server may specifically include steps S610 to S630, which are described in detail below.
In step S610, the priority of each write message packet in the message transmission queue is determined according to the content of the write message packet.
In one embodiment, when the write message packets contained in the message sending queue are sent to the logistics data server, the intermediate server determines the priority of each write message packet in the message sending queue according to the content of the write message packet. For the write message packets using different function types, the corresponding priorities are different, for example, the priority corresponding to the write message packet of the warning prompt type or the device maintenance type is high, such as the priority corresponding to the write message packet of the data storage type is low. Optionally, the priority of the write message packet may be specifically divided into three levels, i.e., a high priority level, a medium priority level, and a low priority level, or may be divided into more than three priority levels according to the requirement.
Optionally, when determining the priority of each write-in message packet in the message sending queue according to the content of the write-in message packet, the priority of each write-in message packet may be determined according to a specific field included in the content of the write-in message packet and a corresponding relationship between the specific field and the priority.
In step S620, the transmission order of the respective write message packets in the message transmission queue is determined based on the priorities of the respective write message packets.
In one embodiment, when the sending sequence of each write message packet in the message sending queue is determined based on the priority of each write message packet, the sending sequence corresponding to the write message packet with the higher priority is earlier. It should be noted that, for two write message packets with the same priority, the sending order may be determined according to the time when the write message packet is added to the message sending queue, for example, the sending order corresponding to the write message packet that is added to the message sending queue earlier in time is earlier.
In step S630, the write message packets in the message transmission queue are sequentially transmitted to the logistics data server based on the transmission order.
In one embodiment, the intermediate server sequentially transmits the write message packets in the message transmission queue to the logistics data server based on the transmission order, so as to transmit the write message packets in the message transmission queue to the logistics data server.
In the technical solution of the embodiment shown in fig. 6, the sending sequence of each write-in message packet in the message sending queue is determined based on the priority of each write-in message packet, so that the write-in message packet with a high importance degree can be preferentially sent to the logistics data server according to the importance degree of each write-in message packet, thereby meeting a more complex service scenario and improving an application scenario of the scheme.
The following describes embodiments of an apparatus of the present application, which may be used to perform the data processing method in the above-described embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the data processing method described above in the present application.
Fig. 7 schematically shows a block diagram of a data processing device according to an embodiment of the present application. Referring to fig. 7, a data processing apparatus 700 according to an embodiment of the present application includes: detection unit 710, execution unit 720, parsing unit 730, encapsulation unit 740, and sending unit 750.
The detection unit 710 is configured to detect a communication link type between the intermediate server and a target intelligent logistics device in response to a data packet from the target intelligent logistics device; the execution unit 720 is configured to determine, according to the type of the communication link between the intermediate server and the target intelligent logistics device, a target communication protocol used in transmission of the data packet; the analyzing unit 730 is configured to analyze the data packet based on the target communication protocol to obtain analyzed data; the encapsulating unit 740 is configured to encapsulate the analyzed data according to a communication protocol corresponding to a communication link type between the intermediate server and the logistics data server, and generate an encapsulated data packet; the sending unit 750 is configured to send the encapsulated data packet to the logistics data server through a communication link between the intermediate server and the logistics data server.
In one embodiment of the present application, the detecting unit 710 includes: a detection subunit, configured to detect a target receiving port number at which the data packet is received; a first execution subunit, configured to determine, based on the target receiving port number and a correspondence between the port number and a communication link type, a communication link type between the intermediate server and the target intelligent logistics device.
In an embodiment of the present application, the execution unit 720 includes: the acquisition subunit is used for acquiring the equipment type of the target intelligent logistics equipment; the first generation subunit is configured to generate target environment configuration information according to the device type of the target intelligent logistics device and the communication link type between the intermediate server and the target intelligent logistics device; and the second execution subunit is configured to determine, based on the target environment configuration information and a correspondence between the environment configuration information and a communication protocol, a target communication protocol adopted by the data packet during transmission.
In an embodiment of the present application, the sending unit 750 includes: the second generating subunit is used for generating a write-in message packet according to the encapsulated data packet; the adding subunit is used for adding the writing message packet into a message sending queue; and the sending subunit is configured to send the write message packet included in the message sending queue to the logistics data server through a communication link between the intermediate server and the logistics data server.
In an embodiment of the present application, the sending unit 750 includes: the sending subunit is specifically configured to determine, according to the content of the write-in message packet, a priority of each write-in message packet in the message sending queue; determining the sending sequence of each write-in message packet in the message sending queue based on the priority of each write-in message packet; sequentially sending the write-in message packets in the message sending queue to the logistics data server based on the sending sequence
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 800 of the electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, a computer system 800 includes a Central Processing Unit (CPU)801, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 802 or a program loaded from a storage portion 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for system operation are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 1504. An Input/Output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to embodiments of the present application, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. When the computer program is executed by the Central Processing Unit (CPU)801, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a 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. In the present application, a computer 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. In this application, however, a computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
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 embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can 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 can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.