Information processing system, server device, client device, and information processing method
By integrating an MQTT broker for efficient data exchange through publish/subscribe mechanisms, the information processing system addresses the inefficiencies of traditional request/response communication methods, enhancing communication efficiency and processing speed.
Patent Information
- Application Number
- JP2021019080
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-09
- Publication Date
- 2025-04-28
- Estimated Expiration
- 2041-02-09
AI Technical Summary
Existing information processing systems using request/response communication methods, such as HTTP, are inefficient as they require multiple exchanges of requests and responses for a single processing request, leading to increased communication overhead.
The system employs an MQTT broker for communication between a client device and a server device, allowing for efficient data exchange through MQTT topics, reducing the need for repeated request/response exchanges by utilizing publish/subscribe mechanisms.
This approach enhances communication efficiency by allowing multiple data exchanges without the need for repeated requests and responses, thereby improving processing speed and reducing system overhead.
Smart Images

Figure 0007669153000001 
Figure 0007669153000002 
Figure 0007669153000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing system, a server device, a client device, and an information processing method. [Background technology]
[0002] 2. Description of the Related Art In information processing systems in which a server device executes information processing in response to a request from a client device, request / response type communication such as HTTP (hypertext transfer protocol) is widely used. However, since request / response type communication is completed in a single exchange of a request and a response, it is not possible to communicate multiple times regarding a single request.
[0003] For this reason, when the server device executes a process in response to a single request from a client device, if the server device requests a certain process from the client device, the server device must return a response to the client device even if the process has not yet been completed, and then communicate with the client device by exchanging a new request and response. In this case, a new request and response must also be exchanged to notify the client device of the completion of the actual process. In other words, the request and response must be exchanged three or more times for one process request from the client device, which is inefficient. Although it may be possible to improve communication efficiency by adopting a different communication method, modifying existing information processing systems that are configured to use request / response communication in this way would require a great deal of effort.
[0004] For these reasons, there has been a demand for improving communication efficiency when request / response type communication is used and data needs to be exchanged when a server device executes a process in response to a single processing request from a client device. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 6-266968 Summary of the Invention [Problem to be solved by the invention]
[0006] The problem that the present invention aims to solve is to provide an information processing system, a server device, a client device, and an information processing method that can improve communication efficiency when data needs to be exchanged when a server device executes a process in response to a single processing request from a client device, while using request / response type communication. [Means for solving the problem]
[0007] The information processing system according to the embodiment is an information processing system including a client device and a server device that can communicate with each other via a communication network to which an MQTT (message queueing telemetry transport) broker is connected, and includes a transmission means, a first subscribing means, a first processing means, and a termination means provided in the client device, and a generation means, The system includes a first notification means, a first publishing means, a second processing means, and a second publishing means. The transmitting means transmits a processing request to the server device using request / response type communication. Generate In response to receiving the processing request transmitted by the transmitting means, Create a first topic. The first notification method is The first topic is notified to the client device in response to the processing request. , No. Subscribe to topic 1 to the MQTT broker. Publish The means publishes request data for the client device to the MQTT broker on a first topic. The first processing means receives a request from the MQTT broker on the first topic. The request dataDelivered Then, the relevant The second processing means executes information processing in response to the processing request. The second publishing means publishes notification data of the end of processing to the MQTT broker by the first topic in response to the end of the information processing by the second processing means. The terminating means Regarding the first topic When the notification data is delivered from the MQTT broker, the subscription to the first topic is terminated. [Brief description of the drawings]
[0008] [Figure 1] 1 is a block diagram showing the main circuit configuration of a client device and a server device constituting an information processing system according to an embodiment; [Diagram 2] 2 is a flowchart of information processing by a processor provided in the client device in FIG. 1; [Diagram 3] 2 is a flowchart of information processing by a processor included in the server device in FIG. 1; [Figure 4] A sequence diagram for registering the purchase of a product that displays a two-line barcode. [Diagram 5] FIG. 11 is a sequence diagram showing a case where change runs out during a cash payment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an example of an embodiment will be described with reference to the drawings. FIG. 1 is a block diagram showing the main circuit configuration of a client device 10 and a server device 20 that constitute an information processing system 100 according to this embodiment. The information processing system 100 includes a client device 10 and a server device 20. The client device 10 is an information processing device that serves as, for example, a user interface terminal for receiving operations by an operator. The server device 20 is an information processing device that executes information processing in response to a request from the client device 10. The information processing system 100 is used, for example, as a POS (point-of-sale) system.
[0010] The client device 10 and the server device 20 can communicate with each other via a communication network 200. The client device 10 and the server device 20 can each communicate with an MQTT broker 300 via the communication network 200. As the communication network 200, for example, the Internet, a virtual private network (VPN), a local area network (LAN), a public communication network, a mobile communication network, etc. can be used alone or in appropriate combination. The MQTT broker 300 distributes data according to the MQTT protocol. That is, when a topic and a message are published from an arbitrary publisher via the communication network 200, the MQTT broker 300 distributes the message to subscribers who subscribe to the topic.
[0011] The client device 10 includes a processor 11, a main memory 12, an auxiliary storage unit 13, a touch panel 14, an input unit 15, a wireless unit 16, and a transmission path 17. The processor 11, the main memory 12, the auxiliary storage unit 13, the touch panel 14, the input unit 15, and the wireless unit 16 are capable of communicating with each other via the transmission path 17. The processor 11, the main memory 12, and the auxiliary storage unit 13 are connected by the transmission path 17 to configure a computer for executing information processing.
[0012] The processor 11 corresponds to the central part of the computer. The processor 11 executes information processing for realizing various functions of the client device 10 in accordance with an operating system and information processing programs such as application programs. The processor 11 is, for example, a CPU (central processing unit).
[0013] The main memory 12 corresponds to the main storage portion of the computer. The main memory 12 includes a nonvolatile memory area and a volatile memory area. The main memory 12 stores the information processing program in the nonvolatile memory area. The main memory 12 may store data required for the processor 11 to execute information processing in a nonvolatile or volatile memory area. The main memory 12 uses the volatile memory area as a work area where data is appropriately rewritten by the processor 11. The nonvolatile memory area is, for example, a ROM (read only memory). The volatile memory area is, for example, a RAM (random access memory).
[0014] The auxiliary storage unit 13 corresponds to the auxiliary storage portion of the computer. As the auxiliary storage unit 13, for example, a storage unit using a well-known storage device such as an EEPROM (electric erasable programmable read-only memory), a HDD (hard disk drive), or an SSD (solid state drive) can be used. The auxiliary storage unit 13 stores data used by the processor 11 in performing various processes, or data created by the processes in the processor 11. The auxiliary storage unit 13 may also store the above-mentioned information processing program.
[0015] The touch panel 14 functions as an operation device and a display device for the client device 10. The touch panel 14 receives operations from a customer to input various instructions. Under the control of the processor 11, the touch panel 14 displays various screens showing various information to be notified to the customer and GUI (graphical user interface) elements for receiving operations.
[0016] The input unit 15 inputs data required for the server device 20 to execute processing in response to a request from the client device 10. When the client device 10 is used as a user interface terminal of a POS system as described above, for example, a camera unit is used as the input unit 15. For example, other types of units such as a barcode scanner, a card reader, or a wireless tag reader may be used as the input unit 15, or multiple types of units may be included in the input unit 15. Note that a unit suitable for the application of the client device 10 is provided as the input unit 15.
[0017] The wireless unit 16 performs processing for wireless data communication via the communication network 200. As the wireless unit 16, for example, a well-known communication device for performing data communication via a mobile communication network can be used. Alternatively, as the wireless unit 16, for example, a well-known communication device conforming to the IEEE802.11 standard can be used. Instead of or in addition to the wireless unit 16, a communication device for wired communication via a communication cable may be provided. The transmission path 17 includes an address bus, a data bus, and control signal lines, and transmits data and control signals between the connected components.
[0018] The auxiliary storage unit 13 stores the client application APA, which is one of the information processing programs. The client application APA is an application program, and describes information processing for realizing the operation of the client device 10. For example, a portable general-purpose information processing device such as a smartphone or a tablet computer can be used as the client device 10. The transfer of the client device 10 is generally performed in a state where the hardware in which the client application APA is not stored in the auxiliary storage unit 13 is separate from the client application APA. In this case, the client device 10 is configured by writing the client application APA to the auxiliary storage unit 13 in response to an operation by any worker. Note that the client device 10 may be realized as a stationary device such as a POS terminal installed in a store. In this case, the transfer of the client device 10 is generally performed in a state where the client application APA is stored in the auxiliary storage unit 13. However, the client device 10 may be configured by rewriting another client application stored in the auxiliary storage unit 13 into the client application APA in response to an operation by any worker. The client application APA can be transferred by recording it on a removable recording medium such as a magnetic disk, a magneto-optical disk, an optical disk, a semiconductor memory, or by communication via a network. The client application APA may be stored in the main memory 12.
[0019] The server device 20 includes a processor 21, a main memory 22, an auxiliary storage unit 23, a communication unit 24, and a transmission path 25. The processor 21, the main memory 22, the auxiliary storage unit 23, and the communication unit 24 are capable of communicating with each other via the transmission path 25. The processor 21, the main memory 22, and the auxiliary storage unit 23 are connected by the transmission path 25 to configure a computer for controlling the server device 20.
[0020] The processor 21 corresponds to the central part of the computer. The processor 21 executes information processing for realizing various functions of the server device 20 in accordance with an operating system and information processing programs such as application programs. The processor 21 is, for example, a CPU.
[0021] The main memory 22 corresponds to the main storage portion of the computer. The main memory 22 includes a nonvolatile memory area and a volatile memory area. The main memory 22 stores the information processing program in the nonvolatile memory area. The main memory 22 may store data required for the processor 21 to execute information processing in a nonvolatile or volatile memory area. The main memory 22 uses the volatile memory area as a work area where data is appropriately rewritten by the processor 21. The nonvolatile memory area is, for example, a ROM. The volatile memory area is, for example, a RAM.
[0022] The auxiliary storage unit 23 corresponds to the auxiliary storage portion of the computer. As the auxiliary storage unit 23, for example, a storage unit using a well-known storage device such as an EEPROM, HDD, or SSD can be used. The auxiliary storage unit 23 stores data used by the processor 21 when performing various processes, or data created by the processes in the processor 21. The auxiliary storage unit 23 may also store the information processing program.
[0023] The communication unit 24 performs processing for data communication via the communication network 200. A well-known communication device for performing data communication via the Internet, for example, can be used as the communication unit 24. Instead of or in addition to the communication unit 24, a communication device for wireless communication may be provided. The transmission path 25 includes an address bus, a data bus, and control signal lines, and transmits data and control signals between the connected components.
[0024] The auxiliary storage unit 23 stores the server application APB, which is one of the information processing programs. The server application APB is an application program, and describes information processing for realizing the operation of the server device 20. For example, a general-purpose computer device can be used as the server device 20. The server device 20 is generally transferred in a state where the hardware in a state where the server application APB is not stored in the auxiliary storage unit 23 is separate from the server application APB. In this case, the server device 20 is configured by writing the server application APB to the auxiliary storage unit 23 in response to an operation by an arbitrary worker. The server device 20 may be transferred in a state where the server application APB is stored in the auxiliary storage unit 13. Alternatively, the server device 20 may be configured by rewriting another server application stored in the auxiliary storage unit 23 into the server application APB in response to an operation by an arbitrary worker. The server application APB can be transferred by recording it on a removable recording medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory, or by communication via a network. The server application APB may be stored in the main memory 22.
[0025] Next, the operation of the information processing system 100 configured as above will be described. Note that the contents of the various processes described below are merely examples, and it is possible to change the order of some of the processes, omit some of the processes, or add other processes as appropriate. For example, in the following description, in order to easily explain the characteristic operations of this embodiment, the description of some of the processes is omitted. For example, when some kind of error occurs, a process to deal with the error may be performed, but the description of such a process is omitted. A distinctive feature of the information processing system 100 is the procedure of communication between the client device 10 and the server device 20, so the following description will focus on the operations of the client device 10 and the server device 20 related to this.
[0026] FIG. 2 is a flowchart of information processing by the processor 11. In the client device 10, while operating in cooperation with the server device 20, the processor 11 executes the information processing shown in FIG. 2 (hereinafter referred to as the first communication processing) in accordance with the client application APA, separately from the information processing for that operation (hereinafter referred to as the first main processing).
[0027] In ACT11, the processor 11 waits for the need to request processing from the server device 20. If the first main processing has caused the need to request some processing from the server device 20, the processor 11 determines YES and proceeds to ACT12. As ACT 12, the processor 11 transmits an HTTP request to the server device 20. For example, the processor 11 causes the wireless unit 16 to transmit an HTTP request to which request data related to a processing request to the server device 20 is added, to the communication network 200, addressed to the server device 20. In this manner, the processor 11 executes information processing based on the client application APA, and the computer with the processor 11 as its central part functions as a transmitting means.
[0028] FIG. 3 is a flowchart of information processing by the processor 21. When the HTTP request is transmitted to the server device 20 via the communication network 200 and received by the communication unit 24, the processor 21 executes the information processing shown in FIG. 3 (hereinafter, referred to as second communication processing) in accordance with the server application APB.
[0029] As ACT31, the processor 21 generates two MQTT topics. One of these MQTT topics is for the client device 10 to receive from the MQTT broker 300 the delivery of request data published from the server device 20, and is hereinafter referred to as a first topic. The other MQTT topic is for the server device 20 to receive from the MQTT broker 300 the delivery of response data published from the client device 10, and is hereinafter referred to as a second topic. For example, the processor 21 generates the first topic and the second topic according to a predetermined rule so that the first topic and the second topic can be distinguished from other MQTT topics that may be used in the MQTT broker 300. The processor 21 may select the first topic and the second topic from predetermined candidates. Only one candidate each may be determined for the first topic and the second topic.
[0030] As ACT32, the processor 21 transmits an HTTP response to the client device 10. For example, the processor 21 causes the communication unit 24 to transmit the HTTP response to which notification data including the first topic and the second topic determined in ACT31 is added, to the client device 10 via the communication network 200. In this way, the processor 21 executes information processing based on the server application APB, and the computer having the processor 21 as a central part functions as a first notification means and a second notification means.
[0031] After the processor 11 in the client device 10 transmits the HTTP request in ACT 12 in FIG. In ACT13, the processor 11 waits for an HTTP response to the HTTP request in ACT 12. Then, when the HTTP response is transmitted to the client device 10 via the communication network 200 and received by the wireless unit 16, the processor 11 determines YES and proceeds to ACT14.
[0032] As ACT 14, the processor 11 extracts the first topic and the second topic from the notification data added to the HTTP response. The processor 11 stores the extracted first topic and second topic in the main memory 12 or the auxiliary storage unit 13, for example. As ACT15, the processor 11 subscribes to the first topic to the MQTT broker 300. This causes the client device 10 to become a subscriber to the first topic. This is also called starting a subscription. Thus, the processor 11 executes information processing based on the client application APA, and the computer with the processor 11 as the central part functions as a first subscribing means.
[0033] On the other hand, after the processor 21 in the server device 20 transmits the HTTP response in ACT 32 in FIG. As ACT33, the processor 21 starts a process based on the request data added to the HTTP request (hereinafter referred to as a second main process). The processor 21 executes the second main process in parallel with the second communication process, for example, as information processing of a different thread from the second communication process. Thus, the processor 21 executes information processing based on the server application APB, and the computer with the processor 21 as the central part functions as a second processing means.
[0034] In ACT 34, the processor 21 checks whether the second main process has ended. If the process has not ended, the processor 21 judges that the result is NO and proceeds to ACT 35. In ACT35, the processor 21 checks whether or not it has become necessary to obtain data from the client device 10 in the second main process. If it is not necessary to obtain data, the processor 21 determines NO and proceeds to ACT36. In ACT36, the processor 21 checks whether or not it is necessary to request the client device 10 to process the second main process. If it is not necessary to request the process, the processor 21 determines NO and returns to ACT34. Thus, the processor 21, as ACT34 to ACT36, waits for the process to end or for the need to obtain data or issue a process request.
[0035] When the processor 21 proceeds with the second main process, it may be necessary to acquire data from the requesting client device 10. In this case, the processor 21 determines YES in ACT35 and proceeds to ACT37. As ACT37, the processor 21 subscribes to the second topic to the MQTT broker 300. This causes the server device 20 to become a subscriber to the second topic. Thus, the processor 21 executes information processing based on the server application APB, and the computer having the processor 21 as the central part functions as a second subscribing means.
[0036] As ACT38, the processor 21 publishes request data for requesting the client device 10 to transmit the data to be acquired to the MQTT broker 300 in a first topic. In this way, the processor 21 executes information processing based on the server application APB, and the computer having the processor 21 as a central part functions as a first publishing means.
[0037] When publishing is performed on the first topic, the MQTT broker 300 distributes the published data to all subscribers who have subscribed to the first topic. At this time, since the client device 10 is a subscriber to the first topic as described above, the MQTT broker 300 distributes the request data to the client device 10.
[0038] After the processor 11 in the client device 10 subscribes to the first topic in ACT15 in FIG. In ACT16, the processor 11 waits for distribution from the MQTT broker 300. Then, the processor 11 determines YES if the request data has been distributed by the MQTT broker 300 as described above, and proceeds to ACT17.
[0039] In ACT 17, the processor 11 checks whether the distributed request data is a request for execution of processing. If the distributed request data is a request for data transmission as described above, the processor 11 judges the result as NO and proceeds to ACT 18. In ACT 18, the processor 11 checks whether the distributed request data is a request for data transmission. If the distributed request data is a request for data transmission as described above, the processor 11 judges the result as YES and proceeds to ACT 19.
[0040] As ACT 19, the processor 11 acquires data to be transmitted in response to the request data (hereinafter referred to as response data). For example, the processor 11 displays a screen on the touch panel 14 that guides the operation for acquiring the response data. Then, the processor 11 acquires, as the response data, data inputted by the input unit 15 under the operation performed by the operator following the guidance on the screen. In ACT20, the processor 11 publishes the response data to the MQTT broker 300 using the second topic. Then, the processor 11 thereafter returns to the standby state in ACT16.
[0041] When publishing is performed on the second topic, the MQTT broker 300 distributes the published data to all subscribers who have subscribed to the second topic. At this time, since the server device 20 is a subscriber to the second topic as described above, the MQTT broker 300 distributes the response data to the server device 20.
[0042] After publishing the request data in ACT 38 in FIG. 3, the processor 21 in the server device 20 proceeds to ACT 39. In ACT 39, the processor 21 checks whether the second main process has ended. If the process has not ended, the processor 21 judges that the result is NO and proceeds to ACT 40. In ACT40, the processor 21 checks whether or not a distribution has been made on the second topic. If the processor 21 cannot confirm the distribution, it determines that the result is NO, and returns to ACT39. Thus, the processor 21 waits for the process to end or for distribution on the second topic in ACT39 and ACT40. Then, when the response data is distributed on the second topic as described above, the processor 21 judges YES in ACT40 and proceeds to ACT41.
[0043] As ACT41, the processor 21 adds the distributed response data as data to be processed in the second main processing. For example, the processor 21 stores the distributed response data as data to be processed in the main memory 22 or the auxiliary storage unit 23. Then, in the second main processing, the processor 21 uses the data stored in the main memory 22 or the auxiliary storage unit 23 as described above. In ACT42, the processor 21 ends the subscription to the second topic, and thereafter, the processor 21 returns to the standby state in ACT34 to ACT36. Thus, in the second main process, if data needs to be acquired from the client device 10 a plurality of times, the processor 21 repeats ACT37 to ACT41.
[0044] On the other hand, when the processor 21 proceeds with the second main process, it may be necessary to make the requesting client device 10 perform some process other than data transmission. In this case, the processor 21 judges YES in ACT36 and proceeds to ACT43. As ACT43, the processor 21 publishes request data for requesting the client device 10 to execute processing to the MQTT broker 300 in a first topic. In this way, the processor 21 executes information processing based on the server application APB, and the computer having the processor 21 as a central part functions as a first publishing means.
[0045] When the request data is delivered to the client device 10 by the MQTT broker 300, the processor 11 proceeds to ACT 17 as described above. Here, since the delivered request data requests the execution of processing, the processor 11 judges YES in ACT 17 and proceeds to ACT 21. In ACT21, the processor 11 adds processing according to the distributed request data to a process matrix to be performed in the first main process. In response to this, the processor 11 executes processing according to the distributed request data in the first main process. Thus, in the client device 10, processing according to the request from the server device 20 is executed. When the processor 11 finishes ACT21, it returns to the standby state of ACT16. In this way, the processor 11 executes information processing based on the client application APA, and the computer with the processor 11 as its central part functions as a first processing means.
[0046] Now, if the processor 21 in the server device 20 ends the second main process while the processor 21 is in the standby state of ACT39 and ACT40 in FIG. 3, the processor 21 determines YES in ACT39 and proceeds to ACT44. In ACT44, the processor 21 ends the subscription to the second topic. Then, the processor 21 proceeds to ACT45. If the processor 21 ends the second main process while the processor 21 is in the standby state of ACT34 to ACT36, the processor 21 determines YES in ACT34 and proceeds to ACT45.
[0047] As ACT45, the processor 21 publishes notification data for notifying the completion of processing in response to the HTTP request to the MQTT broker 300 in the first topic. The processor 21 then ends the second communication processing. Thus, the processor 21 executes information processing based on the server application APB, and the computer with the processor 21 as the central part functions as a second publishing means.
[0048] When the above notification data is delivered to the client device 10 by the MQTT broker 300, the processor 11 proceeds to ACT17 in Fig. 2 as described above. Here, since the delivered data is notification data, the processor 11 judges NO in both ACT17 and ACT18 and proceeds to ACT22. As ACT22, the processor 11 ends the subscription to the first topic. Then, the processor 11 ends the first communication process. Thus, the processor 11 executes information processing based on the client application APA, and the computer having the processor 11 as a central part functions as a termination means.
[0049] Next, an application example of the above-described processing will be described. (First application example) As a first application example, attention is focused on a POS system in which a purchased product is registered in a POS server in response to reading a barcode at a POS terminal. In this case, the POS terminal functions as a client device 10, and the POS server functions as a server device 20.
[0050] FIG. 4 is a sequence diagram relating to the purchase registration of a product that displays a two-line barcode. Note that the parentheses at the end of the description of each event shown in FIG. 4 indicate that the operation of processors 11, 21 for realizing that operation is either one of the operations shown in FIG. 2 or FIG. The two-line barcode is a JAN (Japanese article number) code defined for books, and consists of two barcodes, an A code and a B code.
[0051] At event EVAA, the POS terminal reads the A code. At the event EVAB, the POS terminal transmits an HTTP request to the POS server (ACT12). The POS terminal adds to this HTTP request request data including data identifying that the request is for purchase registration and the barcode data of the read A-code.
[0052] In response to the event EVAC, the POS server transmits an HTTP response to the POS terminal (ACT32). The POS server adds notification data including the first topic and the second topic to this HTTP response. At the event EVAD, the POS server starts a registration process for adding a new purchased item to the list of purchased items (ACT33).
[0053] In the event EVAE, the POS server confirms that since the barcode data included in the request data is the A code of a two-line barcode, it is necessary to obtain the B code (ACT35). At the event EVAF, the POS server subscribes to the second topic to the MQTT broker 300 (ACT37). In response to the event EVAG, the POS terminal subscribes to the first topic notified in the HTTP response to the MQTT broker 300 (ACT15). The order of event EVAF and event EVAG may be reversed.
[0054] In response to the event EVAH, the POS server publishes the request data, which includes data identifying that the request is a B code transmission request, to the MQTT broker 300 in the first topic (ACT38). The MQTT broker 300 distributes the request data published in the event EVAH as the event EVAI to the POS terminals that are subscribed to the first topic.
[0055] At the event EVAJ, the POS terminal displays a screen instructing the operator to read the B code (ACT19). At event EVAK, the POS terminal reads the B code (ACT19). At the event EVAL, the POS terminal publishes the barcode data representing the B code as response data to the MQTT broker 300 in the second topic (ACT20).
[0056] The MQTT broker 300 distributes the response data published in the event EVAL as the event EVAM to the POS servers that are subscribed to the second topic. At the event EVAN, the POS server registers the product identified by the B code represented by the response data delivered above and the A code included in the request data added to the HTTP request as the purchased product. This completes the process in response to the HTTP request for the event EVAB.
[0057] At the event EVAO, the POS server ends the subscription to the second topic (ACT44). In response to the event EVAP, the POS server publishes notification data for notifying the MQTT broker 300 of the end of processing using the first topic (ACT45).
[0058] The MQTT broker 300 distributes the notification data published in the event EVAP as the event EVAQ to the POS terminals that are subscribing to the first topic. At the event EVAR, the POS terminal ends the subscription to the first topic (ACT22).
[0059] In this manner, the POS server performs processing in response to the HTTP request, including the operation of obtaining data from the POS terminal other than that sent in the HTTP request. However, the MQTT protocol is used for communication to obtain the additional data, and the HTTP request and HTTP response are exchanged only once.
[0060] (Second application example) As a second application example, we focus on a POS system in which cash settlement based on the purchase registration result at a cash register terminal is performed by an automatic change dispenser under the control of a device control server. In this case, the cash register terminal functions as a client device 10, and the device control server functions as a server device 20.
[0061] FIG. 5 is a sequence diagram showing what happens when change runs out during a cash payment. Note that the parentheses at the end of the description of each event shown in FIG. 5 indicate that the operation of processors 11, 21 for realizing that operation is either one of the operations shown in FIG. 2 or FIG.
[0062] When the operator of the cash register has completed registering all the items purchased in one transaction and the customer has selected cash payment, the operator instructs the customer to pay with the automatic change dispenser and then instructs the cash register to execute the cash payment. In response to the instruction to execute the cash payment at the event EVBA, the cash register terminal sends an HTTP request to the device control server (ACT12). The cash register terminal adds to this HTTP request request data including data identifying the request as a cash payment and data on the amount to be paid.
[0063] In response to the event EVBB, the device control server transmits an HTTP response to the cash register terminal (ACT32). The device control server adds notification data including the first topic and the second topic to this HTTP response. At the event EVBC, the cash register terminal subscribes to the first topic notified in the HTTP response to the MQTT broker 300 (ACT15).
[0064] In response to the event EVBD, the device control server starts processing for controlling the automatic change machine for cash settlement (ACT33). In response to the event EVBE, the device control server sets the automatic change machine to counting mode, which is a mode for counting the amount of inserted cash.
[0065] When a customer deposits cash into the automatic change machine, the automatic change machine counts the amount of the deposit and notifies the device control server. At the event EVBF, the device control server obtains the inserted amount notified by the automatic change machine as described above. At event EVBG, the device control server confirms that the automatic change dispenser is short of change. The timing relationship between the event EVBC and the events EVBS to EVBG may be different from that shown in the figure.
[0066] In response to the event EVBH, the device control server publishes, in the first topic, to the MQTT broker 300, request data including data identifying that this is a processing request for notifying an error of insufficient change (ACT43). The MQTT broker 300 distributes the request data published as the event EVBH to the cash register terminal that is subscribing to the first topic as the event EVBI. In the cash register terminal, a process corresponding to the distributed process request is added to the process queue (ACT21).
[0067] At event EVBJ, the cash register terminal displays an error screen instructing the operator to replenish the automatic change dispenser with coins for change by executing the process added to the process queue as described above. The operator of the cash register terminal follows the instructions on the error screen to replenish the automatic change machine with coins. At event EVBK, the device control server confirms that the shortage of change has been resolved by replenishing the coins as described above. In response to the event EVBL, the device control server controls the automatic change dispenser to dispense the change. This ends the cash payment process in response to the HTTP request as the event EVBA.
[0068] In response to the event EVBM, the device control server publishes notification data for notifying the MQTT broker 300 of the end of processing in the first topic (ACT45). The MQTT broker 300 distributes the notification data published as the event EVBN to the cash register terminals that are subscribed to the first topic. At the event EVBO, the cash register terminal stops subscribing to the first topic (ACT22).
[0069] As described above, processing at the cash register terminal is required to complete the process requested in the HTTP request, but the MQTT protocol is used for communication to request that processing, and the HTTP request and HTTP response are exchanged only once.
[0070] As described above, the information processing system 100 temporarily switches the protocol for data exchange between the client device 10 and the server device 20 to the MQTT protocol by notifying the client device 10 of the MQTT topic from the server device 20 in the HTTP response. As a result, although the communication between the client device 10 and the server device 20 is based on HTTP, which is a request / response type communication, when data needs to be exchanged when the server device 20 executes a process in response to a single processing request from the client device 10, efficient communication can be performed using the MQTT protocol.
[0071] This embodiment can be modified in various ways as follows. 3, the processor 21 in the server device 20 may not include the second topic in the HTTP response, but may include the second topic in the request data published in ACT 38. In this case, the processor 21 may further not generate the second topic in ACT 31, but may generate the second topic either before or after ACT 37. In other words, the second topic may be generated at any timing before notifying the client device 10.
[0072] In the server device 20, the processor 21 may execute ACT 37 in Fig. 3 before proceeding to ACT 34 for the first time. In this case, if the processor 21 judges YES in ACT 34, the process proceeds to ACT 44.
[0073] In the embodiment, the server device 20 can handle both a case where the client device 10 requests a process that involves data acquisition and a case where the client device 10 requests a process that does not involve data acquisition. However, it may handle either case. If the server device 20 only requests a process that does not involve data acquisition, it is not necessary to generate and notify the second topic.
[0074] Instead of HTTP, request / response type communication other than HTTP may be applied.
[0075] Each function realized by the processors 11 and 21 through information processing can be realized in part or in whole by hardware that executes information processing not based on a program, such as a logic circuit, etc. Also, each of the above functions can be realized by combining the above hardware, such as the logic circuit, with software control.
[0076] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. The invention as originally claimed in the present application is set forth below. [Appendix 1] An information processing system including a client device and a server device that can communicate with each other via a communication network to which an MQTT (message queueing telemetry transport) broker is connected, a transmission means provided in the client device for transmitting a processing request to the server device using request / response type communication; a first notification means provided in the server device, which notifies the client device of a first topic in a response to the processing request transmitted by the transmission means in response to the processing request; a first subscribing means provided in the client device and configured to subscribe to the first topic notified by the first notification means to the MQTT broker; A first publishing means provided in the server device for publishing request data for the client device to the MQTT broker on a first topic; A first processing means provided in the client device and executing processing according to request data distributed from the MQTT broker regarding a first topic; A second processing means provided in the server device for executing information processing in response to the processing request; A second publishing means is provided in the server device, and in response to the completion of the information processing by the second processing means, publishes notification data of the completion of the processing to the MQTT broker by a first topic; A termination means is provided in the client device, and terminates subscription to the first topic when notification data published by the second publishing means is delivered from the MQTT broker; An information processing system comprising: [Supplementary Note 2] A second notification means is provided in the server device, and notifies the client device of a second topic in a response to the processing request or by using publishing by the first publishing means; A second subscribing means is provided in the server device and subscribes to the second topic notified by the second notification means to the MQTT broker; Further equipped with The first processing means executes a process of publishing response data corresponding to the request data distributed from the MQTT broker to the MQTT broker using a second topic notified by the second notification means; The second processing means executes information processing in response to the processing request using response data distributed from the MQTT broker regarding a second topic. 2. An information processing system according to claim 1. [Appendix 3] A server device constituting an information processing system together with a client device that is capable of communicating via a communication network to which an MQTT broker is connected, a first notification means for, in response to receiving a processing request transmitted from the client device using request / response type communication, notifying the client device of a first topic in a response to the processing request; A first publishing means for publishing request data for the client device to the MQTT broker on a first topic; A second processing means for executing information processing in response to the processing request; A second publishing means for publishing notification data of the end of processing to the MQTT broker in a first topic in response to the end of the information processing by the second processing means; A server device comprising: [Appendix 4] A client device constituting an information processing system together with a server device that is capable of communicating via a communication network to which an MQTT broker is connected, A transmitting means for transmitting a processing request to the server device using request / response type communication; a first subscribing means for subscribing to the MQTT broker a first topic notified from the server device in a response to the processing request transmitted by the transmitting means; A first processing means for executing processing according to request data distributed from the MQTT broker regarding a first topic in response to publishing from the server device; A termination means for terminating subscription to a first topic when notification data published from the server device is distributed from the MQTT broker; A client device comprising: [Supplementary Note 5] An information processing method by a client device and a server device that can communicate with each other via a communication network to which an MQTT broker is connected, the client device transmits a processing request to the server device using request / response type communication; the server device notifies the client device of the first topic in a response to the processing request in response to receiving the processing request transmitted; The client device subscribes to the notified first topic to the MQTT broker; The server device publishes request data for the client device to the MQTT broker on a first topic; The client device executes a process according to request data distributed from the MQTT broker regarding a first topic; the server device executes information processing in response to the processing request; The server device publishes notification data of the completion of the processing to the MQTT broker in a first topic in response to the completion of the information processing in response to the processing request; When the published notification data is delivered from the MQTT broker, the client device ends the subscription to the first topic. Information processing methods. [Explanation of symbols]
[0077] 10...client device, 20...server device, 11,21...processor, 12,22...main memory, 13,23...auxiliary storage unit, 14...touch panel, 15...input unit, 16...wireless unit, 17,25...transmission path, 24...communication unit, 100...information processing system, 200...communication network, 300...MQTT broker.
Claims
1. An information processing system including a client device and a server device that can communicate with each other via a communication network to which an MQTT (message queueing telemetry transport) broker is connected, a transmission means provided in the client device for transmitting a processing request to the server device using request / response type communication; a generating means provided in the server device, the generating means generating a first topic in response to receiving the processing request transmitted by the transmitting means; a first notification means provided in the server device for notifying the client device of the first topic in a response to the processing request; A first subscribing means provided in the client device for subscribing to the first topic to the MQTT broker; A first publishing means provided in the server device for publishing request data for the client device to the MQTT broker on the first topic; A first processing means is provided in the client device, and when the request data is delivered from the MQTT broker regarding the first topic, executes processing according to the request data; A second processing means provided in the server device for executing information processing in response to the processing request; A second publishing means is provided in the server device, and in response to the completion of the information processing by the second processing means, publishes notification data of the completion of the processing to the MQTT broker via the first topic; A termination means provided in the client device, which terminates subscription to the first topic when the notification data regarding the first topic is delivered from the MQTT broker; An information processing system comprising:
2. The generating means generates a second topic in addition to the first topic in response to receiving the processing request; a second notification means provided in the server device and configured to notify the client device of the second topic in a response to the processing request or by utilizing publishing by the first publishing means; A second subscribing means provided in the server device for subscribing to the second topic to the MQTT broker; Further equipped with The first processing means executes a process of publishing response data corresponding to the request data distributed from the MQTT broker to the MQTT broker on the second topic; The second processing means executes information processing in response to the processing request using response data distributed from the MQTT broker regarding the second topic. The information processing system according to claim 1 .
3. A server device that configures an information processing system together with a client device that is capable of communicating via a communication network to which an MQTT broker is connected, a generating means for generating a first topic in response to receiving a processing request transmitted from the client device using request / response type communication; a first notification means for notifying the client device of the first topic in a response to the processing request; A first publishing means for publishing request data for requesting processing from the client device to the MQTT broker on the first topic in order to have the MQTT broker distribute the request data to the client device in response to the first topic being subscribed to by the client device; A second processing means for executing information processing in response to the processing request; A second publishing means for publishing notification data of the end of processing to the MQTT broker on the first topic in response to the end of the execution of information processing by the second processing means, so as to have the MQTT broker distribute the notification data to the client device to end the subscription of the first topic by the client device; A server device comprising:
4. A client device constituting an information processing system together with a server device that is capable of communicating via a communication network to which an MQTT broker is connected, A transmitting means for transmitting a processing request to the server device using request / response type communication; a first subscribing means for subscribing to the MQTT broker a first topic that is generated by the server device in response to the processing request and notified to the client device from the server device in a response to the processing request; A first processing means for executing processing according to the request data published from the server device to the MQTT broker in the first topic in response to the request data being distributed from the MQTT broker to the client device regarding the first topic; In response to the completion of information processing in the server device in response to the processing request, notification data of the completion of processing is published from the server device to the MQTT broker in the first topic, and when the notification data is distributed from the MQTT broker to the client device, a termination means for terminating the subscription to the first topic; A client device comprising:
5. An information processing method by a client device and a server device that can communicate with each other via a communication network to which an MQTT broker is connected, the client device transmits a processing request to the server device using request / response type communication; the server device generates a first topic in response to receiving the transmitted processing request; the server device notifies the client device of the first topic in a response to the processing request; The client device subscribes to the first topic to the MQTT broker; The server device publishes request data for the client device to the MQTT broker on the first topic; When the request data is delivered from the MQTT broker to the client device regarding the first topic, the client device executes processing according to the request data; the server device executes information processing in response to the processing request; The server device publishes notification data of the completion of processing to the MQTT broker on the first topic in response to the completion of the information processing in response to the processing request; When the notification data regarding the first topic is delivered from the MQTT broker, the client device terminates the subscription to the first topic. Information processing methods.
Citation Information
Patent Citations
Electronic cash register
JP1994266968A
Communication apparatus, communication system, and communication program
JP2017135611A