This application claims priority to Chinese Patent Application No. 201611220115.7, filed on Dec. 26, 2016, entitled “RAMAN SPECTROSCOPIC DEVICES AND COMMUNICATION METHODS THEREOF,” which is incorporated herein by reference in its entirety.
The disclosed technology relates to the field of Raman spectroscopic inspection and application, and more particularly, to a Raman spectroscopic device and a communication method thereof.
Raman spectroscopic analysis technology is currently widely regarded as one of the most effective and rapid substance recognition technologies. As different substances have different molecular structures, Raman spectra thereof are different from each other. Thus, Raman spectra of substances may be observed to learn molecular properties of the substances and recognize the substances. Based on advantages of inspection using Raman spectra, for example, high accuracy, high speed, non-destruction and so on, Raman spectroscopic analysis has gained wide attention in various fields of application and a variety of Raman spectroscopic products have been developed. For example, Nuctech (Beijing, CHINA) has developed many series (for example, RT1003, RT3000, RT5000 and RT6000, etc.) of Raman spectroscopic products, which have been widely used in fields such as security inspection, anti-drugs, anti-smuggling, food safety and jewelry appraisal and the like, and have played a crucial role in aspects such as guarantee of market orders and protection of national security.
However, most existing Raman spectroscopic devices are used standalone and rarely have interfaces for secondary development (for example, data communication, device management, system upgrades, etc.) Even in a Raman spectroscopic device having such an interface, the interface is generally implemented based on a TCP protocol. The TCP protocol is a connection dependent communication protocol, and there may be the following defects if the TCP protocol is applied in the Raman spectroscopic device:
1. The TCP protocol has a low connection speed (usually about 60 seconds). However, in the fields such as security inspection etc., rapid analysis and judgment of inspection result is required. Therefore, the connection speed seriously affects the instant effect of the Raman spectroscopic device;
2. It needs to maintain the communication connection, which increases the complexity and increase a burden of a server;
3. Only a single function can be achieved. For example, a function of one device acting as not only a server but also a client on the same communication port cannot be realized; and
4. It is inconvenient to manage the device.
The disclosed technology proposes a Raman spectroscopic device and a communication method thereof.
According to an aspect of the disclosed technology, there is proposed a Raman spectroscopic device. The Raman spectroscopic device comprises: a communication unit configured to communicate with at least one of a server and a management terminal through one or more types of communication interfaces for one or more respective purposes, wherein the one or more communication interfaces are established based on a User Datagram Protocol (UDP).
In an embodiment, the communication by the communication unit comprises operations of: receiving a handshake command from the at least one of the server and the management terminal; transmitting a handshake response to the at least one of the server and the management terminal; receiving a data package from the at least one of the server and the management terminal; and feeding back a result of an operation which is performed according to data in the data package to the at least one of the server and the management terminal.
In an embodiment, the Raman spectroscopic device further comprises a processor connected to the communication unit and configured to: receive the data package from the communication unit; perform an operation according to the data in the data package; and return a result of the operation to the communication unit.
In an embodiment, the communication unit is further configured to: verify the data package after receiving the data package; and feed back the result of the operation which is performed according to the data in the data package to the at least one of the server and the management terminal only if the verification is successful.
In an embodiment, the communication by the communication unit comprises operations of: broadcasting at least one of identification information of the Raman spectroscopic device and Raman spectrum inspection data to the at least one of the server and the management terminal.
In an embodiment, the communication by the communication unit comprises operations of: receiving a broadcast command from the at least one of the server and the management terminal; and transmitting at least one of identification information of the Raman spectroscopic device and Raman spectrum inspection data to the at least one of the server and the management terminal.
In an embodiment, the communication by the communication unit comprises operations of: transmitting a request for data of other Raman spectroscopic devices to the at least one of the server and the management terminal; and receiving the requested data of the other Raman spectroscopic devices.
In an embodiment, receiving the requested data of the other Raman spectroscopic devices comprises: receiving, from the at least one of the server and the management terminal, data pre-stored in the at least one of the server and the management terminal or acquired by the at least one of the server and the management terminal from various other Raman spectroscopic devices.
In an embodiment, receiving the requested data of the other Raman spectroscopic devices comprises: receiving the data from various other Raman spectroscopic devices, respectively.
According to another aspect of the disclosed technology, there is proposed a communication method performed by a Raman spectroscopic device. The method comprises performing the following steps through one or more types of communication interfaces: receiving a handshake command from at least one of a server and a management terminal; transmitting a handshake response to the at least one of the server and the management terminal; receiving a data package from the at least one of the server and the management terminal; and feeding back a result of an operation which is performed according to data in the data package to the at least one of the server and the management terminal, wherein the one or more communication interfaces are established based on a User Datagram Protocol (UDP).
In an embodiment, the communication method further comprises: verifying the data package after receiving the data package; and feeding back the result of the operation which is performed according to the data in the data package to the at least one of the server and the management terminal only if the verification is successful.
According to another aspect of the disclosed technology, there is proposed a communication method performed by a Raman spectroscopic device. The method comprises performing the following steps through one or more types of communication interfaces: receiving a broadcast command from at least one of a server and a management terminal; and transmitting at least one of identification information of the Raman spectroscopic device and Raman spectrum inspection data to the at least one of the server and the management terminal, wherein the one or more communication interfaces are established based on a User Datagram Protocol (UDP).
According to another aspect of the disclosed technology, there is proposed a communication method performed by a Raman spectroscopic device. The method comprises performing the following steps through one or more types of communication interfaces: transmitting a request for data of other Raman spectroscopic devices to at least one of a server and a management terminal; and receiving the requested data of the other Raman spectroscopic devices, wherein the one or more communication interfaces are established based on a User Datagram Protocol (UDP).
In an embodiment, receiving the requested data of the other Raman spectroscopic devices comprises: receiving, from at least one of the server and the management terminal, data, pre-stored in the at least one of the server and the management terminal or acquired by the at least one of the server and the management terminal from various other Raman spectroscopic devices.
In an embodiment, receiving the requested data of the other Raman spectroscopic devices comprises: receiving the data from various other Raman spectroscopic devices, respectively.
The specific embodiments of the disclosed technology will be described in detail below. It should be noted that the embodiments herein are used for illustration only, without limiting the disclosed technology. In the description below, a number of specific details are explained to provide better understanding of the disclosed technology. However, it is apparent to those skilled in the art that the disclosed technology can be implemented without these specific details. In other instances, well known structures, materials or methods are not described specifically so as not to obscure the disclosed technology.
Throughout the specification, the reference to “one embodiment,” “an embodiment,” “one example” or “an example” means that the specific features, structures or properties described in conjunction with the embodiment or example are included in at least one embodiment of the disclosed technology. Therefore, the phrases “in one embodiment,” “in an embodiment,” “in one example” or “in an example” occurred in various positions throughout the specification may not necessarily refer to the same embodiment or example. Furthermore, specific features, structures or properties may be combined into one or more embodiments or examples in any appropriate combination and/or sub-combination. Moreover, it should be understood by those skilled in the art that the accompanying drawings provided here are for the purpose of illustration and are not necessarily to be drawn to scale. The term “and/or” used herein means any and all combinations of one or more listed items.
In general, “interface” broadly refers to an entity of a specific device entity which is used to provide the specific device entity itself to the outside or an abstract concept thereof. Depending on different circumstances, there are many different implementations of the “interface”. For example, an interface of a computer which is used to interact with people is implemented as a “user interface”; an interface between computer hardware is implemented as a hardware interface (for example, a USB, and etc.) for connecting entities; and an information transmission interface implemented through programs, software, etc. is implemented as a virtual interface, which is implemented through a program expression structure. The interface herein refers to a “virtual interface” which is used to enable inter-entity communication under a particular communication protocol.
The disclosed technology will be specifically described below with reference to the accompanying drawings.
A communication scenario of a Raman spectroscopic device according to an embodiment of the disclosed technology will be described below.
Firstly, as shown in
As illustrated, the communication network architecture 100 of the Raman spectroscopic devices comprises a Raman spectroscopic device 110, a server 120, a management terminal 130 and a network 140. The Raman spectroscopic device 110, the server 120, and the management terminal 130 are connected to the network 140, to communicate with each other through the network 140.
The Raman spectroscopic device 110 may be any type of Raman spectroscopic device 110, such as any of the RT1003, RT3000, RT5000, and RT6000 series of Raman spectroscopic devices manufactured by Nuctech. It should be illustrated that, although only a single Raman spectroscopic device 110 is shown in
The server 120 may be any type of web server such as a dedicated server for implementing a specific function or a general cloud server etc. The server 120 may have a memory for storing data, instructions and programs, or may be connected to a dedicated database server.
The management terminal 130 may be a terminal device such as a computer, a tablet, a mobile phone etc., through which a user may monitor and manage the Raman spectroscopic device 110.
In one embodiment, the management terminal 130 communicates directly with the Raman spectroscopic device 110 to control the Raman spectroscopic device 110 to operate so as to achieve a specific function. In another embodiment, the management terminal 130 communicates with the Raman spectroscopic device 110 via the server 120. In yet another embodiment, the management terminal 130 not only communicates directly with the Raman spectroscopic device 110 but also communicates with the Raman spectroscopic device 110 via the server 120 to achieve different functions, respectively.
The network 140 may be any wired network or wireless network, such as WiFi, a mobile communication network, a Bluetooth network, etc. It should be pointed out that although only a single network 140 is shown in
Next, as shown in
As illustrated, the communication network architecture 200 of the Raman spectroscopic devices comprises a Raman spectroscopic device 210, a server 220, a management terminal 230, and a network 240. The Raman spectroscopic device 210 and the server 220 are connected to the network 140 and may communicate with each other over the network 140. The management terminal 230 is connected to the server 220 to control the server 220 to communicate with the Raman spectroscopic device 210 and thus to monitor and manage the Raman spectroscopic device 210.
Except for the difference in the above connection modes, the Raman spectroscopic device 210, the server 220, the management terminal 230 and the network 240 are similar to the respective devices in
A Raman spectroscopic device according to an embodiment of the disclosed technology and a communication method thereof will be described below in combination with the first scenario in
As shown in
One or more types of communication interfaces (as illustrated by a plurality of bidirectional arrows on the right side of
Specifically, the communication interfaces may have a variety of types, such as basic command, management command, historical data, upgrade command etc., for different communication purposes. Table 1 below exemplarily illustrates more than 60 interfaces with these types. It should be understood that these interface types and descriptions are only exemplary and do not limit the disclosed technology.
Depending on different communication purposes, not only the interfaces used may be different, but also the communication flows may also be different. Communication flows of various communication methods which are performed by the Raman spectroscopic device 110 through the interfaces established based on the UDP in the first scenario will be described below in combination with the structure of the Raman spectroscopic device 110 in
Specifically, in step S410, the Raman spectroscopic device 110 receives a handshake command from the server 120 (via a communication unit 310).
After the Raman spectroscopic device 110 is put into use, the Raman spectroscopic device 110 needs to be registered with the server 120 (which will be described below). The step S410 refers to that the Raman spectroscopic device 110, as a device which has already been registered with the server 120, may receive a specific handshake command from the server 120. The handshake command is used to determine whether the Raman spectroscopic device is ready to receive a command or data which will be transmitted by the server 120.
Then, in step S420, the Raman spectroscopic device 110 transmits a handshake response to the server 120 (via the communication unit 310).
If the Raman spectroscopic device 110 is ready for reception, it informs the server 120 through a positive acknowledgement handshake response that the command or data can be transmitted. On the contrary, if the Raman spectroscopic device 110 is not yet ready, it informs the server 120 through a negative acknowledgement handshake response that transmission of the command or data should be postponed. Alternatively, a code of a reason why the Raman spectroscopic device 110 is not yet ready may further be included in the negative acknowledgement handshake response.
Of course, there may also be a link condition or a network device failure, in which case the transmission of the handshake command or the handshake response cannot be successfully implemented. In one embodiment, when the server 120 does not receive any handshake response within a certain threshold time after the server 120 transmits the handshake command, the server 120 judges that there is a problem with the connection therebetween. In one embodiment, the server 120 prompts the user to additionally detect the connection between the Raman spectroscopic device 110 and the server 120.
Next, in step S430, the Raman spectroscopic device 110 receives a data package from the server 120 (via the communication unit 310).
The data package comprises a header portion and a data portion. The data portion comprises a command or data transmitted by the server 120.
In one embodiment, the Raman spectroscopic device 110 is further configured to verify the data package after receiving the data package. Further, subsequent operations can be performed only if the verification is successful. If the verification fails, the Raman spectroscopic device 110 transmits error information to the server 120 or requests the server 120 to retransmit the data package.
Finally, in step S440, the Raman spectroscopic device 110 feeds back a result of an operation which is performed according to data in the data package to the server 120 (via the communication unit 310).
In one embodiment, the processor 320 in the Raman spectroscopic device 110 receives the data package from the communication unit 310 and performs an operation (for example, an action indicated by the command or updating or upgrading using the data) according to the command or data in the data package. After the operation is completed, the processor 320 returns a result of the operation to the communication unit 310. Then, the communication unit 310 feeds back the result to the server 120.
It should be pointed out that if the data package comprises a data transmission instruction, data transmission indicated by the instruction then continues to be initiated between the Raman spectroscopic device 110 and the server 120.
In addition, the server 120 may terminate the communication by transmitting another handshake command during the communication.
In step S510, the Raman spectroscopic device 110 receives a broadcast command from the server 120.
In one embodiment, the broadcast command may be a probe broadcast transmitted by the server 120 for registering a new Raman spectroscopic device 110 therewith. In another embodiment, the broadcast command may be an instruction for instructing a specific Raman spectroscopic device (for example, the Raman spectroscopic device 110) to upload an inspection result thereof.
In step S520, the Raman spectroscopic device 110 transmits identification information of the Raman spectroscopic device and/or Raman spectrum inspection data to the server 120.
In one embodiment, if the broadcast command is a probe broadcast, after receiving the broadcast, the Raman spectroscopic device 110 returns device identification information thereof to the server 120 to enable registration. It should be pointed out that, in other embodiments, the registration process may also be initiated by the Raman spectroscopic device 110. After the Raman spectroscopic device 110 is put into use, the Raman spectroscopic device 110 broadcasts the device identification information thereof to the network 140, and the server 120 may acquire the device identification information for subsequent management and monitoring. This registration process may be implemented without the server 120 transmitting the probe broadcast.
In another embodiment, if the broadcast command is an upload instruction, after receiving the broadcast, the Raman spectroscopic device 110 returns an inspection result thereof to the server 120. It should be pointed out that, in other embodiments, the process of uploading the inspection result may also be initiated by the Raman spectroscopic device 110. The Raman spectroscopic device 110 broadcasts the inspection result thereof to the network 140 each time a certain number of inspection results are obtained or every predetermined time interval. The upload process may be implemented without the server 120 transmitting the upload instruction.
In step S610, the Raman spectroscopic device 110 transmits a request for data of other Raman spectroscopic devices to the server 120.
In step S620, the Raman spectroscopic device 110 receives the requested data of the other Raman spectroscopic devices.
In one embodiment, the server 120 stores inspection data obtained in advance from various Raman spectroscopic devices. Then, the server 120 transmits the stored inspection data to the Raman spectroscopic device 110 which transmits the request for the data.
In another embodiment, after receiving the request for the data, the server 120 initiates data communications with other Raman spectroscopic devices to acquire inspection data thereof, and forwards the acquired inspection data to the Raman spectroscopic device 110.
In another embodiment, after receiving the request for the data, the server 120 forwards the request for the data to various Raman spectroscopic devices, so that each of the other Raman spectroscopic devices transmits respective inspection data directly to the Raman spectroscopic device 110.
In the Raman spectroscopic device according to the disclosed technology and the communication method thereof, a communication structure is established using the UDP protocol. Thus, system integration can be realized in a simpler and quicker manner, “plug and play” of the Raman spectroscopic device can be realized, and the Raman spectroscopic device can be monitored and managed by the management terminal. In addition, due to the use of connectionless communication, there is no need to maintain communication connections, which reduces the burden of the server. When the device has a new inspection result, it can immediately report the inspection result to the server or the management terminal, or upload the inspection result to the server or the management terminal when a network is available and the device is idle, or load historical inspection data which has not been uploaded when the device is powered on and upload the inspection result to the server or the management terminal when a network is available and the device is idle, or upload the inspection result to the server or the management terminal at certain time periods according to requirements of a user of the management terminal.
While the disclosed technology has been described with reference to several typical embodiments, it is apparent to those skilled in the art that the terms are used for illustration and explanation purpose and not for limitation. The disclosed technology may be practiced in various forms without departing from the spirit or essence of the disclosed technology. It should be understood that the embodiments are not limited to any of the foregoing details, and shall be interpreted broadly within the spirit and scope as defined by the following claims. Therefore, all of modifications and alternatives falling within the scope of the claims or equivalents thereof are encompassed by the claims as attached.
The various features and processes described herein may be implemented independently of one another, or may be combined in various ways. All possible combinations and sub combinations are intended to fall within the scope of this disclosure. In addition, certain methods or process blocks may be omitted in some implementations. The methods and processes disclosed herein are also not limited to any particular sequence, and the blocks or states relating thereto can be performed in any other sequences that are appropriate. For example, described blocks or states may be performed in an order other than that specifically disclosed, or multiple blocks or states may be combined in a single block or state. The example blocks or states may be performed in serial, in parallel, or in some other manner as appropriate. Blocks or states may be added to or removed from the disclosed example embodiments as suitable. The example systems and components described herein may be configured differently than described. For example, elements may be added to, removed from, or rearranged compared to the disclosed example embodiments.
Number | Date | Country | Kind |
---|---|---|---|
201611220115.7 | Dec 2016 | CN | national |