CN114364059A - Communication method and device of storage cabinet - Google Patents
Communication method and device of storage cabinet Download PDFInfo
- Publication number
- CN114364059A CN114364059A CN202210028758.0A CN202210028758A CN114364059A CN 114364059 A CN114364059 A CN 114364059A CN 202210028758 A CN202210028758 A CN 202210028758A CN 114364059 A CN114364059 A CN 114364059A
- Authority
- CN
- China
- Prior art keywords
- network
- mode
- dual
- network mode
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000004044 response Effects 0.000 claims abstract description 31
- 230000009977 dual effect Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002159 abnormal effect Effects 0.000 abstract description 8
- 238000007726 management method Methods 0.000 description 12
- 238000010295 mobile communication Methods 0.000 description 8
- 238000013473 artificial intelligence Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- QVFWZNCVPCJQOP-UHFFFAOYSA-N chloralodol Chemical compound CC(O)(C)CC(C)OC(O)C(Cl)(Cl)Cl QVFWZNCVPCJQOP-UHFFFAOYSA-N 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003449 preventive effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a communication method and device of a storage cabinet. The method includes communicating with a server through a first network, acquiring an available state with a second network from the server, and communicating with the server through the first network and the second network simultaneously when the available second network exists. Therefore, communication delay of the storage cabinet can be reduced, abnormal communication data is reduced, and response speed and stability of the storage cabinet are improved.
Description
Technical Field
The invention relates to the technical field of storage cabinets, in particular to a communication method and device of a storage cabinet.
Background
At present, people often use article storing and taking cabinets, such as take-out food, express delivery taking, supermarket bag storage, railway station bag storage and the like. The access of the storage cabinet is heavily dependent on the network of the equipment, and once the network has problems, the user can not normally take and put articles. At present, the locker basically uses an internet of things card to provide basic network service, and the network priority of the internet of things card is lower than that of 4G and 5G network services, so that the internet of things card can be degraded by automatic network service when network resources are strived for, and the access service of the locker is delayed for a short time and even abnormal.
Disclosure of Invention
In view of this, embodiments of the present invention provide a communication method and apparatus for a storage cabinet, which reduce communication delay of the storage cabinet, reduce abnormal communication data, and improve response speed and stability of the storage cabinet.
In a first aspect, an embodiment of the present invention provides a communication method for a locker, where the method includes:
initializing a network mode to a single network mode, and communicating with a server through a first network in the single network mode;
acquiring the available state of a second network corresponding to the locker from a server; and
in response to there being a second network available, switching the network mode to a dual network mode in which communication is conducted with the server over the first network and the second network;
the first network is a mobile data network, and the second network is a wireless local area network.
In some embodiments, the switching the network mode to the dual network mode specifically includes:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
In some embodiments, the dual network mode startup script includes a priority configuration, a routing table, and a policy for the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
In some embodiments, the start script is obtained by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
In some embodiments, the method further comprises:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
In some embodiments, the method further comprises:
and in the dual-network mode, synchronizing data of the first network and the second network.
In a second aspect, an embodiment of the present invention provides a communication device for a storage cabinet, where the device includes:
a network initialization unit, configured to initialize a network mode to a single network mode, where the single network mode is used for communicating with a server through a first network;
the state query unit is used for acquiring the available state of the second network corresponding to the locker from a server;
a network mode switching unit configured to switch the network mode to a dual network mode in which communication with the server is performed through the first network and the second network in response to an available second network existing;
the first network is a mobile data network, and the second network is a wireless local area network.
In some embodiments, the network mode switching unit is specifically configured to:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
In some embodiments, the dual network mode startup script includes a priority configuration, a routing table, and a policy for the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
In some embodiments, the apparatus further comprises a startup script obtaining unit configured to obtain the startup script by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
In some embodiments, the network mode switching unit is further configured to:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
In some embodiments, the apparatus further comprises:
and the data synchronization unit is used for synchronizing the data of the first network and the second network in the dual-network mode.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium on which computer program instructions are stored, which when executed by a processor implement the method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory being configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to the first aspect.
The technical scheme of the embodiment of the invention is that the server is communicated through the first network, the available state of the second network is obtained from the server, and when the available second network exists, the server is simultaneously communicated through the first network and the second network. Therefore, communication delay of the storage cabinet can be reduced, abnormal communication data is reduced, and response speed and stability of the storage cabinet are improved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a schematic view of a locker system of an embodiment of the invention;
FIG. 2 is a flow chart of a network configuration of an embodiment of the present invention;
FIG. 3 is a control flow diagram of a locker system according to an embodiment of the invention;
FIG. 4 is a flow chart of a method of communicating with a locker of an embodiment of the invention;
FIG. 5 is a flow chart of a communication device of the locker of an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device of an embodiment of the invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
FIG. 1 is a schematic view of a locker system according to an embodiment of the invention. As shown in fig. 1, the locker system according to the embodiment of the present invention includes a locker 1 and a server 2. Therein, the locker 1 comprises a first communication module 11 and a second communication module 12. The first communication module 11 communicates with the server 2 through a first network, and the second communication module 12 communicates with the server 2 through a second network.
In the present embodiment, the cabinet 1 is used for storing and taking articles.
In this embodiment, the server 2 may be an independent server, or may be a server cluster composed of a plurality of servers.
Further, at present, the locker cabinet usually uses a mobile data network card to provide basic network services, and therefore, the first communication module 11 is a mobile communication module, and correspondingly, the first network is a mobile data network.
In an optional implementation manner, the first communication module 11 is a 5G/4G/3G/2G mobile data communication module. Correspondingly, the locker 1 further comprises a mobile data card and a card slot matched with the mobile data communication module, wherein the mobile data card can be a 5G/4G/3G/2G common card (such as a mobile phone card) which is arranged in the card slot. Specifically, the mobile data card may be installed in the card slot by insertion, pasting, embedding, or the like. Therefore, the mobile data communication module and the corresponding mobile communication card can provide mobile communication services (including 2G, 3G, 4G and 5G) for the locker, and the locker can communicate with the server through the mobile communication network.
In another optional implementation manner, the first communication module 11 is a 5G/4G/3G/2G internet of things module. Correspondingly, the storage cabinet 1 further comprises an internet of things card and a clamping groove matched with the internet of things module, wherein the internet of things card is installed in the clamping groove. Specifically, the internet of things card can be installed in the card slot by means of insertion, patch, embedding and the like. The Internet of things card is a 5G/4G/3G/2G card provided by an operator, and a special number segment and an independent network element are adopted, so that the management requirement and the mobile information application requirement of intelligent hardware and Internet of things industries on equipment networking can be met, and the Internet of things card has the advantages of low price, strong environmental adaptability and the like. Therefore, the IOT module and the corresponding IOT card can provide mobile communication services (including 2G, 3G, 4G and 5G) for the locker, and the locker can communicate with the server through a mobile communication network.
It should be understood that the above-mentioned listed first communication module is only an example of the embodiment of the present invention, and the embodiment of the present invention is not limited to this, and the first communication module may be implemented in various existing manners, for example, the first communication module 11 may also be a GSM (Global System for Mobile Communications) module, a GPRS (General packet radio service) module, an eMTC (enhanced machine communication) module, an NB-IoT (Narrow Band Internet of Things) module, and the like.
Further, the second communication module 12 is a wireless local area network module, and correspondingly, the second network is a wireless local area network.
In a specific implementation, the second communication module 12 is a Wi-Fi (wireless fidelity) module. Wi-Fi is also called a "mobile hotspot", is a brand authentication of products by a brand of a Wi-Fi alliance manufacturer, and is a wireless local area network technology established in the IEEE 802.11 standard. Radio waves are generally transmitted through a wireless router, and the wireless router can be networked by adopting a Wi-Fi connection mode in an effective range covered by the radio waves so as to carry out wireless communication.
It should be understood that the above-mentioned list of the second communication module is only an example of the embodiment of the present invention, and the embodiment of the present invention is not limited to this, and the second communication module may be implemented in various existing manners, for example, the second communication module 12 may also be a bluetooth module.
Thus, the locker 1 can communicate with the server 2 through the first network and the second network.
Further, the locker of the embodiment of the invention can be in a single network mode and can also work in a double network mode. The single network mode refers to that the storage cabinet communicates with the server through a network, and the storage cabinet communicates with the server through the first network. The dual network mode means that the locker can communicate with the server through the first network and the second network at the same time.
In the single network or dual network mode, the communication data between the locker and the server may be control commands sent by the server to the locker, for example, a command to open the cabinet door, a command to close the cabinet door, and the like. The status data may be status data sent from the locker to the server, such as whether or not each shelf has articles placed thereon, an action being performed by each shelf (door opening or closing, etc.), an abnormal status such as damage to the locker, and the like.
Further, the server 2 is an AIoT (Artificial Intelligence & Internet of Things) service platform. The AIoT integrates an AI (Artificial Intelligence) technology and an IoT (Internet of Things) technology, mass data from different dimensions are generated and collected through the Internet of Things and stored in a cloud end and an edge end, and then through big data analysis and Artificial Intelligence in a higher form, all-Things datamation and all-Things intelligent association are achieved. In the system, mutual fusion and intercommunication among different intelligent terminal devices, different system platforms and different application scenes are realized, and all things are fused mutually.
Further, AIoT may provide efficient, visual, batch management device management functions, ranging from sensors, microcontrollers, and powerful gateways that route device group communications, etc. Therefore, in the control of the storage cabinet, a large number of storage cabinets, and devices such as sensors and controllers in the storage cabinets can be managed. Meanwhile, the AIoT can also acquire data through a sensor arranged on the storage cabinet and predict the future operation condition of the equipment through a simulation means, so that preventive maintenance is adopted, the downtime risk is reduced, and the downtime is shortened. And also. The AIoT also supports multiple protocols, multiple networks, multiple platforms and multiple regions of equipment are accessed quickly, the networks comprise 2G, 3G, 4G, 5G, NB-IoT, LoRa, Wi-Fi and the like, and the communication protocols comprise MQTT, CoAP, HTTP and the like.
In the present embodiment, the locker 1 is configured with a predetermined operating system, and the network is configured by the operating system.
In a specific implementation manner, the operating system configured in the storage cabinet 1 is an Android (Android) system, the Android is a Linux kernel-based free and open source code operating system, and the Linux kernel-based free and open source code operating system can be applied to various intelligent devices such as smart phones, tablet computers, televisions, digital cameras, game machines and smart watches.
It should be understood that the operating system of the locker is not limited in the embodiments of the present invention, and may be implemented by various existing operating systems, for example, a windows operating system, a liunx operating system, an ios operating system, and the like.
Taking the Android system as an example, in a default case, when one network is connected to a network, the other network is forcibly disconnected, that is, the two networks cannot coexist. Thus, the embodiments of the present invention require configuring the network so that the first network and the second network coexist.
Specifically, the process of configuring the network may refer to fig. 2, and specifically includes the following steps:
and step S110, modifying the priority code of the network.
In this embodiment, the Android system defaults Wi-Fi to have a higher priority than 4G in general, so that when the system connects Wi-Fi, 4G is disconnected. Therefore, the priority code of the Android system needs to be modified, so that the 4G is higher than Wi-Fi in priority, and meanwhile, when a new network is removed, the original Android system closes the action of the existing network according to the network priority, so that the network coexistence is increased. This makes it possible to allow Wi-Fi and 4G networks to coexist and skip the operation of disconnecting the other networks.
Further, the Android system framwork is modified to configure the network.
Specifically, the network connection management system of the Android system includes connectivity service, network management service, network statistics service, and network policy management service, and these four parts cooperate together to complete the network connection management service. The ConnectivityService provides a data connection management service, the networkpolicymanagervice provides a network policy management service, the networkstatsseservice provides a network transmission data statistics service, and the NetworkManagementService provides a management service for a physical network interface.
The networkpolicymanagervice maintains network usage policies, which can be read from a policy file. The setting policy interface provided by the network policy manager can also be used for setting, and the network policy manager service can control network connection according to the settings or the policy read from the policy file.
ConnectivityService implements management of all data connections of the system, including physical connections, virtual connections, and shared connections.
Further, the android system is by default configured such that when one network is connected to the internet, the other network is forcibly disconnected, and thus, in order to meet the requirement that the first network and the second network are connected to the internet at the same time, the network management mechanism of the android needs to be modified so as to prevent the other network from being forcibly disconnected when the one network is connected to the internet.
In one particular implementation, the connectivities service code may be configured so that two networks may be connected simultaneously. This allows one network to be networked without being forced to disconnect the other network.
Different Android versions are changed in different ways, and the embodiment of the invention is not described herein again.
And step S120, modifying the routing table and the strategy so that the first network and the second network surf the internet at the same time.
In this embodiment, after the configuration in step S110, although the 4G and the Wi-Fi may coexist, the internet may be actually accessed through only one of the networks, and thus, the first network and the second network may be simultaneously accessed by modifying the routing table and the policy.
The Android system maintains a plurality of routing tables and a policy table, the policy table defines the use policy of each routing table, each policy contains a priority, and the routing table is an electronic table (file) or a class database stored in a router or a networked computer and stores a path pointing to a specific network address.
Step S130, in response to the first network and the second network successfully accessing the internet at the same time, generating a dual-network mode configuration file.
In this embodiment, when the first network and the second network successfully surf the internet at the same time, a dual-network mode configuration file is generated, which includes network information that needs to coexist, parameter information related to the network information, and the like.
Step S140, generating a start script of the dual-network mode according to the dual-network mode configuration file.
In this embodiment, the dual-network mode configuration file is generated into a corresponding start script according to a specific format. Such that in response to there being a second network available, a start script is run to communicate with the server over the first and second networks.
Therefore, the configuration of the simultaneous connection of the dual networks can be completed.
Further, fig. 3 is a flowchart of a communication method of the locker according to an embodiment of the present invention. In the embodiment shown in FIG. 3, the communication method of the locker comprises the following steps:
and step S210, starting the locker.
In this embodiment, the boot of the locker is the restart of the operating system of the locker.
Step S220, initializing communication with a server through a first network.
In this embodiment, after the locker is powered on, the network-connected application is started, and the network-connected application communicates with the server through the first network with a higher priority according to the priority configuration of the network.
Further, since there may be an environment without Wi-Fi coverage, the 4G network is automatically connected by configuring the network at power-on, and the server communicates with the 4G network.
Step S230, querying the server for the availability status of the second network.
In this embodiment, the locker establishes a connection with the server through the first network, and obtains the availability status of the second network from the server. The available state includes the presence of an available second network and the absence of an available second network.
Further, after the communication connection with the server is established through the first network, the query request is sent to the server through the first network, and the server returns the available state to the locker after receiving the query request.
Specifically, the server stores network states of the respective lockers or locker sites in advance, and the network states at least comprise available states of the second network. Therefore, after the query request is received, the corresponding network state is queried according to the locker identification so as to obtain the available state of the second network, and the available state is sent to the locker through the first network.
Step S240, detecting whether the second network is available.
In this embodiment, the locker detects whether the second network is available according to the received availability status sent by the server.
And step S250, responding to the fact that no available second network exists, and communicating with the server through the first network.
In this embodiment, if there is no available second network, communication is made with the server through the first network.
And S260, responding to the existence of the available second network, and communicating with the server through the first network and the second network.
In this embodiment, if there is an available second network, a switch is made to a dual network communication mode in which communication is simultaneously performed with the server through the first network and the second network.
And step S270, synchronizing data.
In this embodiment, as described above, in the second mode, the server communicates with the first network and the second network simultaneously, that is, the processes of the first network and the second network use the same data resource, so as to avoid causing data security or sequence confusion, the invention tries to perform inter-process data synchronization on the first network and the second network.
Further, the inter-process data synchronization of the first network and the second network may be implemented based on various existing manners, which is not limited in this embodiment of the present invention. For example, data transfer between multiple processes can be achieved by creating a shared process Queue, a Queue being a multi-process secure Queue. Therefore, repeated sending of the same data in the two networks can be avoided, and meanwhile, when one network loses data, data transmission can be carried out through the other network.
FIG. 4 is a flow chart of a method of communicating with a locker of an embodiment of the invention. In the embodiment shown in fig. 4, the communication method includes the steps of:
step S210, initializing a network mode to a single network mode, and communicating with the server through the first network in the single network mode.
And S220, acquiring the available state of the second network corresponding to the locker from the server.
Step S230, in response to that there is an available second network, switching the network mode to a dual network mode, and in the dual network mode, communicating with the server through the first network and the second network;
the first network is a mobile data network, and the second network is a wireless local area network.
In some embodiments, the switching the network mode to the dual network mode specifically includes:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
In some embodiments, the dual network mode startup script includes a priority configuration, a routing table, and a policy for the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
In some embodiments, the start script is obtained by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
In some embodiments, the method further comprises:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
In some embodiments, the method further comprises:
and in the dual-network mode, synchronizing data of the first network and the second network.
The embodiment of the invention communicates with the server through the first network, acquires the available state of the second network from the server, and simultaneously communicates with the server through the first network and the second network when the available second network exists. Therefore, communication delay of the storage cabinet can be reduced, abnormal communication data is reduced, and response speed and stability of the storage cabinet are improved.
FIG. 5 is a schematic diagram of a communication device of a locker of an embodiment of the invention. In the embodiment shown in fig. 5, the communication apparatus includes a network initialization unit 51, a status inquiry unit 52, and a network mode switching unit 53. The network initialization unit 51 is configured to initialize a network mode to a single network mode, where the single network mode is used for communicating with the server through the first network. The status query unit 52 is configured to obtain an available status of the second network corresponding to the locker from the server. The network mode switching unit 53 is configured to switch the network mode to a dual network mode in which communication with the server is performed through the first network and the second network in response to the presence of the available second network. The first network is a mobile data network, and the second network is a wireless local area network.
In some embodiments, the network mode switching unit is specifically configured to:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
In some embodiments, the dual network mode startup script includes a priority configuration, a routing table, and a policy for the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
In some embodiments, the apparatus further comprises a startup script obtaining unit configured to obtain the startup script by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
In some embodiments, the network mode switching unit is further configured to:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
In some embodiments, the apparatus further comprises:
and the data synchronization unit is used for synchronizing the data of the first network and the second network in the dual-network mode.
The embodiment of the invention communicates with the server through the first network, acquires the available state of the second network from the server, and simultaneously communicates with the server through the first network and the second network when the available second network exists. Therefore, communication delay of the storage cabinet can be reduced, abnormal communication data is reduced, and response speed and stability of the storage cabinet are improved.
Fig. 6 is a schematic diagram of an electronic device of an embodiment of the invention. In this embodiment, the electronic device includes a server, a terminal, and the like. As shown in fig. 6, the electronic device: at least one processor 61; and a memory 62 communicatively coupled to the at least one processor 61; and a communication component 63 communicatively coupled to the scanning device, the communication component 63 receiving and transmitting data under the control of the processor 61; wherein the memory 62 stores instructions executable by the at least one processor 61, the instructions being executable by the at least one processor 61 to implement the above-described communication method.
Specifically, the electronic device includes: one or more processors 61 and a memory 62, with one processor 61 being an example in fig. 6. The processor 61 and the memory 62 may be connected by a bus or other means, and fig. 6 illustrates the connection by the bus as an example. The memory 62, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 61 executes various functional applications of the device and data processing by executing nonvolatile software programs, instructions, and modules stored in the memory 62, that is, implements the above-described communication method.
The memory 62 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 62 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 62 may optionally include memory located remotely from the processor 61, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 62 and, when executed by the one or more processors 61, perform the communication method in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
The embodiment of the invention communicates with the server through the first network, acquires the available state of the second network from the server, and simultaneously communicates with the server through the first network and the second network when the available second network exists. Therefore, communication delay of the storage cabinet can be reduced, abnormal communication data is reduced, and response speed and stability of the storage cabinet are improved.
Embodiments of the present invention relate to a non-volatile storage medium for storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiment of the invention provides A1 and a communication method of a storage cabinet, wherein the method comprises the following steps:
initializing a network mode to a single network mode, and communicating with a server through a first network in the single network mode;
acquiring the available state of a second network corresponding to the locker from a server; and
in response to there being a second network available, switching the network mode to a dual network mode in which communication is conducted with the server over the first network and the second network;
the first network is a mobile data network, and the second network is a wireless local area network.
A2, the method as in a1, wherein the switching the network mode to the dual network mode specifically comprises:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
A3, the method of A2, the startup script of the dual network mode including a priority configuration, a routing table, and a policy of the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
A4, the method according to A2, wherein the start script is obtained by the following steps:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
A5, the method of a1, the method further comprising:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
A6, the method of a1, the method further comprising:
and in the dual-network mode, synchronizing data of the first network and the second network.
The embodiment of the invention also provides B1 and a communication device of the storage cabinet, wherein the device comprises:
a network initialization unit, configured to initialize a network mode to a single network mode, where the single network mode is used for communicating with a server through a first network;
the state query unit is used for acquiring the available state of the second network corresponding to the locker from a server;
a network mode switching unit configured to switch the network mode to a dual network mode in which communication with the server is performed through the first network and the second network in response to an available second network existing;
the first network is a mobile data network, and the second network is a wireless local area network.
B2, the apparatus as in B1, the network mode switching unit being specifically configured to:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
B3, the apparatus as in B2, the startup script of the dual network mode including priority configuration, routing table and policy of the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
B4, the apparatus according to B2, the apparatus further comprising a startup script obtaining unit for obtaining the startup script by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
B5, the apparatus as in B1, the network mode switching unit further for:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
B6, the apparatus of B1, further comprising:
and the data synchronization unit is used for synchronizing the data of the first network and the second network in the dual-network mode.
Embodiments of the present invention also provide C1, a computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method as defined in any one of a1-a 6.
Embodiments of the present invention also provide D1, an electronic device comprising a memory and a processor, the memory for storing one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of a1-a 6.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method of communicating with a locker, the method comprising:
initializing a network mode to a single network mode, and communicating with a server through a first network in the single network mode;
acquiring the available state of a second network corresponding to the locker from a server; and
in response to there being a second network available, switching the network mode to a dual network mode in which communication is conducted with the server over the first network and the second network;
the first network is a mobile data network, and the second network is a wireless local area network.
2. The method according to claim 1, wherein the switching the network mode to the dual network mode is specifically:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
3. The method of claim 2, wherein the dual network mode startup script comprises a priority configuration, a routing table, and a policy for the dual network mode;
wherein the priority is configured to cause the first network and the second network to coexist;
the routing table and the policy are used for enabling the first network and the second network to be on line simultaneously.
4. The method of claim 2, wherein the start script is obtained by:
modifying a priority code of a network to cause the first network and a second network to coexist;
modifying a routing table and a strategy so that the first network and the second network are on line at the same time;
responding to the success of the simultaneous surfing of the first network and the second network, and generating a dual-network mode configuration file; and
and generating a starting script of the dual-network mode according to the dual-network mode configuration file.
5. The method of claim 1, further comprising:
in response to there not being an available second network, the network mode is controlled to be a single network mode.
6. The method of claim 1, further comprising:
and in the dual-network mode, synchronizing data of the first network and the second network.
7. A communication device for a storage cabinet, the device comprising:
a network initialization unit, configured to initialize a network mode to a single network mode, where the single network mode is used for communicating with a server through a first network;
the state query unit is used for acquiring the available state of the second network corresponding to the locker from a server;
a network mode switching unit configured to switch the network mode to a dual network mode in which communication with the server is performed through the first network and the second network in response to an available second network existing;
the first network is a mobile data network, and the second network is a wireless local area network.
8. The apparatus according to claim 7, wherein the network mode switching unit is specifically configured to:
in response to there being an available second network, running a dual-network mode start-up script to switch the network mode to dual-network mode.
9. A computer-readable storage medium on which computer program instructions are stored, which, when executed by a processor, implement the method of any one of claims 1-6.
10. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210028758.0A CN114364059B (en) | 2022-01-11 | 2022-01-11 | Communication method and device of storage cabinet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210028758.0A CN114364059B (en) | 2022-01-11 | 2022-01-11 | Communication method and device of storage cabinet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114364059A true CN114364059A (en) | 2022-04-15 |
CN114364059B CN114364059B (en) | 2024-02-23 |
Family
ID=81109935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210028758.0A Active CN114364059B (en) | 2022-01-11 | 2022-01-11 | Communication method and device of storage cabinet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114364059B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103491653A (en) * | 2013-05-13 | 2014-01-01 | 上海盛本通讯科技有限公司 | WiFi and 3G coexisting method based on Android intelligent terminal |
EP2706790A1 (en) * | 2012-08-27 | 2014-03-12 | Deutsche Telekom AG | Network selection and traffic offloading module |
CN106297046A (en) * | 2015-06-12 | 2017-01-04 | 广州宝物达网络科技有限公司 | The control system of express delivery cabinet |
CN107426784A (en) * | 2017-06-16 | 2017-12-01 | 贵州近邻宝科技有限公司 | Communication network switching method, video inspection method, express delivery cabinet and other equipment |
CN108173909A (en) * | 2017-12-15 | 2018-06-15 | 北京臻迪科技股份有限公司 | Method of data synchronization, mobile terminal and computer readable storage medium |
US20180190062A1 (en) * | 2017-01-03 | 2018-07-05 | United Parcel Service Of America, Inc. | Computerized locker banks with enhanced forecasting capabilities |
CN109526020A (en) * | 2018-10-29 | 2019-03-26 | Oppo广东移动通信有限公司 | Data transmission method and Related product |
US20190102962A1 (en) * | 2016-03-22 | 2019-04-04 | Bybox Holdings Limited | Automated Locker System and Method for Delivery and Collection of Packages |
CN109743771A (en) * | 2019-01-22 | 2019-05-10 | 苏州长风航空电子有限公司 | A kind of method and its system for realizing that vehicle device is network coexisted |
CN110232763A (en) * | 2019-06-26 | 2019-09-13 | 深圳市丰巢科技有限公司 | A kind of method, apparatus of pickup, express delivery cabinet and storage medium |
CN110995867A (en) * | 2019-12-20 | 2020-04-10 | 上海有个机器人有限公司 | Communication system for human-computer interaction and robot |
CN111327672A (en) * | 2019-12-18 | 2020-06-23 | 珠海奔图电子有限公司 | Data transmission control method, control device and mobile terminal |
CN112801594A (en) * | 2021-02-19 | 2021-05-14 | 上海中通吉网络技术有限公司 | Terminal pickup method and device and express cabinet |
-
2022
- 2022-01-11 CN CN202210028758.0A patent/CN114364059B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2706790A1 (en) * | 2012-08-27 | 2014-03-12 | Deutsche Telekom AG | Network selection and traffic offloading module |
CN103491653A (en) * | 2013-05-13 | 2014-01-01 | 上海盛本通讯科技有限公司 | WiFi and 3G coexisting method based on Android intelligent terminal |
CN106297046A (en) * | 2015-06-12 | 2017-01-04 | 广州宝物达网络科技有限公司 | The control system of express delivery cabinet |
US20190102962A1 (en) * | 2016-03-22 | 2019-04-04 | Bybox Holdings Limited | Automated Locker System and Method for Delivery and Collection of Packages |
US20180190062A1 (en) * | 2017-01-03 | 2018-07-05 | United Parcel Service Of America, Inc. | Computerized locker banks with enhanced forecasting capabilities |
CN107426784A (en) * | 2017-06-16 | 2017-12-01 | 贵州近邻宝科技有限公司 | Communication network switching method, video inspection method, express delivery cabinet and other equipment |
CN108173909A (en) * | 2017-12-15 | 2018-06-15 | 北京臻迪科技股份有限公司 | Method of data synchronization, mobile terminal and computer readable storage medium |
CN109526020A (en) * | 2018-10-29 | 2019-03-26 | Oppo广东移动通信有限公司 | Data transmission method and Related product |
CN109743771A (en) * | 2019-01-22 | 2019-05-10 | 苏州长风航空电子有限公司 | A kind of method and its system for realizing that vehicle device is network coexisted |
CN110232763A (en) * | 2019-06-26 | 2019-09-13 | 深圳市丰巢科技有限公司 | A kind of method, apparatus of pickup, express delivery cabinet and storage medium |
CN111327672A (en) * | 2019-12-18 | 2020-06-23 | 珠海奔图电子有限公司 | Data transmission control method, control device and mobile terminal |
CN110995867A (en) * | 2019-12-20 | 2020-04-10 | 上海有个机器人有限公司 | Communication system for human-computer interaction and robot |
CN112801594A (en) * | 2021-02-19 | 2021-05-14 | 上海中通吉网络技术有限公司 | Terminal pickup method and device and express cabinet |
Also Published As
Publication number | Publication date |
---|---|
CN114364059B (en) | 2024-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3595244B1 (en) | Network slice management method, unit and system | |
US11064343B2 (en) | Management of subscriber profiles simultaneously active in an eUICC card using a plurality of separate links | |
CN108781473B (en) | Method and equipment for sharing files among different terminals | |
EP3310119B1 (en) | Method and apparatus for processing network connection | |
CN111865736A (en) | Equipment control method and device | |
KR20140141584A (en) | Communication device, control method, and program | |
CN106210023B (en) | Virtual SIM card synchronous management method and terminal | |
CN112469055A (en) | Equipment network distribution method, related equipment and storage medium | |
CN112671904B (en) | Method and device for transmitting equipment state information, storage medium and electronic device | |
CN105847048B (en) | The configuration method and device of smart machine | |
CN107211380A (en) | Call supplementary service configuration and synchronization method, apparatus and system | |
CN111787522B (en) | Radio resource control RRC state maintenance method, terminal and storage medium | |
KR20090084670A (en) | Method and system for two-phase mechanism for discovering web services based management service | |
CN112637931A (en) | Method and device for establishing network connection | |
CN113452772A (en) | Intelligent scene processing method and device, storage medium and electronic equipment | |
CN113923241B (en) | Method and device for Internet of things equipment distribution network, router and Internet of things equipment | |
CN114982199A (en) | Security information discovery method, security information configuration method and device | |
CN109803454A (en) | Data transfer control method and Related product | |
CN113596792A (en) | Binding method and device of electronic equipment, storage medium and electronic device | |
CN114364059B (en) | Communication method and device of storage cabinet | |
RU2693903C1 (en) | Method, apparatus and processing system for expanded port | |
CN112787828A (en) | Application flow statistical method and device and mobile electronic device | |
CN112000019A (en) | Method, device and equipment for sharing equipment instruction control | |
CN111726367A (en) | User equipment CPE access binding method, device, system and equipment | |
CN114125023B (en) | Method and device for determining data connection, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |