The present disclosure relates to the field of self-service technology, and in particular to an operating method of a self-service terminal and a self-service terminal.
Current self-service, such as self-purchase, self-order, self-checkout, self-service business handling, typically uses a self-service terminal.
Accordingly, there is a need for new technologies.
One of aims of the present disclosure is to provide an operating method of a self-service terminal and a self-service terminal.
One aspect of this disclosure is to provide an operating method of a self-service terminal. The self-service terminal comprises an application module configured to provide an application to a user, a device module comprising a plurality of devices, and a control module configured for a communication between the application module and the device module. The method comprises the following performed by the control module: receiving a first frame from the application module, wherein the first frame includes a body portion; and determining whether the first frame is valid, processing the body portion of the first frame if valid, and not processing the body portion of the first frame if not, wherein the body portion of the first frame includes a command field, and processing the body portion of the first frame comprises: parsing the command field to obtain an entity that the first frame is for, and performing first operations according to the entity, wherein the first operations comprises: if the entity is one or more devices in the device module, constructing a second frame for the one or more devices based on the body portion of the first frame and a predefined rule between the control module and the one or more devices, and transmitting the second frame to the one or more devices; and if the entity is the control module, performing an operation based on the body portion of the first frame.
Another aspect of this disclosure is to provide an operating method of a self-service terminal. The self-service terminal comprises an application module configured to provide an application to a user, a device module comprising a plurality of devices, and a control module configured for a communication between the application module and the device module. The method comprises the following performed by any first entity of the application module, the control module, and one or more devices of the device module: receiving a first frame, the first frame including a head portion, a body portion, and a tail portion; determining whether the head portion of the first frame is correct, performing a subsequent operation if correct, and not performing any subsequent operation on the first frame if not; and determining whether the entire first frame is valid, processing the body portion of the first frame if valid, and not processing the body portion of the first frame if invalid.
Another aspect of this disclosure is to provide a self-service terminal. The self-service terminal comprises an application module configured to provide an application to a user, a printer, and a control module for a communication between the application module and the printer, wherein the control module is configured to: receive a first frame from the application module; and determine whether the first frame is valid, processing the first frame if valid, and not processing the first frame if not, wherein the first frame includes a command field indicating one or more entities that the first frame is for and one or more operations associated with the one or more entities, and a data field associated with the one or more operations, and processing the first frame comprises: parsing the command field to obtain the one or more entities and the one or more operations, and performing the following operations according to the one or more entities: if the one or more entities include the printer, constructing a second frame for the printer based on the one or more operations, the data field, and a predefined rule between the control module and the printer, and transmitting the second frame to the printer; and if the one or more entities include the control module, performing an operation based on the one or more operations and the data field.
Further features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings.
The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
The present disclosure will be better understood according the following detailed description with reference of the accompanying drawings.
Note that, in the embodiments described below, in some cases the same portions or portions having similar functions are denoted by the same reference numerals in different drawings, and description of such portions is not repeated. In some cases, similar reference numerals and letters are used to refer to similar items, and thus once an item is defined in one figure, it need not be further discussed for following figures.
Various exemplary embodiments of the present disclosure will be described in details with reference to the accompanying drawings in the following. It should be noted that the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit this disclosure, its application, or uses. It should be understood by those skilled in the art that, these examples, while indicating the implementations of the present disclosure, are given by way of illustration only, but not in an exhaustive way.
The term “A or B” used through the specification refers to “A and B” and “A or B” rather than meaning that A and B are exclusive, unless otherwise specified.
The term “exemplary”, as used herein, means “serving as an example, instance, or illustration”, rather than as a “model” that would be exactly duplicated. Any implementation described herein as exemplary is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, there is no intention to be bound by any expressed or implied theory presented in the preceding technical field, background, summary or detailed description.
In addition, certain terminology, such as the terms “first”, “second” and the like, may also be used in the following description for the purpose of reference only, and thus are not intended to be limiting. For example, the terms “first”, “second” and other such numerical terms referring to structures or elements do not imply a sequence or order unless clearly indicated by the context.
Further, it should be noted that, the terms “comprise”, “include”, “have” and any other variants, as used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The application module 10 is configured to provide an application to a user. For example, the user may be a consumer, and the application module 10 may provide the user an application or a man-machine interface for self-purchase, self-order, self-checkout, self-service business handling, or the like. The application module 10 may only provide the user an interface for such an application or a man-machine interface rather than providing an application or a man-machine interface directly. For example, the application module 10 may provide a data interface to an application installed on another device (e.g., a smartphone) so that the user may perform self-service or operate the self-service terminal 100 via the application installed on the another device. For another example, the user may be a supervisor, and the application module 10 may provide the user an application or a man-machine interface for management or maintenance, or a data interface for such an application or a man-machine interface.
The device module 30 may include a plurality of devices 30-1, 30-2, , 30-n. One or more of the plurality of devices may be input/output devices for the self-service terminal 100. For example, a device in the device module 30 may be a printer, a scanner, a graphic code reader, a camera, a point of selling (POS) machine, a credit card reader, an electrical/magnetic tag detector, an ID card reader, a fingerprint reader, a multimedia player, an indicator light, a power controller, a fan, a keyboard, a touch button, a touch panel, a display, a thermometer, a hygrometer, a GPS positioning device or the like. When referring to the device module 30 herein, in accordance with the context, it may refer to all of the devices 30-1, 30-2, , 30-n, or may also refer to one or more of the devices 30-1, 30-2, , 30-n.
The control module 20 is configured for a communication between the application module 10 and the device module 30, such that the application module 10 may not directly communicate with the device module 30. A communication connection may be established between the control module 20 and the application module 10, and between the control module 20 and the device module 30 through various wired or wireless communication interfaces, including but not limited to, a USB interface, a COM interface, a UART interface, a GPIO interface, an SPI interface, an I2C interface, a Bluetooth interface and so on. In addition to the communication between the application module 10 and the device module 30, the control module 20 may also be configured to supply power to the application module 10 and/or the device module 30, and initiate a communication to the application module 10 or the device module 30 by itself.
The frame configuration 200 may comprise a head portion, a body portion and a tail portion. The head portion may include an identifier field, a frame length field, and a frame header check field. The identifier field may be a predefined value for the communication between two entities. The frame length field indicates the length (e.g., maybe in bytes) of the entire frame (from the identifier field of the frame configuration 200 to the entire frame check field described below). The frame header check field may be used to check the head portion. In a specific example, the length of the identifier field may be 1 byte, the predefined value of the identifier field between the control module 20 and application module 10, and between the control module 20 and the device module 30, may both be 0x7E; the length of the frame length field may be 2 bytes; and the length of the frame header check field may be 1 byte. In some embodiments, the frame header check field may be a sum of a byte-by-byte modulo-2 addition of content included in the head portion other than the frame header check field, that is, a sum of a byte-by-byte modulo-2 addition of the identifier field and the frame length field. Thus, the algorithms both for generating the frame header check field by the sender and for checking the head portion based on the frame header check field by the receiver are simple, which helps to improve the processing speed.
The body portion may include a command field, a frame number field, and a data field. The command field may be used to indicate one or more of the following: one or more entities that the frame is for, one or more operations associated with the one or more entities, the attributes of the one or more entities (e.g., one or more of identity information for identifying the entity, port information indicating a port to which the entity is connected, and address information indicating an address of the entity in the self-service terminal), whether the frame is a frame for a segment transmission, the reception result of a frame transmitted before the frame, and the like. The length of the command field may be defined in advance between two entities communicating with each other in accordance with the amount of information to be carried in the frame. In some embodiments, the command field of the body portion may indicate an address pointing to a piece of memory on which information for indicating the entity that the frame is for, the operation associated with the entity, the attribute of the entity, whether the frame is for a segment transmission, reception result of a frame transmitted before the frame or the like may all be stored. The sender of the frame may write such information on the piece of memory, and the receiver may read the information from the piece of memory according to the address indicated by the command field.
The frame number field indicating the sequence number of the frame may be used to identify a frame that is transmitted and received repeatedly, and may also be used to sort a plurality of associated frames received under a segment transmission. In a specific example, the length of the frame number field is 2 bytes and the frame number field ranges from 0x0000 to 0xFFFF cyclically.
The data field may include data related to the operation of the entity that the frame is for, and the length of the data field may be variable and may be calculated based on the length of the entire frame indicated by the frame length field. In some embodiments, the data field of the body portion may be an address pointing to a piece of memory on which data associated with the operation of the entity are stored, such that the sender of the frame may write the data on the piece of memory, and the receiver may read the data from the piece of memory according to the address indicated by the data field.
The tail portion may include an entire frame check field, which may be used to check the entire frame. The length of the entire frame check field may be 1 byte. In some embodiments, the entire frame check field may be a sum of a byte-by-byte modulo-2 addition of content included in the entire frame other than the entire frame check field, that is, a sum of a byte-by-byte modulo-2 addition of the identifier field, the frame length field, the frame header check field, the command field, the frame number field, and the data field. Thus, the algorithms both for generating the entire frame check field by the sender and for checking the entire frame based on the entire frame check field by the receiver are simple, which helps to improve the processing speed.
An operating method of a self-service terminal according to one or more exemplary embodiments of the present disclosure is described below in accordance with specific examples.
Example 1: The application module 10 instructs one or more devices in the device module 30 to perform a specific operation (as shown in
As shown in
When the amount of data related to the operation to be performed by the entity is too large to be carried in a single first frame, the data may be transmitted using a plurality of first frames. For example, a plurality of first frames will be used for a “segment transmission” which will be described below. In this case, the application module 10 may add information to indicate the first frame is a frame for a segment transmission during constructing the first frame, and may even add information to indicate how many first frames are used for this segment transmission. These information may be presented in the command field of the body portion. In addition, in the case of a segment transmission, the frame number field of the body portion may also be used to indicate the order of sorting the associated plurality of first frames, for example, sorting based on the frame number field in ascending or descending order consecutively, such that the control module 20 may, after receiving these associated plurality of first frames, sort these first frames based on the frame number field, and may also determine if there is a first frame for this segment transmission is missing according to whether the frame numbers of these first frames are consecutive.
Since the first frame constructed and transmitted by the application module 10 to instruct the device 30-1 to perform operations is not sent directly to the device 30-1 but sent to the control module 20, the meaning of each of the fields in the first frame needs only to comply with a predefined rule between the application module 10 and the control module 20, rather than complying with a desired format of the device 30-1. For example, for the application module 10 and the control module 20, it may be defined in advance that some bytes in the command field are used to indicate the entity that the first frame is for, some bytes are used to indicate the operations related to the entity, and the relationship between the values of the bytes and the meanings thereof. These predefined rules may be different from those rules defined between the control module 20 and the device module 30, for example, may not comply with the rules described in the product manual of the device 30-1 in the device module 30.
The control module 20 may receive and process (S330) the first frame, construct (S340) a second frame according to the content of the first frame, and transmit (S350) the second frame to the entity that the first frame is for, e.g., the device 30-1 in the device module 30. After receiving the first frame, the control module 20 may check the first frame to determine whether the first frame is valid based on the head portion and the tail portion of the first frame (the approach to determine whether the first frame is valid will be described in detail below). If the first frame is valid, the control module 20 may process the body portion of the first frame, and otherwise, the control module 20 may discard the first frame without processing the first frame anymore or constructing the second frame. The frame configuration of the second frame transmitted by the control module 20 to the device 30-1 needs to comply with the rules predefined between the control module 20 and the device 30-1. For example, such rules may be rules described in the product manual of the device 30-1, or the frame configuration 200 shown in
Processing the body portion of the first frame by the control module 20 may include parsing the command field to obtain an entity, e.g., the device 30-1, that the first frame is for. The device module 30 typically comprises a plurality of devices 30-1, 30-2, . . . , 30-n, the plurality of devices 30-1, 30-2, . . . , 30-n being connected to corresponding ports of the control module 20 via respective interfaces. After determining the device 30-1 that the first frame is for by parsing the command field, the control module 20 may transmit the second frame to the device 30-1 via the port that the device 30-1 is connected to.
In addition, the control module 20 may further obtain operations associated with the device 30-1 indicated in the first frame by parsing the command field of the body portion. The control module 20 may construct the command field of the body portion of the second frame based at least on the predefined rule with the device 30-1 and the operations associated with the device 30-1, so that the command field of the body portion of the second frame may instruct the device 30-1 to perform specific operations in the form of being complying with the rule that can be parsed by the device 30-1. Since being transmitted directionally from the control module 20 to the device 30-1, the second frame does not need to indicate in the command field the entity that the second frame is for, but only needs to indicate the operations to be performed by device 30-1.
In a specific example, the command field in the body portion of the first frame indicates the device 30-1 that the first frame is for is a printer, and the control module 20 determines that the first frame is for the printer by parsing the command field of the first frame. Since the printer is connected to one of COM ports of the control module 20, and the control module 20 control the second frame constructed to be sent to the one of COM ports to transmit the second frame to the printer. The control module 20 also determines the operation indicated in the first frame to the printer by parsing the command field of the first frame. For example, the operation may be printing in a default format, printing in a specific format, printing in a specific language, printing with a specific page width, or the like. The control module 20 instructs, in the second frame, the printer to perform the operation indicated in the first frame.
The content to be printed by the printer is embodied in the data field of the body portion of the first frame. Constructing the second frame by the control module 20 further comprises constructing the data field of the body portion of the second frame based on the predefined rule between the control module 20 and the printer (i.e., device 30-1), and the content of the data field in the body portion of the first frame. In the case that the rule of the data field defined between the control module 20 and the application module 10 is the same as the rule of the data field defined between the control module 20 and the device 30-1, the control module 20 may not process the data field of the first frame, but packing the data field in the body portion of the first frame to the data field in the body portion of the second frame. In the case of the predefined rule between the control module 20 and the device 30-1 being that the data field in the body portion is an address pointing to a piece of memory, constructing the second frame by the control module 20 further comprises storing the data related to the operation of the device 30-1 into an address that the device 30-1 is able to access, and carrying the address in the data field of the body portion of the second frame.
Since the transmission rate between the control module 20 and the application module 10 does not generally match that between the control module 20 and the device module 30, in the case where a first frame is for segment transmission, the control module 20 may not transmit a corresponding second frame after receiving a first frame. For example, the control module 20 may buffer a plurality of associated first frames received by a receiving process on one hand in spite of the progress of constructing/transmitting the corresponding second frames. And on the other hand, the control module 20 may construct second frames respectively based on the buffered first frames and transmit the second frames one by one by a transmitting process to the device 30-1 in a predefined order (e.g., ascending or descending) according to the frame number indicated by the frame number field in spite of the progress of receiving the corresponding first frames.. The control module 20 may determine which frame is the associated frame for the same segment transmission based on the information that whether the frame is for a segment transmission and how many frames are used for this segment transmission indicated in the command field.
In the case of the second frame having the frame configuration 200 shown in
The device 30-1 receives and processes (S360) the second frame, and performs (S370) an operation indicated by the second frame based on the data related to the operation. In the case of the second frame having the frame configuration 200 shown in
Example 2: The device module 30 reports its information including states, operations attributes, etc. to the application module 10 (as shown in
As shown in
When the amount of data to be transmitted is too large to be carried in a first frame, the data may be transmitted using a plurality of first frames. In this case, the device 30-1 may add information for indicating the first frame is a frame for a segment transmission during constructing the first frame, and may even add information for indicating how many first frames are used for this segment transmission. These information may be presented in the command field of the body portion. In addition, in the case of a segment transmission, the frame number field of the body portion may also be used to indicate the order of sorting the associated plurality of first frames.
The control module 20 may receive and process (S430) the first frame, construct (S440) a second frame according to the content of the first frame, and transmit (S450) the second frame to the application module 10. After receiving the first frame, the control module 20 may check the first frame to determine whether the first frame is valid based on the head portion and the tail portion of the first frame (the approach to determine whether the first frame is valid will be described in detail below). If the first frame is valid, the control module 20 may process the body portion of the first frame, and otherwise, the control module 20 may discard the first frame without processing the first frame anymore or constructing the second frame.
Processing the body portion of the first frame by the control module 20 may include parsing the command field in the body portion to obtain the information (such as a state, an operation, an attribute, etc.) reported by the device 30-1 via the first frame. The control module 20 may then construct the second frame for the application module 10 based on the information reported by the device 30-1 and the predefined rules between the control module 20 and the application module 10. The control module 20 may further indicate the entity, i.e., the device 30-1, related to the information in the command field of the second frame based on the predefined rules between the control module 20 and the application module 10. In addition, the control module 20 may further arrange a frame number field in the body portion of the second frame. Since the frame number is maintained by the master unit, i.e., the application module 10, the control module 20 may obtain the frame number of the second frame by adding 1 to the frame number indicated in the frame that is the last communication frame between the control module 20 and the application module 10. If it is sent to the application module 10 for the first time, the frame number field of the second frame is set to a predefined initial frame number (for example, 0x0000, 0x0001 or 0xFFFF, etc.).
In the case where a plurality of associated first frames are used for the same segment transmission, the control module 20 may construct and transmit a second frame every time a first frame is received, or may construct and transmit second frames respectively after all the plurality of associated first frames are received.
The application module 10 receives and processes (S460) the second frame, and performs (S470) corresponding operation based on the device 30-1 and the information of the device 30-1. After receiving the second frame, the application module 10 may determine whether the second frame is valid based on the head portion and the tail portion of the second frame, process the body portion of the second frame if valid to obtain the information of the device 30-1. For example, the application module 10 may thereby know an ID code of a product that is detected by a product detector so as to perform a related operation such as acquiring the price of the product or the like, may know the temperature in the self-service terminal measured by the thermometer so as to control the rotation speed of the fan in the self-service terminal accordingly, or may know that the printer has an low ink malfunction so as to control an alarm device to issue an alarm or notify a manager/supervisor via an application installed on a user device. Thus, a procedure that a device 30-1 reports its information to the application module 10 may be implemented.
Example 3: The application module 10 instructs the control module 20 to perform a specific operation, the control module 20 instructs the device module 30 to perform a specific operation, the control module 20 reports information to the application module 10, or the device module 30 reports information to the control module 20. In Example 3, the control module 20 communicates with the application module 10 or the device module 30 as an independent entity in the self-service terminal, instead of being used for the communication between the application module 10 and the device module 30. Some exemplary scenarios may be, for example, the application module 10 instructs the control module 20 to update a software version or update a firmware code version; the control module 20 reports its states, operations and/or attributes (e.g., a software or firmware code version, a malfunction state) to the application module 10; a thermometer reports a measured temperature inside the self-service terminal to the control module 20, and then the control module 20 controls directly the rotation speed of a fan so as to adjust the temperature inside the terminal instead of reporting the temperature to the application module 10.
In Example 3, the procedure that the application module 10 instructs the control module 20 to perform a specific operation may comprise, the application module 10 constructing one or more first frames for instructing the control module 20 to perform a specific operation, and transmitting the one or more first frames to the control module 20; the control module 20 receiving and processing the first frame to obtain, by parsing the command field, the entity that the one or more first frames are for is the control module 20; and then the control module 20 performing the corresponding operation based on the content of the one or more first frames, instead of constructing and transmitting a second frame.
The procedure that the control module 20 instructs the device module 30 to perform a specific operation may comprise, the control module 20 constructing one or more first frames for instructing the device 30-1 in the device module 30 to perform a specific operation, and transmitting the one or more first frames to the device 30-1; and the device 30-1 receiving and processing the first frame, and performing the corresponding operation based on the content of the one or more first frames.
The procedure that the control module 20 reports information to the application module 10 may comprise, the control module 20 constructing one or more first frames for reporting information to the application module 10, and transmitting the one or more first frames to the application module 10; and the application module 10 receiving and processing the first frame, and performing the corresponding operation based on the content of the one or more first frames.
The procedure that the device module 30 reports information to the control module 20 may comprise, the device 30-1 constructing one or more first frames for reporting information to the control module 20, and transmitting the one or more first frames to the control module 20; and the control module 20 receiving and processing the first frame, and performing the corresponding operation based on the content of the one or more first frames.
Example 4: Handshaking procedures between the devices 30-1, 30-2, , 30-n in the device module 30 and the control module 20 may be performed. After the devices 30-1, 30-2, . . . , 30-n are powered on, each of them may perform a handshaking procedure with the control module 20. All communications between entities during the handshaking procedure may use the frame configuration 200 shown in
In some embodiments, the control module 20 may also notify the device 30-1 of the port information that indicates to which port the device 30-1 is connected using a second frame having the frame configuration 200 shown in
In some embodiments, each of entities in the self-service terminal may be connected with each other via a local area network LAN. For example, the devices 30-1, 30-2, . . . , 30-n in the device module 30 are connected to the control module 20 via a LAN. In this case, during the handshaking procedure between the control module 20 and the device 30-1, 30-2, . . . , 30-n, address information (e.g., an IP address in the LAN) indicating addresses of the device 30-1, 30-2, . . . , 30-n in the self-service terminal may be notified to the control module 20 using the command field (or another field). During the communication with the control module 20 after the handshaking procedure, the device 30-1, 30-2, . . . , 30-n may notify the control module 20 of its address information using the command field (or another field) of a frame. Thus, the control module 20 may determine which device is the sender of the frame according to the address information in the command field of the frame.
Example 5: The control module 20 uploads its stored data to the server. The server may be a local server or a cloud server. As shown in
The control module 20 may transmit the stored data to the server 50 by transmitting one or more first frames to the server 50. The frame configuration of the first frame needs to follow a predefined rule between the control module 20 and the server 50, and may be, for example, the frame configuration 200 as shown in
In the case where the first frame transmitted by the control module 20 to the server 50 has the frame configuration 200 as shown in
Example 6: Frame checking is performed when communicating between entities in the self-service terminal. Such frame checking is based on the frame configuration 200 shown in
Constructing the first frame by the application module 10 may comprise, arranging, in the head portion of the first frame, a predefined frame identifier as an identifier field, a frame length field indicating the length of the first frame, and a first check field for checking the head portion; arranging, in the tail portion of the first frame, a second check field for checking the entire first frame; and arranging, in the body portion of the first frame, a command field, a frame number field and a data field. Thus, the first frame is configured to have a frame configuration 200 as shown in
As shown in
In some embodiments, determining (S620) whether the head portion of the first frame is correct may include the following operations performed in sequence:
1) determining whether the identifier field belongs to one or more predefined frame identifier values, if so, performing a subsequent operation, and determining that the head portion is incorrect and not performing any subsequent operation on the first frame if not;
2) determining whether the frame length field belongs to one or more predefined frame length values, if so, performing a subsequent operation, and determining that the head portion is incorrect and not performing any subsequent operation on the first frame if not; and
3) determining whether the head portion is correct based on the first check field, for example, determining whether the first check field is a sum of a byte-by-byte modulo-2 addition of content included in the head portion other than the first check field, and if so, determining that the head portion is correct, and determining that the head portion is incorrect if not.
Those skilled in the art will appreciate that the above operations performed in sequence are only solutions in some embodiments of the present disclosure. In other embodiments, determining (S620) whether the head portion of the first frame is correct may include one or more of the above operations, for example, may include only operation 3), operations 1) and 3), operations 1) and 2), operations 2) and 3), or the like.
The “subsequent operation” referred to in the above description may include operations (for example, subsequent operations of operation 1) are operations 2) and 3)) in determining (S620) whether the head portion of the first frame is correct or not, and may also include one or more operations (for example, the operation of determining (S630) whether the entire first frame is valid, the operation of processing (S640) the body portion of the first frame, or the like) after determining (S620) whether the head portion of the first frame is correct or not.
In some embodiments, determining (S630) whether the entire first frame is valid may include: determining whether the second check field is a sum of a byte-by-byte modulo-2 addition of content included in the first frame other than the second check field, and if so, determining that the first frame is valid, and determining that the first frame is invalid if not.
Further, some checking operations on the first frame may also be performed during processing (S640) the body portion of the first frame. In some embodiments, checking operations on the first frame during processing (S640) the body portion of the first frame may include:
1) determining whether the value of the command field is within a predefined value range (e.g., the control module 20 determines whether the command field is in accordance with a predefined rule between the control module 20 and the application module 10), and if so, performing subsequent operations, otherwise not performing any subsequent operation on the first frame; and
2) parsing the command field to obtain an entity that the first frame is for, and determining whether the entity belongs to one or more predefined entities (e.g., the control module 20 determines whether the entity that the first frame is for is in accordance with a predefined rule between the control module 20 and the application module 10), and if so, performing subsequent operations, otherwise not performing any subsequent operation on the first frame.
Those skilled in the art will appreciate that checking operations during processing (S640) the body portion of the first frame may include fewer operations than operations 1) and 2) listed above, for example, may include only operation 1) or 2); and the checking operations may also include more operations than operations 1) and 2) listed above, for example, determining whether a state, an operation, identity information, port information, and address information or the like indicated by the command field is in accordance with a predefined rule between the control module 20 and the application module 10, and if so, performing subsequent operations, otherwise not performing any subsequent operation on the first frame.
The “subsequent operation” referred to in the above description may include an operation (for example, a subsequent operation of operation 1) is operation 2)) in checking operations on the first frame during processing (S640) the body portion of the first frame, an operation (for example, an operation of parsing the body portion of the first frame, etc.) after checking operations on the first frame during processing (S640) the body portion of the first frame, and an operation (for example, performing the operation indicated by the first frame or constructing a second frame, etc.) after processing (S640) the body portion of the first frame.
Example 7: Transmission quality control during communicating between entities in the self-service terminal may be performed. The transmission quality control may include: the receiver of a frame transmits a reception result to the sender after checking the frame according to Example 6; if the reception result received by the sender indicates a reception error, the sender transmits (or retransmits maybe) the frame; and if the receiver finds the frame number of the frame is not consecutive with the last received frame, the receiver may request the sender to transmit (or retransmit maybe) a frame corresponding to the missing frame number. Each of the application module 10, the control module 20, the device module 30, and the servers 40, 50 may perform such transmission quality control. In the following description of Example 7, the communication between the application module 10 and the control module 20 is taken as an example. The procedure of communication between other entities is similar, the description of which is omitted.
The application module 10 constructs and transmits a first frame to the control module 20, and the control module 20 can determine whether the head portion of the first frame is correct according to the method described in Example 6. If correct, the control module 20 performs subsequent operations. If not, the first frame will be discarded. In some embodiments, after the head portion of the first frame is determined to be incorrect, the control module 20 may send a second frame to the application module 10 to indicate a reception error. In other embodiments, after the head portion of the first frame is determined to be incorrect, the control module 20 may only discard the first frame (i.e., not perform any subsequent operation on the first frame) without sending a second frame to the application module 10 to indicate a reception error.
If it is determined that the head portion of the first frame is correct, the control module 20 may determine whether the entire first frame is valid according to the method described in Example 6. If it is valid, the control module 20 may perform subsequent operations. If not, the control module 20 may discard the first frame so that no further process on the first frame will be performed, and send a second frame to the application module 10 to indicate a reception error. If the control module 20 finds an error when checking the first frame in the procedure of processing the body portion of the first frame, the control module 20 may discard the first frame so that no further process on the first frame will be performed, and send a second frame to the application module 10 to indicate a reception error. If no error is found after all processes on the first frame are completed, the control module 20 may send a second frame to the application module 10 to indicate a reception success.
Such a second frame for indicating that the reception result is an error or a success may also have a frame configuration 200 as shown in
After transmitting the first frame to the control module 20, the application module 10 may receive a second frame transmitted by the control module 20 indicating the reception result. the application module 10 may parse the indication of the reception result in the second frame according to a predefined rule between the application module 10 and the control module 20. If the indication is a reception success, the application module 10 does not retransmit the first frame; and if the indication is a reception error, the application module 10 retransmit the first frame. A maximum number of transmissions (or a maximum number of retransmissions) may be predefined between the two communicating entities. If the number of transmissions of the first frame from the application module 10 to the control module 20 reaches the predefined maximum number of transmissions (or the number of retransmissions of the first frame reaches the predefined maximum number of retransmissions), the application module 10 does not retransmit the first frame even if the second frame transmitted by the control module 20 indicating a reception error.
The correspondence between the second frame and the first frame may be represented by a frame number field, and the correspondence may be predefined between the communication entities. For example, it may be predefined that the frame number of the second frame is the same as that of the corresponding first frame, or the frame number of the second frame is that of the corresponding first frame plus one. For example, if the frame number field of the first frame received by the control module 20 from the application module 10 is 0x1234, the frame number field of the second frame for indicating the reception result of the first frame may also be 0x1234. After receiving the second frame, the application module 10 may know the reception result of which frame is indicated in the second frame according to the frame number field in the second frame.
The control module 20 may further determine, according to the frame number field of the first frame, whether there is a missing frame from the application module 10, or whether the received frames from the application module 10 are duplicated.
Regarding the missing frame from the application module 10, in some embodiments, a predefined rule between the control module 20 and the application module 10 is that the frame numbers of the frames transmitted between the two should be consecutive. If the frame number of the last frame received from the application module 10 is n, and the frame number of the current frame received from the application module 10 is n+2, the control module 20 may request the application module 10 to transmit (or retransmit maybe) the missing frame whose frame number is n+1. In other embodiments, it is also feasible to predefine a rule between the control module 20 and the application module 10 that the frame numbers of the frames transmitted between the two may be not consecutive, then if the frame number of the last frame received from the application module 10 is not consecutive with that of the current frame, the control module 20 may not request the application module 10 to transmit any frame.
Regarding receiving duplicated frames from the application module 10, the control module 20 determines whether the frame number field of the first frame received from the application module 10 is identical with the frame number field of a frame received from the application module 10 before the first frame within a predefined time or within a predefined number of frames. If yes, it is determined that the first frame is a duplicated frame, and no subsequent operation will be performed on the first frame. It should be noted that since the length of the frame number field is limited, the value of the frame number field may be repeated. For example, if the frame number field has a length of 2 bytes, the predefined initial frame number between the two communicating entities is 0x0000, and the frame number maintenance rule is incremented by one each time. If the frame number field of the current frame is 0xFFFF, the frame number field of the next frame will be 0x0000, which is the same as the initial frame number. Therefore, when determining whether receiving duplicated frames or not, it is necessary to define that the two frames having the same frame number are within a predefined time or within a predefined number of frames. In the case of normal transmission and reception, the frame number within the predefined time or the predefined number of frames will not be repeated.
In some cases, when the amount of data that the application module 10 needs to be send to the control module 20 is too large to be carried in a single first frame, the data may be transmitted using multiple first frames (e.g., a segment transmission). In these cases, if the control module 20 determines that the first frame is a frame for segment transmission, after receiving the first frame and one or more frames for a segment transmission associated with the first frame, the control module 20 may: determine whether frame numbers indicated by frame number fields in the first frame and the one or more frames are consecutive, if consecutive, perform operations on the first frame and the one or more frames in a predefined order based on the frame number field; and if not, determine a missing frame number, construct a third frame based on the missing frame number, and transmit the third frame (in which a missing frame number is carried) to the application module 10 to indicate the application module 10 to transmit (or retransmit maybe) a frame corresponding to the missing frame number. After receiving the third frame indicating the missing frame number, according to the predefined rule between the control module 20 and the application module 10, the application module 10 may choose to transmit (or retransmit maybe) only the missing frame, or to transmit (or retransmit maybe) all the frames for the same segment transmission.
Although described in Example 7 is a communication mode with acknowledgment (i.e., transmitting a second frame indicating the reception result of the first frame), those skilled in the art will appreciate that a communication mode without acknowledgment can also be used between two communicating entities in the self-service terminal. For example, the communication mode with acknowledgment may be used for a frame whose command field value meets a first condition, and the communication mode without acknowledgment for a frame whose command field value meets a second condition.
Those skilled in the art will appreciate that the same or similar description is omitted in the above detailed description of the various examples for the sake of brevity.
The at least a part of a self-service terminal 700, the control module 20 for example, includes one or more processors 710 and one or more memories 720, wherein one or more processors 710 are communicably coupled to one or more memories 720. One or more of the one or more memories 720 can be coupled to one or more processors 710 via a bus, port, or network, and/or can be directly coupled or incorporated in any one of the one or more processors 710. Each of the one or more memories 720 can store content that is accessible by one or more processors 710, including instructions 721 that can be executed by one or more processors 710, and data 722 that can be retrieved, manipulated, or stored by one or more processors 710.
The instructions 721 may be any set of instructions to be executed directly, such as machine code, or indirectly, such as scripts, by the one or more processors 710. The instructions 721 may be stored in object code format for direct processing by the one or more processors 710, or in any other computing device language including scripts or collections of independent source code modules that are interpreted on demand or compiled in advance. Functions, methods and routines of the instructions 721 are explained in more detail above.
The one or more memories 720 may be any transitory or non-transitory computer readable storage medium capable of storing contents accessible by the one or more processors 710, such as a hard drive, a memory card, an ROM, an RAM, a DVD, a CD, a USB memory, a write-enabled memory, a read-only memory or the like. The one or more memories 720 may include a distributed storage system where the instructions 721 and/or the data 722 are stored on a plurality of different storage devices which may be physically located at the same or different geographic locations.
The one or more processors 710 may retrieve, store or modify the data 722 in accordance with the instructions 721. The data 722 stored in the one or more memories 720 may include received multiple frames mentioned above including various fields in the frames, received multiple frames for a segment transmission, frames to be transmitted, data (for example, a payment code read from the user) related to one or more operations of one or more devices, and the like. Those skilled in the art will appreciate that other data may also be stored in one or more memories 720. For example, although the subject matter described herein is not limited by any particular data structure, the data 722 may also be stored in computer registers (not shown) as a table or XML document having many different fields and records stored in a relationship database. The data 722 may also be formatted in any computing device-readable format such as, but not limited to, binary values, ASCII or Unicode. In addition, the data 722 may include any information sufficient to identify relevant information, such as a serial number, descriptive text, a dedicated code, a pointer, references to data stored in other memories such as at other network locations, or information used by a function for computing related data.
The one or more processors 710 may be any conventional processors, such as a commercially available central processing unit (CPU), graphics processing unit (GPU), microprogrammed control unit (MCU), and the like. Alternatively, one or more of the processors 710 may also be dedicated components such as an application specific integrated circuit (ASIC) or other hardware based processor. Although not required, one or more processors 710 may include specialized hardware components to perform particular computing processes, such as checking the frames, etc., faster or more efficiently.
Although one or more processors 710 and one or more memories 720 are shown schematically in the same block in
Moreover, although one or more processors 710 and one or more memories 720 are schematically illustrated in different blocks in
Although some specific embodiments of the present disclosure have been described in detail with examples, it should be understood by a person skilled in the art that the above examples are only intended to be illustrative but not to limit the scope of the present disclosure. The embodiments disclosed herein can be combined arbitrarily with each other, without departing from the scope and spirit of the present disclosure. It should be understood by a person skilled in the art that the above embodiments can be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the attached claims.
Number | Date | Country | Kind |
---|---|---|---|
201910336406.X | Apr 2019 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2020/029208 | 4/22/2020 | WO | 00 |