Cross-device communication methods
By introducing local service modules into the SaaS cross-device communication system, the management and scheduling problems when multiple devices coexist are solved, unified scheduling of data transmission and separation of processing and rendering are achieved, and communication quality and data display efficiency are improved.
Patent Information
- Application Number
- CN202310015014.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-01-05
AI Technical Summary
The existing SaaS POS architecture is difficult to achieve timely and unified management and scheduling of multiple slave devices when multiple devices coexist, resulting in a decline in the quality of cross-device communication.
By introducing a local service module into the SaaS cross-device communication system, the unified scheduling of data transmission and the separation of data processing and data rendering are realized. The local service module is used to interact with the main POS device and the slave POS device as a whole to ensure the identity verification of data requests. validation, format processing and route distribution.
It realizes the timely unified management and scheduling of multiple slave devices, improves the communication quality of cross-device communication, reduces the data computing tasks of the data requester, speeds up the data display speed, and achieves timely data reception time and display time. sex and consistency.
Smart Images

Figure CN116033029B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data communication technology, and in particular to a cross-device communication method. Background Art
[0002] With the progress of society and the development of data technology, many POS devices promoted by merchants in the market by SaaS (Software-as-a-Service) have more than just one screen. Sometimes two POS devices are needed to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, and then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices. Summary of the invention
[0003] An embodiment of the present disclosure provides a cross-device communication method.
[0004] In a first aspect, a cross-device communication method is provided in an embodiment of the present disclosure, which is applicable to a SaaS cross-device communication system, wherein the SaaS cross-device communication system includes a SaaS server cluster, a SaaS gateway and a POS module, and the POS module includes a local service module, a master POS device and a slave POS device.
[0005] Specifically, the cross-device communication method includes:
[0006] The data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is a master POS device or a slave POS device;
[0007] The SaaS server cluster processes data according to the data request to obtain return data, and sends the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester;
[0008] The SaaS gateway sends the received return data to the corresponding local service module in the form of events according to the routing information of the data requester;
[0009] The local service module distributes the returned data to the corresponding data requester according to the data requester routing information.
[0010] In an implementation of the present disclosure, the data requester sends a data request to a SaaS server cluster through the local service module and the SaaS gateway, including:
[0011] The data requester sends the data request to the SaaS gateway through the local service module;
[0012] The SaaS gateway performs identity verification on the data request according to the identity information of the data requester, and sends the data request to the SaaS server cluster after the identity verification passes.
[0013] In an implementation of the present disclosure, before the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the data requester routing information, it also includes:
[0014] The SaaS gateway performs format processing on the returned data to meet the data format requirements of the data requester.
[0015] In one implementation of the present disclosure, the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester, including:
[0016] The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester;
[0017] The data return event is sent to the corresponding local service module according to the data requester routing information.
[0018] In an implementation of the present disclosure, the local service module distributes the returned data to the corresponding data requester according to the data requester routing information, including:
[0019] The local service module receives data return events and stores them;
[0020] Put the data return event into the event queue;
[0021] The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information.
[0022] In an implementation of the present disclosure, when the data requester is a slave POS device, the method further includes:
[0023] The local service module distributes the data return event to the primary POS device corresponding to the data requester according to the data requester routing information;
[0024] The master POS device performs corresponding data processing according to the data return event, and updates the return data in the data return event according to the data processing result;
[0025] The master POS device sends the updated data return event to the corresponding data requester through the corresponding communication channel according to the routing information of the data requester.
[0026] In one implementation of the present disclosure, it also includes:
[0027] In response to receiving the data return event, the data requester parses the data return event to obtain return data;
[0028] The data requester renders the display interface data according to the returned data.
[0029] In the second aspect, a cross-device communication method is provided in an embodiment of the present disclosure, which is applicable to a SaaS gateway in a SaaS cross-device communication system, wherein the SaaS cross-device communication system also includes a SaaS server cluster and a POS module, and the POS module includes a local service module, a master POS device and a slave POS device.
[0030] Specifically, the cross-device communication method includes:
[0031] In response to receiving a data request sent by a data requester through the local service module, performing identity verification on the data request according to the identity information of the data requester carried in the data request, and sending the data request to the SaaS server cluster after the identity verification passes;
[0032] In response to receiving the return data carrying the data requester routing information sent by the SaaS server cluster, generating a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and data requester routing information;
[0033] The data return event is sent to the corresponding local service module according to the data requester routing information.
[0034] In a third aspect, a cross-device communication method is provided in an embodiment of the present disclosure, which is applicable to a local service module in a SaaS cross-device communication system, wherein the SaaS cross-device communication system also includes a SaaS server cluster, a SaaS gateway, a master POS device and a slave POS device.
[0035] Specifically, the cross-device communication method includes:
[0036] In response to receiving a data return event sent by the SaaS gateway, storing the data return event;
[0037] Put the data return event into the event queue;
[0038] The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information carried in the data return events.
[0039] In a fourth aspect, a cross-device communication method is provided in an embodiment of the present disclosure, which is applicable to a master POS device in a SaaS cross-device communication system, wherein the SaaS cross-device communication system also includes a SaaS server cluster, a SaaS gateway, a local service module and a slave POS device.
[0040] Specifically, the cross-device communication method includes:
[0041] In response to receiving a data return event sent by the local service module, performing corresponding data processing according to the data return event, and updating the return data in the data return event according to the data processing result;
[0042] The updated data return event is sent to the corresponding slave POS device through the corresponding communication channel according to the routing information of the data requester.
[0043] In the fifth aspect, a cross-device communication device is provided in an embodiment of the present disclosure, which is suitable for a SaaS cross-device communication system, wherein the SaaS cross-device communication system includes a SaaS server cluster, a SaaS gateway and a POS module, and the POS module includes a local service module, a master POS device and a slave POS device.
[0044] Specifically, the cross-device communication apparatus includes:
[0045] A data requester is configured to send a data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes identity information of the data requester, routing information of the data requester, and a data request body, and the data requester is a master POS device or a slave POS device;
[0046] The SaaS server cluster is configured to process data according to the data request, obtain return data, and send the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester;
[0047] The SaaS gateway is configured to send the received return data in the form of events to the corresponding local service module according to the routing information of the data requester;
[0048] The local service module is configured to distribute the returned data to the corresponding data requester according to the data requester routing information.
[0049] In one implementation of the present disclosure, the part where the data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway is configured as follows:
[0050] The data requester sends the data request to the SaaS gateway through the local service module;
[0051] The SaaS gateway performs identity verification on the data request according to the identity information of the data requester, and sends the data request to the SaaS server cluster after the identity verification passes.
[0052] In an implementation of the present disclosure, before the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the data requester routing information, it is further configured as follows:
[0053] The SaaS gateway performs format processing on the returned data to meet the data format requirements of the data requester.
[0054] In one implementation of the present disclosure, the SaaS gateway sends the received return data to the corresponding local service module in the form of an event according to the data requester routing information, and is configured as follows:
[0055] The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester;
[0056] The data return event is sent to the corresponding local service module according to the data requester routing information.
[0057] In an implementation of the present disclosure, the part of the local service module that distributes the returned data to the corresponding data requester according to the data requester routing information is configured as follows:
[0058] The local service module receives data return events and stores them;
[0059] Put the data return event into the event queue;
[0060] The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information.
[0061] In an implementation of the present disclosure, when the data requester is a slave POS device, the local service module is further configured to distribute the data return event to the master POS device corresponding to the data requester according to the data requester routing information;
[0062] The master POS device is configured to perform corresponding data processing according to the data return event, and update the return data in the data return event according to the data processing result; and send the updated data return event to the corresponding data requester through the corresponding communication channel according to the data requester routing information.
[0063] In an implementation of the present disclosure, the data requester is further configured to: in response to receiving the data return event, parse the data return event to obtain return data; and render display interface data according to the return data.
[0064] In a sixth aspect, a cross-device communication apparatus is provided in an embodiment of the present disclosure, which is applicable to a SaaS gateway in a SaaS cross-device communication system, wherein the SaaS cross-device communication system also includes a SaaS server cluster and a POS module, and the POS module includes a local service module, a master POS device and a slave POS device.
[0065] Specifically, the cross-device communication apparatus includes:
[0066] an identity verification module, configured to, in response to receiving a data request sent by a data requester through the local service module, perform identity verification on the data request according to the identity information of the data requester carried in the data request, and send the data request to the SaaS server cluster after the identity verification passes;
[0067] The event factory module is configured to generate a corresponding data return event based on the received return data in response to receiving the return data carrying the data requester routing information sent by the SaaS server cluster, wherein the data return event includes an event triggering condition, return data, and data requester routing information;
[0068] The data interaction module is configured to send the data return event to the corresponding local service module according to the data requester routing information.
[0069] In a seventh aspect, a cross-device communication apparatus is provided in an embodiment of the present disclosure, which is applicable to a local service module in a SaaS cross-device communication system, wherein the SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a master POS device, and a slave POS device.
[0070] Specifically, the cross-device communication apparatus includes:
[0071] an event receiver, configured to store, in response to receiving a data return event sent by the SaaS gateway;
[0072] An event queue, configured to put the data return event into the event queue;
[0073] The event scheduler is configured to distribute the data return events in the event queue to corresponding data requesters according to the data requester routing information carried by the data return events.
[0074] In an eighth aspect, a cross-device communication apparatus is provided in an embodiment of the present disclosure, which is applicable to a master POS device in a SaaS cross-device communication system, wherein the SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a local service module and a slave POS device.
[0075] Specifically, the cross-device communication apparatus includes:
[0076] A data processor is configured to, in response to receiving a data return event sent by the local service module, perform corresponding data processing according to the data return event, and update the return data in the data return event according to the data processing result;
[0077] The event sender is configured to send the updated data return event to the corresponding slave POS device through the corresponding communication channel according to the routing information of the data requester.
[0078] In a ninth aspect, an embodiment of the present disclosure provides an electronic device comprising a memory and at least one processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the at least one processor to implement the method steps of the above-mentioned cross-device communication method.
[0079] In a tenth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by a cross-device communication apparatus, which includes computer instructions involved in the cross-device communication apparatus for executing the above-mentioned cross-device communication method.
[0080] In an eleventh aspect, an embodiment of the present disclosure provides a computer program product, including a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the method steps of the above-mentioned cross-device communication method.
[0081] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0082] The above technical solution realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting up a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. The technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0083] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0085] Figure 1 A flowchart showing a cross-device communication method according to an embodiment of the present disclosure is shown;
[0086] Figure 2 A schematic diagram showing the structure of a SaaS cross-device communication system according to an embodiment of the present disclosure is shown;
[0087] Figure 3 A flowchart showing a cross-device communication method according to another embodiment of the present disclosure;
[0088] Figure 4 A flowchart showing a cross-device communication method according to another embodiment of the present disclosure;
[0089] Figure 5 A flowchart showing a cross-device communication method according to yet another embodiment of the present disclosure;
[0090] Figure 6 A schematic structural diagram of a cross-device communication apparatus according to an embodiment of the present disclosure is shown;
[0091] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0092] Figure 8 It is a structural diagram of a computer system suitable for implementing a cross-device communication method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0093] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0094] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0095] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0096] The technical solution provided by the embodiment of the present disclosure realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. The technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0097] Figure 1 A flow chart of a cross-device communication method according to an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the cross-device communication method includes the following steps S101-S104:
[0098] In step S101, the data requester sends a data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is a master POS device or a slave POS device;
[0099] In step S102, the SaaS server cluster processes data according to the data request to obtain return data, and sends the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester;
[0100] In step S103, the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester;
[0101] In step S104, the local service module distributes the returned data to the corresponding data requester according to the data requester routing information.
[0102] As mentioned above, with the progress of society and the development of data technology, many of the POS devices currently promoted by merchant SaaS in the market have more than just one screen. Sometimes two POS devices are required to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices.
[0103] In view of the above defects, in this embodiment, a cross-device communication method is proposed, which realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. This technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0104] In one embodiment of the present disclosure, the cross-device communication method may be applicable to a SaaS cross-device communication system including a SaaS server cluster, a SaaS gateway and a POS module, wherein the POS module includes a local service module, a master POS device and a slave POS device, wherein the structural diagram of the SaaS cross-device communication system according to one embodiment of the present disclosure may be as follows: Figure 2 shown.
[0105] The SaaS server cluster refers to a server cluster consisting of multiple servers that provide SaaS services and corresponding data processing services. For example, the SaaS server cluster may include a food ordering server, a membership server, a marketing server, a supply chain server, a basic server, and the like.
[0106] The POS module includes a local service module, a master POS device and a slave POS device. The local service module is connected to the master POS device to provide data transmission and scheduling services for the master POS device. There may be one or more master POS devices connected to the local service module. The master POS device is connected to its corresponding slave POS device to provide data transmission services for the slave POS device. There may also be one or more slave POS devices connected to the master POS device.
[0107] In one embodiment of the present disclosure, the data requester refers to the party used to issue a data request. The data requester can be either a master POS device or a slave POS device. If the data requester is a master POS device, the data request can be sent directly to the local service module. If the data requester is a slave POS device, the data request is sent to the local service module via the master POS device connected to the slave POS device.
[0108] In one embodiment of the present disclosure, the data request refers to a data-related request for obtaining certain specific data and requesting certain specific data processing operations. The data request may include the following information: data requester identity information representing the identity of the data requester, data requester routing information representing the address of the data requester, data request body representing the content of the data request, etc.
[0109] In one embodiment of the present disclosure, the returned data refers to the data that needs to be returned to the data requester after the SaaS server cluster performs data acquisition, data processing and other operations according to the received data request. In addition to the returned data body, the returned data also carries the routing information of the data requester to accurately send the returned data body to the data requester.
[0110] In the above implementation, the data requester first sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, so that the SaaS server cluster acquires or processes the data according to the data request and generates return data; the SaaS server cluster processes the data according to the data request, and after obtaining the return data, sends the return data to the SaaS gateway; the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester; the local service module then distributes the return data to the corresponding data requester according to the routing information of the data requester.
[0111] In an embodiment of the present disclosure, the step S101, i.e., the step in which the data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, may include the following steps:
[0112] The data requester sends the data request to the SaaS gateway through the local service module;
[0113] The SaaS gateway performs identity verification on the data request according to the identity information of the data requester, and sends the data request to the SaaS server cluster after the identity verification passes.
[0114] In order to improve the security of data transmission, in this implementation, after the data requester forwards the data request to the SaaS gateway through the local service module, the SaaS gateway needs to perform an identity verification on the data request based on the identity information of the data requester carried in the data request, and only forward the data request to the SaaS server cluster after the identity verification passes.
[0115] In an embodiment of the present disclosure, before the step S103, i.e. the step in which the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester, the following steps may also be included:
[0116] The SaaS gateway performs format processing on the returned data to meet the data format requirements of the data requester.
[0117] Different communication subjects in a communication system may have different requirements for the format of acceptable data. Therefore, in order to effectively transmit and process data, the data sender needs to convert the format according to the receiver's requirements for the data. That is, the SaaS gateway needs to format the return data before sending it to meet the data requester's requirements for the data format.
[0118] In one embodiment of the present disclosure, the step S103, i.e., the step in which the SaaS gateway sends the received return data to the corresponding local service module in the form of an event according to the routing information of the data requester, may include the following steps:
[0119] The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester;
[0120] The data return event is sent to the corresponding local service module according to the data requester routing information.
[0121] In this implementation, the SaaS gateway sends the return data in the form of an event. Specifically, the SaaS gateway first generates a corresponding data return event based on the received return data, wherein the data return event includes the following event elements: event trigger conditions, such as the trigger conditions for the start of transmission of the return data, etc.; return data body; data requester routing information, etc. Then the generated data return event is sent to the local service module corresponding to the data requester routing information according to the data requester routing information.
[0122] In an embodiment of the present disclosure, the step S104, i.e. the step in which the local service module distributes the returned data to the corresponding data requester according to the data requester routing information, may include the following steps:
[0123] The local service module receives data return events and stores them;
[0124] Put the data return event into the event queue;
[0125] The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information.
[0126] As mentioned above, the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the data requester routing information. Therefore, in this embodiment, when the local service module receives the data return event, it first stores it, then puts the data return event into the event queue to wait for forwarding, and then distributes the data return event in the event queue to the data requester corresponding to the data requester routing information according to the data requester routing information.
[0127] As mentioned above, the data requester can be a master POS device or a slave POS device. When the data requester is a master POS device, the returned data can be directly received from the local service module. When the data requester is a slave POS device, the returned data needs to be forwarded by the master POS device. That is, when the data requester is a slave POS device, the method may further include the following steps:
[0128] The local service module distributes the data return event to the primary POS device corresponding to the data requester according to the data requester routing information;
[0129] The master POS device performs corresponding data processing according to the data return event, and updates the return data in the data return event according to the data processing result;
[0130] The master POS device sends the updated data return event to the corresponding data requester through the corresponding communication channel according to the routing information of the data requester.
[0131] In this embodiment, after the local service module distributes the data return event to the master POS device corresponding to the data requester according to the data requester routing information, the master POS device first determines whether data needs to be processed at the master POS device according to the data return event, because some data requests may need to be processed at both the server and the master POS device. If necessary, after the corresponding data processing is performed, the return data in the data return event is updated according to the data processing result, and the updated data return event is sent to the corresponding data requester through the corresponding communication channel according to the data requester routing information. The communication channel refers to a pre-established channel for data transmission between the master POS device and the slave POS device as the data requester.
[0132] In one embodiment of the present disclosure, the method may further include the following steps:
[0133] In response to receiving the data return event, the data requester parses the data return event to obtain return data;
[0134] The data requester renders the display interface data according to the returned data.
[0135] In this embodiment, after the data requester receives the data return event, the data return event is parsed to obtain the return data, and then the display interface data rendering can be performed based on the return data. In other words, the data requester only needs to undertake the tasks of data parsing and rendering, but does not need to undertake the tasks of data processing. This not only enables the data calculation tasks to be dispersed to other communication entities, reduces the data calculation tasks of the data requester, and speeds up the data display speed of the data requester, but also enables the timeliness and consistency of the data reception time and data display time of one or more data requesters.
[0136] Figure 3 A flow chart of a cross-device communication method according to another embodiment of the present disclosure is shown as follows: Figure 3 As shown, the cross-device communication method includes the following steps S301-S303:
[0137] In step S301, in response to receiving a data request sent by a data requester through the local service module, performing identity verification on the data request according to the identity information of the data requester carried in the data request, and sending the data request to the SaaS server cluster after the identity verification passes;
[0138] In step S302, in response to receiving the return data carrying the data requester routing information sent by the SaaS server cluster, a corresponding data return event is generated based on the received return data, wherein the data return event includes an event triggering condition, return data, and data requester routing information;
[0139] In step S303, the data return event is sent to the corresponding local service module according to the data requester routing information.
[0140] As mentioned above, with the progress of society and the development of data technology, many of the POS devices currently promoted by merchant SaaS in the market have more than just one screen. Sometimes two POS devices are required to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices.
[0141] In view of the above defects, in this embodiment, a cross-device communication method is proposed, which realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. This technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0142] In one embodiment of the present disclosure, the cross-device communication method may be applicable to a SaaS gateway in a SaaS cross-device communication system, wherein the SaaS cross-device communication system further includes a SaaS server cluster and a POS module, and the POS module includes a local service module, a master POS device, and a slave POS device.
[0143] Figure 3 The technical terms and technical features involved in the embodiments shown and related Figure 1-Figure 2 The technical terms and technical features mentioned in the embodiments shown and related are the same or similar. Figure 3 The explanation and description of the technical terms and technical features involved in the embodiments shown and related can refer to the above Figure 1-Figure 2 The explanations of the illustrated and related embodiments will not be repeated here.
[0144] Figure 4 A flow chart of a cross-device communication method according to another embodiment of the present disclosure is shown as follows: Figure 4 As shown, the cross-device communication method includes the following steps S401-S403:
[0145] In step S401, in response to receiving a data return event sent by a SaaS gateway, the data return event is stored;
[0146] In step S402, the data return event is put into an event queue;
[0147] In step S403, the data return event in the event queue is distributed to the corresponding data requester according to the data requester routing information carried in the data return event.
[0148] As mentioned above, with the progress of society and the development of data technology, many of the POS devices currently promoted by merchant SaaS in the market have more than just one screen. Sometimes two POS devices are required to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices.
[0149] In view of the above defects, in this embodiment, a cross-device communication method is proposed, which realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. This technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0150] In one embodiment of the present disclosure, the cross-device communication method may be applicable to a local service module in a SaaS cross-device communication system, wherein the SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a master POS device, and a slave POS device.
[0151] Figure 4 The technical terms and technical features involved in the embodiments shown and related Figure 1-Figure 3 The technical terms and technical features mentioned in the embodiments shown and related are the same or similar. Figure 4 The explanation and description of the technical terms and technical features involved in the embodiments shown and related can refer to the above Figure 1-Figure 3 The explanations of the illustrated and related embodiments will not be repeated here.
[0152] Figure 5 A flow chart of a cross-device communication method according to another embodiment of the present disclosure is shown as follows: Figure 5 As shown, the cross-device communication method includes the following steps S501-S502:
[0153] In step S501, in response to receiving a data return event sent by a local service module, corresponding data processing is performed according to the data return event, and the return data in the data return event is updated according to the data processing result;
[0154] In step S502, the updated data return event is sent to the corresponding slave POS device through the corresponding communication channel according to the routing information of the data requester.
[0155] As mentioned above, with the progress of society and the development of data technology, many of the POS devices currently promoted by merchant SaaS in the market have more than just one screen. Sometimes two POS devices are required to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices.
[0156] In view of the above defects, in this embodiment, a cross-device communication method is proposed, which realizes the unified scheduling of data transmission and the separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. This technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0157] In one embodiment of the present disclosure, the cross-device communication method may be applicable to a master POS device in a SaaS cross-device communication system, wherein the SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a local service module and a slave POS device.
[0158] Figure 5 The technical terms and technical features involved in the embodiments shown and related Figure 1-Figure 4 The technical terms and technical features mentioned in the embodiments shown and related are the same or similar. Figure 5 The explanation and description of the technical terms and technical features involved in the embodiments shown and related can refer to the above Figure 1-Figure 4The explanations of the illustrated and related embodiments will not be repeated here.
[0159] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.
[0160] Figure 6 FIG. 1 is a block diagram showing a cross-device communication apparatus according to an embodiment of the present disclosure. The apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the cross-device communication apparatus includes:
[0161] The data requester 601 is configured to send a data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is a master POS device or a slave POS device;
[0162] The SaaS server cluster 602 is configured to process data according to the data request, obtain return data, and send the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester;
[0163] SaaS gateway 603, configured to send the received return data in the form of events to the corresponding local service module according to the routing information of the data requester;
[0164] The local service module 604 is configured to distribute the returned data to the corresponding data requester according to the data requester routing information.
[0165] As mentioned above, with the progress of society and the development of data technology, many of the POS devices currently promoted by merchant SaaS in the market have more than just one screen. Sometimes two POS devices are required to work together to display the corresponding data content. When dealing with the coexistence of multiple devices, the current SaaS POS architecture mainly enables a single POS device to trigger an interface service call through client operations, and the server processes the data internally, then sends the processing results to the client, and finally the client performs UI rendering operations. Obviously, this architecture is difficult to manage and schedule multiple slave devices in a timely and unified manner. Therefore, there is an urgent need for a cross-device communication solution that can achieve unified management and scheduling of multiple slave devices.
[0166] In view of the above defects, in this embodiment, a cross-device communication device is proposed, which realizes unified scheduling of data transmission and separation of data processing and data rendering by setting a local service module and interacting with the master POS device and the slave POS device as a whole through the local service module. This technical solution can realize timely and unified management and scheduling of multiple slave devices, thereby improving the communication quality of cross-device communication.
[0167] In one embodiment of the present disclosure, the cross-device communication apparatus may be applicable to a SaaS cross-device communication system including a SaaS server cluster, a SaaS gateway and a POS module, wherein the POS module includes a local service module, a master POS device and a slave POS device.
[0168] The SaaS server cluster refers to a server cluster consisting of multiple servers that provide SaaS services and corresponding data processing services. For example, the SaaS server cluster may include a food ordering server, a membership server, a marketing server, a supply chain server, a basic server, and the like.
[0169] The POS module includes a local service module, a master POS device and a slave POS device. The local service module is connected to the master POS device to provide data transmission and scheduling services for the master POS device. There may be one or more master POS devices connected to the local service module. The master POS device is connected to its corresponding slave POS device to provide data transmission services for the slave POS device. There may also be one or more slave POS devices connected to the master POS device.
[0170] In one embodiment of the present disclosure, the data requester refers to the party used to issue a data request. The data requester can be either a master POS device or a slave POS device. If the data requester is a master POS device, the data request can be sent directly to the local service module. If the data requester is a slave POS device, the data request is sent to the local service module via the master POS device connected to the slave POS device.
[0171] In one embodiment of the present disclosure, the data request refers to a data-related request for obtaining certain specific data and requesting certain specific data processing operations. The data request may include the following information: data requester identity information representing the identity of the data requester, data requester routing information representing the address of the data requester, data request body representing the content of the data request, etc.
[0172] In one embodiment of the present disclosure, the returned data refers to the data that needs to be returned to the data requester after the SaaS server cluster performs data acquisition, data processing and other operations according to the received data request. In addition to the returned data body, the returned data also carries the routing information of the data requester to accurately send the returned data body to the data requester.
[0173] In the above implementation, the data requester first sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, so that the SaaS server cluster acquires or processes the data according to the data request and generates return data; the SaaS server cluster processes the data according to the data request, and after obtaining the return data, sends the return data to the SaaS gateway; the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester; the local service module then distributes the return data to the corresponding data requester according to the routing information of the data requester.
[0174] In one embodiment of the present disclosure, the data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, which may be configured as follows:
[0175] The data requester sends the data request to the SaaS gateway through the local service module;
[0176] The SaaS gateway performs identity verification on the data request according to the identity information of the data requester, and sends the data request to the SaaS server cluster after the identity verification passes.
[0177] In order to improve the security of data transmission, in this implementation, after the data requester forwards the data request to the SaaS gateway through the local service module, the SaaS gateway needs to perform an identity verification on the data request based on the identity information of the data requester carried in the data request, and only forward the data request to the SaaS server cluster after the identity verification passes.
[0178] In an embodiment of the present disclosure, before the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the data requester routing information, it may also be configured as follows:
[0179] The SaaS gateway performs format processing on the returned data to meet the data format requirements of the data requester.
[0180] Different communication subjects in a communication system may have different requirements for the format of acceptable data. Therefore, in order to effectively transmit and process data, the data sender needs to convert the format according to the receiver's requirements for the data. That is, the SaaS gateway needs to format the return data before sending it to meet the data requester's requirements for the data format.
[0181] In one embodiment of the present disclosure, the SaaS gateway sends the received return data to the corresponding local service module in the form of an event according to the data requester routing information, which can be configured as follows:
[0182] The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester;
[0183] The data return event is sent to the corresponding local service module according to the data requester routing information.
[0184] In this implementation, the SaaS gateway sends the return data in the form of an event. Specifically, the SaaS gateway first generates a corresponding data return event based on the received return data, wherein the data return event includes the following event elements: event trigger conditions, such as the trigger conditions for the start of transmission of the return data, etc.; return data body; data requester routing information, etc. Then the generated data return event is sent to the local service module corresponding to the data requester routing information according to the data requester routing information.
[0185] In one embodiment of the present disclosure, the part where the local service module distributes the returned data to the corresponding data requester according to the data requester routing information may be configured as follows:
[0186] The local service module receives data return events and stores them;
[0187] Put the data return event into the event queue;
[0188] The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information.
[0189] As mentioned above, the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the data requester routing information. Therefore, in this embodiment, when the local service module receives the data return event, it first stores it, then puts the data return event into the event queue to wait for forwarding, and then distributes the data return event in the event queue to the data requester corresponding to the data requester routing information according to the data requester routing information.
[0190] As mentioned above, the data requester can be a master POS device or a slave POS device. When the data requester is a master POS device, the returned data can be directly received from the local service module. When the data requester is a slave POS device, the returned data needs to be forwarded by the master POS device. That is, when the data requester is a slave POS device, the local service module is further configured to distribute the data return event to the master POS device corresponding to the data requester according to the routing information of the data requester;
[0191] The master POS device is configured to perform corresponding data processing according to the data return event, and update the return data in the data return event according to the data processing result; and send the updated data return event to the corresponding data requester through the corresponding communication channel according to the data requester routing information.
[0192] In this embodiment, after the local service module distributes the data return event to the master POS device corresponding to the data requester according to the data requester routing information, the master POS device first determines whether data needs to be processed at the master POS device according to the data return event, because some data requests may need to be processed at both the server and the master POS device. If necessary, after the corresponding data processing is performed, the return data in the data return event is updated according to the data processing result, and the updated data return event is sent to the corresponding data requester through the corresponding communication channel according to the data requester routing information. The communication channel refers to a pre-established channel for data transmission between the master POS device and the slave POS device as the data requester.
[0193] In one embodiment of the present disclosure, the data requester is further configured to: in response to receiving the data return event, parse the data return event to obtain return data; and render display interface data according to the return data.
[0194] In this embodiment, after the data requester receives the data return event, the data return event is parsed to obtain the return data, and then the display interface data rendering can be performed based on the return data. In other words, the data requester only needs to undertake the tasks of data parsing and rendering, but does not need to undertake the tasks of data processing. This not only enables the data calculation tasks to be dispersed to other communication entities, reduces the data calculation tasks of the data requester, and speeds up the data display speed of the data requester, but also enables the timeliness and consistency of the data reception time and data display time of one or more data requesters.
[0195] like Figure 6 As shown, the SaaS gateway includes:
[0196] an identity verification module, configured to, in response to receiving a data request sent by a data requester through the local service module, perform identity verification on the data request according to the identity information of the data requester carried in the data request, and send the data request to the SaaS server cluster after the identity verification passes;
[0197] The event factory module is configured to generate a corresponding data return event based on the received return data in response to receiving the return data carrying the data requester routing information sent by the SaaS server cluster, wherein the data return event includes an event triggering condition, return data, and data requester routing information;
[0198] The data interaction module is configured to send the data return event to the corresponding local service module according to the data requester routing information.
[0199] like Figure 6 As shown, the local service module includes:
[0200] an event receiver, configured to store, in response to receiving a data return event sent by the SaaS gateway;
[0201] An event queue, configured to put the data return event into the event queue;
[0202] The event scheduler is configured to distribute the data return events in the event queue to corresponding data requesters according to the data requester routing information carried by the data return events.
[0203] like Figure 6 As shown, the main POS device includes:
[0204] A data processor is configured to, in response to receiving a data return event sent by the local service module, perform corresponding data processing according to the data return event, and update the return data in the data return event according to the data processing result;
[0205] The event sender is configured to send the updated data return event to the corresponding slave POS device through the corresponding communication channel according to the routing information of the data requester.
[0206] The present disclosure also discloses an electronic device, Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 7 As shown, the electronic device 700 includes a memory 701 and a processor 702; wherein,
[0207] The memory 701 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 702 to implement the above method steps.
[0208] Figure 8 It is a structural diagram of a computer system suitable for implementing a cross-device communication method according to an embodiment of the present disclosure.
[0209] like Figure 8 As shown, the computer system 800 includes a processing unit 801, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The processing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0210] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. The drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage section 808 as needed. Among them, the processing unit 801 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0211] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a readable medium thereof, and the computer program includes a program code for executing the method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 809, and / or installed from a removable medium 811.
[0212] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the road map or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0213] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be arranged in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
[0214] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.
[0215] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A cross-device communication method, applicable to a SaaS cross-device communication system, in, The SaaS cross-device communication system includes a SaaS server cluster, a SaaS gateway and a POS module, wherein the POS module includes a local service module, a master POS device and a slave POS device, and the cross-device communication method includes: The data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is a master POS device or a slave POS device; The SaaS server cluster processes data according to the data request to obtain return data, and sends the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester; The SaaS gateway sends the received return data to the corresponding local service module in the form of events according to the routing information of the data requester; The local service module distributes the returned data to the corresponding data requester according to the data requester routing information.
2. According to the method of claim 1, the data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, include: The data requester sends the data request to the SaaS gateway through the local service module; The SaaS gateway performs identity verification on the data request according to the identity information of the data requester, and sends the data request to the SaaS server cluster after the identity verification passes.
3. According to the method of claim 1 or 2, before the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester, include: The SaaS gateway performs format processing on the returned data to meet the data format requirements of the data requester.
4. According to the method of claim 1 or 2, the SaaS gateway sends the received return data in the form of an event to the corresponding local service module according to the routing information of the data requester, include: The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester; The data return event is sent to the corresponding local service module according to the data requester routing information.
5. The method according to claim 4, wherein the local service module distributes the returned data to the corresponding data requester according to the routing information of the data requester, include: The local service module receives data return events and stores them; Put the data return event into the event queue; The data return events in the event queue are distributed to corresponding data requesters according to the data requester routing information.
6. The method according to claim 5, when the data requester is a slave POS device, the method further include: The local service module distributes the data return event to the primary POS device corresponding to the data requester according to the data requester routing information; The master POS device performs corresponding data processing according to the data return event, and updates the return data in the data return event according to the data processing result; The master POS device sends the updated data return event to the corresponding data requester through the corresponding communication channel according to the routing information of the data requester.
7. The method according to claim 4, further comprising: include: In response to receiving the data return event, the data requester parses the data return event to obtain return data; The data requester renders the display interface data according to the returned data.
8. A cross-device communication method, applicable to a SaaS gateway in a SaaS cross-device communication system, in, The SaaS cross-device communication system further includes a SaaS server cluster and a POS module, wherein the POS module includes a local service module, a master POS device and a slave POS device, and the cross-device communication method includes: In response to receiving a data request sent by a data requester through the local service module, performing identity verification on the data request according to the identity information of the data requester carried in the data request, and sending the data request to the SaaS server cluster after the identity verification passes; In response to receiving the return data carrying the data requester routing information sent by the SaaS server cluster, generating a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and data requester routing information; The data return event is sent to the corresponding local service module according to the routing information of the data requester, so that the local service module receives and stores the data return event, puts the data return event into an event queue, and distributes the data return event in the event queue to the corresponding data requester according to the routing information of the data requester; wherein the data requester is a master POS device or a slave POS device.
9. A cross-device communication method, applicable to a local service module in a SaaS cross-device communication system, in, The SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a master POS device and a slave POS device, and the cross-device communication method includes: In response to receiving a data return event sent by the SaaS gateway, storing the data return event; Put the data return event into the event queue; Distribute the data return events in the event queue to the corresponding data requesters according to the data requester routing information carried in the data return events; The method further comprises: The data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is a master POS device or a slave POS device; The SaaS server cluster processes data according to the data request to obtain return data, and sends the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester; The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and data requester routing information, and sends the data return event to the corresponding local service module according to the data requester routing information.
10. A cross-device communication method, applicable to a main POS device in a SaaS cross-device communication system, in, The SaaS cross-device communication system further includes a SaaS server cluster, a SaaS gateway, a local service module and a slave POS device, and the cross-device communication method includes: In response to receiving a data return event sent by the local service module, performing corresponding data processing according to the data return event, and updating the return data in the data return event according to the data processing result; Sending the updated data return event to the corresponding slave POS device through the corresponding communication channel according to the data requester routing information; The method further comprises: The data requester sends the data request to the SaaS server cluster through the local service module and the SaaS gateway, wherein the data request includes the identity information of the data requester, the routing information of the data requester, and the data request body, and the data requester is the main POS device; The SaaS server cluster processes data according to the data request to obtain return data, and sends the return data to the SaaS gateway, wherein the return data carries the routing information of the data requester; The SaaS gateway generates a corresponding data return event based on the received return data, wherein the data return event includes an event triggering condition, return data, and routing information of the data requester, and sends the data return event to the corresponding local service module according to the routing information of the data requester; The local service module distributes the data return event to the corresponding data requester according to the data requester routing information.
Citation Information
Patent Citations
SAAS (Software-as-a-service) mode mobile e-commerce cloud platform system, transaction method and device
CN107220883A
Data interaction method and device based on application market architecture
CN113259407A
