Multi-terminal offline-operable smart warehouse management method
By using the MQTT server and local database in the intelligent warehouse management system, unified management and control across regions and independent operation in the disconnected state are achieved, which solves the problem of paralysis of the existing system in the disconnected state and reduces construction and maintenance costs. Improved informatization and system reliability.
Patent Information
- Application Number
- PCT/CN2023/132342
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-27
- Filing Date
- 2023-11-17
- Publication Date
- 2024-10-31
AI Technical Summary
The existing intelligent warehouse management system has problems such as low informatization, poor system fault isolation capability, long construction period and high cost when running under unified cross-regional control and disconnection. It is especially difficult to meet the needs of enterprises scattered in different regions. Unified management of materials and independent operation requirements when disconnected from the network.
Use the MQTT server to add a local database to the management server deployment and smart terminal, realize data transmission through the message queue, save the data to the local database when the network is abnormal, and try multiple transmissions to ensure that the system runs independently offline and through the LAN Realize data sharing between smart terminals.
It realizes the seamless switching between online and offline modes of the intelligent warehouse management system, reduces construction and maintenance costs, improves the reliability and informatization of the system, avoids the increase in development complexity and hardware facilities, and solves the problem of online intelligent warehouse interruption. System paralysis problem under network status.
Smart Images

Figure CN2023132342_31102024_PF_FP_ABST
Abstract
Description
A multi-terminal offline intelligent warehouse management method Technical Field
[0001] The present invention relates to the technical field of warehouse management, and in particular to an intelligent warehouse management method capable of running multiple terminals offline. Background Art
[0002] Smart warehouses are modern management systems built using a variety of modern technologies, including computer technology, network technology, artificial intelligence technology, Internet of Things sensing technology, and robotics technology. They can automatically register incoming and outgoing materials, automatically put them on shelves, automatically retrieve goods, automatically take inventory, and automatically perform statistical analysis. Compared to traditional warehouses, they are more information-based, automated, and intelligent, greatly improving warehouse management efficiency and refinement. Currently, the overall structure of smart warehouses mainly adopts the following three types:
[0003] 1. Isolated smart warehouses are mainly used for single-point micro-warehouses or self-service containers. Data storage, business logic control, and hardware device control are all on smart terminals without a network or the warehouse's local area network. The system runs in isolation and is suitable for special application scenarios in small, non-networked environments.
[0004] 2. Online smart warehouses are mainly used for medium and small multi-location warehouses. The system adopts a network structure of server + network + smart terminal. Data storage and business logic control are all on the server side. The smart terminal in each location warehouse is only used as a user interaction terminal and hardware control host. The terminal and server use the Internet or the enterprise intranet to form an integrated system. Through real-time data exchange and command control, coordinated operations are carried out to achieve intelligent operation of the warehouse. This structure is suitable for application scenarios with dispersed warehouse locations and good network conditions.
[0005] 3. Distributed cloud intelligent warehouses are primarily used for large, cross-regional warehouses and logistics stations. The system utilizes a distributed network structure consisting of cloud servers, wide area networks (WANs), local servers, local area networks (LANs), and intelligent terminals. Data storage and upper-level business logic are controlled by the cloud servers, while local data storage and front-end business logic are controlled by the local servers. The local servers are responsible for data storage and business logic control for the current regional warehouse, communicating and controlling the warehouse's intelligent terminals via the LAN. The cloud servers and local servers periodically synchronize data and schedule tasks via the WAN, and a loss of communication between the two does not affect the basic functionality of the warehouse's local management system. This structure is suitable for applications such as geographically dispersed enterprise multi-point warehouses or large chain warehousing and logistics stations.
[0006] In actual demand, there are still many application scenarios that cannot be solved by the above three types of smart warehouse technologies. For example, many companies have factories and warehouses scattered in different regions and have their own intranet systems. They require that the information system must be deployed in the intranet system, but they cannot guarantee that the intranet will remain unobstructed at all times. They need a warehouse management system that can achieve unified cross-regional control and can operate offline when the intranet is unavailable. At the same time, they must also control the construction and maintenance costs of the warehouse system. Although the three existing smart warehouse structures have their own characteristics, the following problems still exist for this application scenario:
[0007] 1. Isolated smart warehouses can manage fewer materials and have closed data. Material data and inbound and outbound records only support local entry and query. Warehouse information in different regions is not interconnected, and the level of informatization is low, which cannot meet the company's needs for unified management and allocation of warehouse materials.
[0008] 2. Online smart warehouses require that the network remain unobstructed at all times and that servers and terminal devices can exchange data at any time. Once a network interruption or server downtime occurs, the entire system will be paralyzed, and all warehouses will be unable to enter and exit the warehouse normally. The system has poor fault isolation capabilities.
[0009] 3. The structure of distributed cloud intelligent warehouse is complex. Regional servers need to be deployed at each warehouse concentration point. Business data and business logic need to be divided into levels. Cloud servers and regional servers need to divide labor, cooperate and exchange data. The software system design is complex, the system construction cycle is long and the cost is high.
[0010] Summary of the Invention
[0011] The present invention provides an intelligent warehouse management method that can operate on multiple terminals offline, which can realize the operation and seamless switching of the intelligent warehouse management system in both online and offline modes. The cost of warehouse construction and transformation is low and the time is short. It can not only realize the unified management of multi-point warehouses of ordinary online intelligent warehouses, but also realize the ability of warehouses to operate independently in a disconnected state.
[0012] A multi-terminal offline intelligent warehouse management method comprising:
[0013] S1: Deploy the MQTT server on the management server and add a local database on the smart terminal;
[0014] S2: According to the multiple terminal identifiers of the smart warehouse, the corresponding connection interface is configured on the management server, and multiple message queues are registered with the MQTT server according to the connection interface and terminal identifier;
[0015] S3: After receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the smart terminal and the management server is carried out through the MQTT server;
[0016] S4: When the network is abnormal, the intelligent terminal saves the transmission data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmission times is exceeded.
[0017] Preferably, it also includes:
[0018] When multiple smart terminals are detected to be transmitting data to the management server, the communication connection between the current transmitting smart terminal and other smart terminals is determined through the local area network based on the terminal identification.
[0019] The new data generated by the data transmission is transmitted to other smart terminals based on the communication connection.
[0020] Preferably, in S1, the management server deploys an MQTT server and adds a local database on the smart terminal, including:
[0021] The management server deploys the MQTT server, including:
[0022] Obtaining the MQTT data transmission format between the server and the smart terminal, and determining the function type of the MQTT server based on the MQTT data transmission format, and determining the configuration parameters of the MQTT server;
[0023] The configured MQTT server establishes a connection with the management server and smart terminal through the communication protocol, and the configured MQTT server is configured on the management server;
[0024] Add a local database on the smart terminal, including:
[0025] Add a local database on the smart terminal;
[0026] Establish a storage connection between the data information managed by the smart terminal and the local database, and establish a storage connection between the user's operation information on the smart terminal.
[0027] Preferably, in S2, according to the multiple terminal identifiers of the smart warehouse, corresponding connection interfaces are configured on the management server, and multiple message queues are registered with the MQTT server according to the connection interfaces and terminal identifiers, including:
[0028] Configure the connection interface based on multiple terminal identifiers of the smart warehouse and the network information of the local area network;
[0029] After the configuration of the connection interface is completed, a message queue is registered according to the address information of the connection interface and the identification information of the terminal identification, and the message queue is uniformly managed according to the management information of the communication protocol.
[0030] Preferably, the configuration of the connection interface is implemented according to multiple terminal identifiers of the intelligent warehouse and network information of the local area network, including:
[0031] Determine the model parameters and data transmission type of the smart warehouse based on multiple terminal identifiers of the smart warehouse, determine the interface type of the connection interface based on the model parameters, determine the data processing method of the connection interface based on the data transmission type, and determine the connection protocol of the connection interface based on the local area network;
[0032] Based on the interface type, data processing method and connection protocol, interface configuration information of the connection interface is generated, and according to the interface configuration information, it is determined that the connection interface needs to call the execution unit of the management server, and the execution unit and the connection interface are configured according to the interface configuration information to realize the configuration of the connection interface.
[0033] Preferably, registering a message queue according to the address information of the connection interface and the identification information of the terminal identifier, and uniformly managing the message queue according to the management information of the communication protocol includes:
[0034] Acquire first registration information according to the address information of the connection interface, acquire second registration information according to the identification information of the terminal identifier, obtain target registration information according to the first registration information and the second registration information, and determine management parameters according to the communication protocol;
[0035] Establish a message queue set according to the target registration information, obtain the corresponding target registration information sent by the message queue sequence in the message queue set to the MQTT server, establish a connection relationship between the message queue sequence and the corresponding target registration information, and register the message queue corresponding to each smart terminal according to the connection relationship and the target registration information;
[0036] All message queues in the message queue set are managed uniformly using the management parameters.
[0037] Preferably, in S3, after receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the smart terminal and the management server is performed through the MQTT server, including:
[0038] After receiving the data transmission instruction, obtain the data flow generated by the MQTT server within a preset period and the average amount of cached data per unit time, and calculate a first network detection value of the MQTT server based on the data flow generated within the preset period and the average amount of cached data per unit time;
[0039] Determining whether the first network detection value is greater than a first preset detection value;
[0040] If so, determining that the network status is normal;
[0041] Otherwise, determining that the network status may be abnormal;
[0042] The second network detection value of the MQTT server is calculated based on the first network detection value, combined with the amount and size of real-time data received by the MQTT server per unit time, the rate of change of the amount of data cached by the MQTT server between adjacent times, and the number of recent data transmissions, the amount of data transmission, and the data transmission time;
[0043] Determining whether the second network detection value is greater than a second preset detection value;
[0044] If so, determining that the network state is network congestion, adding the data transmission instruction to a data transmission message queue to wait for a response;
[0045] Otherwise, it is determined that the network status is abnormal.
[0046] Preferably, in S4, when the network is abnormal, the intelligent terminal saves the transmission data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmissions is exceeded, including:
[0047] When a network anomaly occurs and it is determined that the data transmission from the smart terminal to the MQTT server has failed, the transmitted data will be saved to the local database, the data transmission instruction will be stored in the corresponding message queue, and the synchronization status will be marked as unsynchronized;
[0048] Detect the data transmission status before the network becomes normal and determine the final transmission information;
[0049] Obtaining the latest transmission instruction corresponding to the final transmission information, and updating the data transmission instruction in the corresponding message queue based on the latest transmission instruction, and after completing the data transmission of the MQTT server based on the latest transmission instruction, marking the synchronization status in the corresponding message queue as synchronized;
[0050] When the network status is detected based on the first scheduled task for more than the maximum number of times, and the detected network status is still abnormal, a data transmission instruction execution failure reminder is sent to the smart terminal.
[0051] Preferably, the data transmission status before the network is normal is detected to determine the final transmission information, including:
[0052] A first timer task is obtained by combining a first time interval and a network judgment task, a second time interval is obtained by combining a transmission monitoring task, and a network status is detected based on the first timer task until it is determined that the network is normal, and a time point when the network is normal is determined;
[0053] Detecting the transmission status before the time point according to the second scheduled task to obtain multiple groups of transmission information, and determining whether there is a conflict among the multiple groups of transmission information;
[0054] If so, selecting the transmission information closest to the time point as the final transmission information;
[0055] Otherwise, multiple sets of transmission information are combined as the final transmission information.
[0056] Preferably, it also includes that when the smart terminal receives the data transmission from the MQTT server and the transmission is successful, the local database is updated according to the received data, and the received data is pushed to other smart terminals using the local area network and terminal identification.
[0057] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0058] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0060] FIG1 is a flow chart of a multi-terminal offline intelligent warehouse management method according to an embodiment of the present invention;
[0061] FIG2 is a flowchart of registering multiple message queues according to an embodiment of the present invention;
[0062] FIG3 is a flow chart of data transmission during network abnormality according to an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0064] Example 1
[0065] The present invention provides a multi-terminal offline intelligent warehouse management method, as shown in FIG1 , comprising:
[0066] S1: Deploy the MQTT server on the management server and add a local database on the smart terminal;
[0067] S2: According to the multiple terminal identifiers of the smart warehouse, the corresponding connection interface is configured on the management server, and multiple message queues are registered with the MQTT server according to the connection interface and terminal identifier;
[0068] S3: After receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the smart terminal and the management server is carried out through the MQTT server;
[0069] S4: When the network is abnormal, the intelligent terminal saves the transmission data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmission times is exceeded.
[0070] In this embodiment, one smart terminal corresponds to one local database. For Windows terminals, the local data cache can use databases such as MS-SQL, MySql, MS-Access, and SQLite; for Android terminals, the local data cache can use the SQLite database.
[0071] In this embodiment, each smart terminal sets a unique identifier in the software, and the server-side software sets a multi-terminal configuration interface. Multiple message queues are registered with the MQTT server according to the configured number of terminals and identifiers, so that each terminal has an exclusive message queue to ensure that each terminal can receive synchronous data from the server.
[0072] In this embodiment, multiple transmission attempts are made after the network is restored.
[0073] The beneficial effects of the above design scheme are: by introducing MQTT service as a transit, this scheme can unify the data synchronization interface of the system in both online and offline modes, avoid the development of two sets of data interfaces, reduce the complexity of the software system and the cost of development and transformation, and only need to start from the software level, without adding any hardware facilities, to realize the operation and seamless switching of the intelligent warehouse management system in both online and offline modes. The cost of warehouse construction and transformation is low and the time is short. It can realize the unified management of multi-point warehouses of ordinary online intelligent warehouses, and realize the ability of warehouses to operate independently in the disconnected state. It not only solves the problem of complete paralysis of the system in the disconnected state of online intelligent warehouses, but also overcomes the shortcomings of isolated intelligent warehouses such as small number of manageable materials, closed data, and low degree of informatization.
[0074] Example 2
[0075] Based on Example 1, this embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method, further comprising:
[0076] When multiple smart terminals are detected to be transmitting data to the management server, the communication connection between the current transmitting smart terminal and other smart terminals is determined through the local area network based on the terminal identification.
[0077] The new data generated by the data transmission is transmitted to other smart terminals based on the communication connection.
[0078] The beneficial effect of the above design scheme is that when there are multiple smart terminals in the warehouse, each terminal will push its latest generated data to other smart terminals in the same warehouse through the local area network and the terminal's unique identifier to maintain the consistency of the local cache data of multiple terminals in the same warehouse and realize terminal data sharing.
[0079] Example 3
[0080] Based on Example 1, this embodiment of the present invention provides a smart warehouse management method that can run multiple terminals offline. In S1, the management server deploys an MQTT server and adds a local database on the smart terminal, including:
[0081] The management server deploys the MQTT server, including:
[0082] Obtaining the MQTT data transmission format between the server and the smart terminal, and determining the function type of the MQTT server based on the MQTT data transmission format, and determining the configuration parameters of the MQTT server;
[0083] The configured MQTT server establishes a connection with the management server and smart terminal through the communication protocol, and the configured MQTT server is configured on the management server;
[0084] Add a local database on the smart terminal, including:
[0085] Add a local database on the smart terminal;
[0086] Establish a storage connection between the data information managed by the smart terminal and the local database, and establish a storage connection between the user's operation information on the smart terminal.
[0087] The beneficial effects of the above design scheme are: by deploying the MQTT server on the management server and adding a local database on the smart terminal, a transit connection between the management server and the smart terminal is realized, data transmission in both wired and offline modes is realized, and the ability of the warehouse to operate independently in a disconnected state is realized, and data storage for the smart terminal is realized, avoiding the development of two sets of data interfaces, reducing the complexity of the software system and the development and transformation costs.
[0088] Example 4
[0089] Based on Example 1, this embodiment of the present invention provides a multi-terminal offline smart warehouse management method, as shown in FIG2 . In S2 , corresponding connection interfaces are configured on the management server according to multiple terminal identifiers of the smart warehouse, and multiple message queues are registered with the MQTT server according to the connection interfaces and terminal identifiers, including:
[0090] S21: configuring the connection interface according to multiple terminal identifiers of the smart warehouse and the network information of the local area network;
[0091] S22: After completing the configuration of the connection interface, register a message queue according to the address information of the connection interface and the identification information of the terminal identification, and uniformly manage the message queue according to the management information of the communication protocol.
[0092] In this embodiment, the configuration of the connection interface is implemented based on multiple terminal identifiers of the intelligent warehouse and network information of the local area network, including:
[0093] Determine the model parameters and data transmission type of the smart warehouse based on multiple terminal identifiers of the smart warehouse, determine the interface type of the connection interface based on the model parameters, determine the data processing method of the connection interface based on the data transmission type, and determine the connection protocol of the connection interface based on the local area network;
[0094] Based on the interface type, data processing method and connection protocol, interface configuration information of the connection interface is generated, and according to the interface configuration information, it is determined that the connection interface needs to call the execution unit of the management server, and the execution unit and the connection interface are configured according to the interface configuration information to realize the configuration of the connection interface.
[0095] In this embodiment, a message queue is registered based on the address information of the connection interface and the identification information of the terminal identifier, and the message queue is uniformly managed based on the management information of the communication protocol, including:
[0096] Acquire first registration information according to the address information of the connection interface, acquire second registration information according to the identification information of the terminal identifier, obtain target registration information according to the first registration information and the second registration information, and determine management parameters according to the communication protocol;
[0097] Establish a message queue set according to the target registration information, obtain the corresponding target registration information sent by the message queue sequence in the message queue set to the MQTT server, establish a connection relationship between the message queue sequence and the corresponding target registration information, and register the message queue corresponding to each smart terminal according to the connection relationship and the target registration information;
[0098] All message queues in the message queue set are managed uniformly using the management parameters.
[0099] The beneficial effects of the above design scheme are: by setting a corresponding unique connection interface for each smart terminal, a secure and orderly connection between each smart terminal and the management server is achieved, avoiding the erroneous sending and theft of information. Then, multiple message queues are registered with the MQTT server according to the configured number of terminals and identifications, so that each terminal has an exclusive message queue to ensure that each terminal can receive synchronized data from the server; it overcomes the shortcomings of isolated smart warehouses such as small amount of manageable materials, closed data, and low degree of informatization.
[0100] Example 5
[0101] Based on Example 4, this embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method, which configures the connection interface based on multiple terminal identifiers of the intelligent warehouse and network information of the local area network, including:
[0102] Determine the model parameters and data transmission type of the smart warehouse based on multiple terminal identifiers of the smart warehouse, determine the interface type of the connection interface based on the model parameters, determine the data processing method of the connection interface based on the data transmission type, and determine the connection protocol of the connection interface based on the local area network;
[0103] Based on the interface type, data processing method and connection protocol, interface configuration information of the connection interface is generated, and according to the interface configuration information, it is determined that the connection interface needs to call the execution unit of the management server, and the execution unit and the connection interface are configured according to the interface configuration information to realize the configuration of the connection interface.
[0104] In this embodiment, the execution unit and the connection interface are configured according to the interface configuration information to implement the execution function of the connection interface.
[0105] The beneficial effects of the above design scheme are: by setting a corresponding unique connection interface for each smart terminal, a secure and orderly connection between each smart terminal and the management server is achieved, avoiding the erroneous sending and theft of information, and generating interface configuration information of the connection interface through the interface type, data processing method and connection protocol, ensuring the feasibility and security of generating the connection interface.
[0106] Example 6
[0107] Based on Example 4, this embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method, which registers a message queue based on the address information of the connection interface and the identification information of the terminal identifier, and uniformly manages the message queue based on the management information of the communication protocol, including:
[0108] Acquire first registration information according to the address information of the connection interface, acquire second registration information according to the identification information of the terminal identifier, obtain target registration information according to the first registration information and the second registration information, and determine management parameters according to the communication protocol;
[0109] Establish a message queue set according to the target registration information, obtain the corresponding target registration information sent by the message queue sequence in the message queue set to the MQTT server, establish a connection relationship between the message queue sequence and the corresponding target registration information, and register the message queue corresponding to each smart terminal according to the connection relationship and the target registration information;
[0110] All message queues in the message queue set are managed uniformly using the management parameters.
[0111] In this embodiment, the communication protocol is designed based on the characteristics of the intelligent terminal and the management server.
[0112] The beneficial effects of the above design scheme are: by establishing a connection relationship between the message queue sequence and the corresponding target registration information, the message queue corresponding to each smart terminal is registered according to the connection relationship and the target registration information, thereby realizing a one-to-one correspondence between the message queue and the smart terminal in the message queue set, and the management parameters are used to uniformly manage all message queues in the message queue set, ensuring that each terminal has its own message queue and that each terminal can receive synchronized data from the server; it overcomes the shortcomings of isolated smart warehouses such as limited manageable materials, closed data, and low degree of informatization.
[0113] Example 7
[0114] Based on Example 1, this embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method. In S3, after receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the intelligent terminal and the management server is performed through the MQTT server, including:
[0115] After receiving the data transmission instruction, obtain the data flow generated by the MQTT server within a preset period and the average amount of cached data per unit time, and calculate a first network detection value of the MQTT server based on the data flow generated within the preset period and the average amount of cached data per unit time;
[0116] The calculation formula of the first network detection value is as follows:
[0117] Among them, R1 represents the first network detection value, Q r Indicates the data traffic generated by the MQTT server within the preset period, Q max Indicates the maximum data flow generated in the preset period during the historical traffic monitoring of the MQTT server. min Indicates the minimum data traffic generated in the preset period during the historical traffic monitoring of the MQTT server, N r Indicates the average amount of cached data generated by the MQTT server per unit time. N0 indicates the standard average amount of cached data generated by the MQTT server per unit time when the network status is normal.
[0118] Determining whether the first network detection value is greater than a first preset detection value;
[0119] If so, determining that the network status is normal;
[0120] Otherwise, determining that the network status may be abnormal;
[0121] The second network detection value of the MQTT server is calculated based on the first network detection value, combined with the amount and size of real-time data received by the MQTT server per unit time, the rate of change of the amount of data cached by the MQTT server between adjacent times, and the number of recent data transmissions, the amount of data transmission, and the data transmission time;
[0122] The calculation formula of the second network detection value is as follows:
[0123] Where R2 represents the second network detection value of the MQTT server, ε a Indicates the rate of change of the amount of data cached by the MQTT server between adjacent times, N a Indicates the amount of data received by the MQTT server in real time per unit time, n indicates the number of recent data transmissions, Si represents the data transmission volume of the i-th data transmission, t i represents the data transmission time of the i-th data transmission, S i+1 represents the data transmission volume of the i+1th data transmission, t i+1 represents the data transmission time of the i+1th data transmission;
[0124] Determining whether the second network detection value is greater than a second preset detection value;
[0125] If so, determining that the network state is network congestion, adding the data transmission instruction to a data transmission message queue to wait for a response;
[0126] Otherwise, it is determined that the network status is abnormal.
[0127] In this embodiment, the abnormal network status indicates that the network is in an offline state.
[0128] The beneficial effect of the above design scheme is: by performing calculations and analysis based on the network status parameters and events of the MQTT server, it is possible to determine whether there is an abnormality in the network status in one calculation, thereby avoiding the situation where network congestion due to too many transmission tasks is determined to be a network abnormality, ensuring the accuracy of the determination of the network status, and thus ensuring the rationality of the data transmission method.
[0129] Example 8
[0130] Based on Example 1, the embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method. As shown in FIG3 , in S4, when the network is abnormal, the intelligent terminal saves the transmitted data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmissions is exceeded, including:
[0131] S41: When a network anomaly occurs and it is determined that the data transmission from the smart terminal to the MQTT server fails, the transmitted data is saved to the local database, the data transmission instruction is stored in the corresponding message queue, and the synchronization state is marked as unsynchronized;
[0132] S42: Detecting the data transmission status before the network is normal and determining the final transmission information;
[0133] S43: Obtain the latest transmission instruction corresponding to the final transmission information, and update the data transmission instruction in the corresponding message queue based on the latest transmission instruction. After completing the data transmission of the MQTT server based on the latest transmission instruction, mark the synchronization status in the corresponding message queue as synchronized;
[0134] S44: When the network status is detected based on the first scheduled task for more than a maximum number of times and the detected network status is still abnormal, a data transmission instruction execution failure reminder is sent to the smart terminal.
[0135] In this embodiment, the data transmission status before the network is normal is detected to determine the final transmission information, including:
[0136] A first timer task is obtained by combining a first time interval and a network judgment task, a second time interval is obtained by combining a transmission monitoring task, and a network status is detected based on the first timer task until it is determined that the network is normal, and a time point when the network is normal is determined;
[0137] Detecting the transmission status before the time point according to the second scheduled task to obtain multiple groups of transmission information, and determining whether there is a conflict among the multiple groups of transmission information;
[0138] If so, selecting the transmission information closest to the time point as the final transmission information;
[0139] Otherwise, multiple sets of transmission information are combined as the final transmission information.
[0140] The beneficial effect of the above design scheme is that when the network is abnormal, after the warehouse intelligent terminal fails to send the newly generated data message to the MQTT server, it will cache the data in the local database (including the content of the updated data, generation time, message type, synchronization status, etc.), and then judge the network status through the scheduled task. When the network returns to normal, it will try to send the data to the MQTT server again. If it is successfully sent to the MQTT server, the synchronization status of the local cached data will be changed. Otherwise, it will try to send it again until the set maximum number of sends is exceeded. It can realize the ability of the warehouse to operate independently when the network is disconnected, which not only solves the problem of complete paralysis of the system when the online intelligent warehouse is disconnected, but also overcomes the shortcomings of isolated intelligent warehouses such as small amount of manageable materials, closed data, and low degree of informatization. By introducing the MQTT service as a transit, the data synchronization interface of the system in both online and offline modes can be unified, avoiding the development of two sets of data interfaces, reducing the complexity of the software system and the development and transformation costs.
[0141] Example 9
[0142] Based on Example 8, an embodiment of the present invention provides a multi-terminal offline intelligent warehouse management method, which detects the data transmission status before the network is normal and determines the final transmission information, including:
[0143] A first timer task is obtained by combining a first time interval and a network judgment task, a second time interval is obtained by combining a transmission monitoring task, and a network status is detected based on the first timer task until it is determined that the network is normal, and a time point when the network is normal is determined;
[0144] Detecting the transmission status before the time point according to the second scheduled task to obtain multiple groups of transmission information, and determining whether there is a conflict among the multiple groups of transmission information;
[0145] If so, selecting the transmission information closest to the time point as the final transmission information;
[0146] Otherwise, multiple sets of transmission information are combined as the final transmission information.
[0147] The beneficial effect of the above design scheme is: by setting up network task monitoring and transmission task monitoring and analyzing the two from the time dimension, the latest transmission message can be determined, and whether there is a conflict between the multiple sets of transmission information can be judged. When offline data synchronization is achieved, if the receiver finds multiple conflicting data transmissions, the most recent data is selected as the final data transmission based on the time when the data was generated, avoiding the transmission of outdated data, causing waste of resources and data confusion, and realizing data synchronization between smart terminals and MQTT servers.
[0148] Example 10
[0149] Based on Example 1, an embodiment of the present invention provides a smart warehouse management method that can run offline on multiple terminals, and also includes, when the smart terminal receives data transmission from the MQTT server and the transmission is successful, updating the local database according to the received data, and pushing the received data to other smart terminals using the local area network and terminal identification.
[0150] The beneficial effect of the above design scheme is that when there are multiple smart terminals in the warehouse, each terminal will push its latest generated data to other smart terminals in the same warehouse through the local area network and the terminal's unique identifier to maintain the consistency of the local cache data of multiple terminals in the same warehouse.
Claims
1. A smart warehouse management method with multiple terminals capable of offline operation. It is characterized in that include: S1: Deploy the MQTT server on the management server and add a local database on the smart terminal; S2: According to the multiple terminal identifiers of the smart warehouse, the corresponding connection interface is configured on the management server, and multiple message queues are registered with the MQTT server according to the connection interface and the terminal identifier; S3: After receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the intelligent terminal and the management server is performed through the MQTT server; S4: When the network is abnormal, the intelligent terminal saves the transmission data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmissions is exceeded.
2. According to claim 1, a multi-terminal offline intelligent warehouse management method, It is characterized in that Also includes: When multiple intelligent terminals are detected to be transmitting data with the management server, the communication connection between the current transmitting intelligent terminal and other intelligent terminals is determined through the local area network based on the terminal identification. The new data generated by the data transmission is transmitted to other intelligent terminals based on the communication connection.
3. According to claim 1, a multi-terminal offline intelligent warehouse management method, It is characterized in that In S1, the management server deploys the MQTT server and adds a local database on the smart terminal, including: The management server deploys the MQTT server, including: Obtaining the MQTT data transmission format between the server and the intelligent terminal, and determining the function type of the MQTT server according to the MQTT data transmission format, and determining the configuration parameters of the MQTT server; The configured MQTT server establishes a connection with the management server and the intelligent terminal through the communication protocol, and the configured MQTT server is configured on the management server; Add a local database on the smart terminal, including: Add a local database on the smart terminal; Establish a storage connection between the data information managed by the smart terminal and the local database, and establish a storage connection between the user's operation information on the smart terminal.
4. According to claim 1, a multi-terminal offline intelligent warehouse management method, It is characterized in that In S2, according to the multiple terminal identifiers of the smart warehouse, the corresponding connection interface is configured on the management server, and multiple message queues are registered with the MQTT server according to the connection interface and the terminal identifier, including: According to multiple terminal identifications of the intelligent warehouse and the network information of the local area network, the connection interface is configured; After completing the configuration of the connection interface, the message queue is registered according to the address information of the connection interface and the identification information of the terminal identification, and the message queue is uniformly managed according to the management information of the communication protocol.
5. A multi-terminal offline intelligent warehouse management method according to claim 4, It is characterized in that According to the multiple terminal identifications of the smart warehouse and the network information of the local area network, the connection interface is configured, including: According to multiple terminal identifiers of the smart warehouse, determine the model parameters and data transmission type of the smart warehouse, determine the interface type of the connection interface based on the model parameters, determine the data processing method of the connection interface based on the data transmission type, and determine the connection protocol of the connection interface based on the local area network; Based on the interface type, data processing method and connection protocol, interface configuration information of the connection interface is generated, and according to the interface configuration information, it is determined that the connection interface needs to call the execution unit of the management server, and the execution unit and the connection interface are configured according to the interface configuration information to realize the configuration of the connection interface.
6. A multi-terminal offline intelligent warehouse management method according to claim 4, It is characterized in that Registering a message queue according to the address information of the connection interface and the identification information of the terminal identification, and uniformly managing the message queue according to the management information of the communication protocol, including: Acquire first registration information according to the address information of the connection interface, acquire second registration information according to the identification information of the terminal identification, obtain target registration information according to the first registration information and the second registration information, and determine management parameters according to the communication protocol; Establish a message queue set according to the target registration information, obtain the corresponding target registration information sent by the message queue sequence in the message queue set to the MQTT server, establish a connection relationship between the message queue sequence and the corresponding target registration information, and register and obtain the message queue corresponding to each smart terminal according to the connection relationship and the target registration information; All message queues in the message queue set are managed uniformly using the management parameters.
7. According to claim 1, a multi-terminal offline intelligent warehouse management method, It is characterized in that In S3, after receiving the data transmission instruction, the network status is determined. When the network is normal, data transmission between the intelligent terminal and the management server is performed through the MQTT server, including: After receiving the data transmission instruction, the data flow generated by the MQTT server in a preset period and the average amount of cached data per unit time are obtained, and a first network detection value of the MQTT server is calculated based on the data flow generated in the preset period and the average amount of cached data per unit time; Determining whether the first network detection value is greater than a first preset detection value; If so, determining that the network status is normal; Otherwise, determining that the network status may be abnormal; According to the first network detection value, combined with the amount and size of real-time received data per unit time of the MQTT server and the rate of change of the amount of cached data of the MQTT server between adjacent times, as well as the number of recent data transmissions, the amount of data transmission and the time of data transmission, a second network detection value of the MQTT server is calculated; Determining whether the second network detection value is greater than a second preset detection value; If yes, determine that the network state is network congestion, and add the data transmission instruction to a data transmission message queue to wait for a response; Otherwise, it is determined that the network status is abnormal.
8. According to claim 1, a multi-terminal offline intelligent warehouse management method, It is characterized in that In S4, when the network is abnormal, the intelligent terminal saves the transmission data to the local database and stores the data transmission instruction in the corresponding message queue, and attempts to transmit multiple times until the maximum number of transmissions is exceeded, including: When a network anomaly occurs and it is determined that the data transmission from the smart terminal to the MQTT server fails, the transmitted data is saved to the local database, the data transmission instruction is stored in the corresponding message queue, and the synchronization status is marked as unsynchronized; Detect the data transmission status before the network becomes normal and determine the final transmission information; Obtain the latest transmission instruction corresponding to the final transmission information, and update the data transmission instruction in the corresponding message queue based on the latest transmission instruction, and after completing the data transmission of the MQTT server based on the latest transmission instruction, mark the synchronization status in the corresponding message queue as synchronized; When the network status is detected based on the first scheduled task for more than the maximum number of times, and the detected network status is still abnormal, a reminder of the failure of the data transmission instruction execution is sent to the smart terminal.
9. The intelligent warehouse management method capable of running multiple terminals offline according to claim 8, It is characterized in that Test the data transmission status before the network becomes normal and determine the final transmission information, including: A first time interval and a network judgment task are combined to obtain a first timed task, a second time interval and a transmission monitoring task are combined to obtain a second timed task, and the network status is detected based on the first timed task until it is determined that the network is normal, and a time point when the network is normal is determined; Detect the transmission status before the time point according to the second timing task to obtain multiple groups of transmission information, and determine whether there is a conflict between the multiple groups of transmission information; If so, selecting the transmission information closest to the time point as the final transmission information; Otherwise, multiple sets of transmission information are combined as the final transmission information.
10. The intelligent warehouse management method capable of running multiple terminals offline according to claim 1, It is characterized in that It also includes that when the smart terminal receives data transmission from the MQTT server and the transmission is successful, the local database is updated according to the received data, and the received data is pushed to other smart terminals using the local area network and terminal identification.
Citation Information
Patent Citations
Intelligent warehouse management system
CN103577945A
Networked intelligent warehouse status detection control system
CN105182862A
Intelligent warehouse management system method
CN105488644A
Internet-based intelligent warehouse remote management system
CN107193255A
Offline access method and system for enterprise mobile advanced application platform
CN109889562A
Cited By
High-security transmission method and system for data of GreatDB database
CN120822232A
Remote monitoring and protecting method for photovoltaic cell cabinet
CN121217655A
A remote monitoring and protection method for a photovoltaic cell cabinet
CN121217655B
