Interaction method and system of Android POS machine and USB composite device
By identifying the subfunction modules of the USB composite device and establishing a dynamic interaction system, the problem of unstable interaction between the Android POS machine and the USB composite device is solved, and the dynamic stability of the precise interaction and communication space is achieved.
Patent Information
- Application Number
- CN202510325960.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-27
AI Technical Summary
The interaction between existing Android POS machines and USB composite devices is unstable and accurate interaction cannot be achieved.
When the Android POS machine is in an interactive state with the USB composite device, multiple sub-function modules of the USB composite device are identified, and target sub-function modules are determined based on the application scenario and interaction signals, a dynamic interaction system is established, and the communication space is optimized to achieve stable interaction.
It realizes the precise interaction between Android POS and USB composite devices, ensures the dynamic stability of the communication space, and realizes real-time control of the communication space through online optimization.
Smart Images

Figure CN120216435A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Android POS machines, and particularly to an interaction method and system between an Android POS machine and a USB composite device. Background Art
[0002] With the development of technology, Android POS machines are applied to people's lives and interact with USB devices. At this time, the USB device only has one functional module, and the Android POS machine communicates with the USB device based on a single communication space. In the prior art, there is a USB composite device. The USB composite device is plugged into the Android POS machine, and the Android POS machine constructs a corresponding communication space with the functional modules in the USB composite device. However, this communication space is unstable and cannot achieve precise interaction between the Android POS machine and the USB composite device. Summary of the Invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art. The present invention provides an interaction method and system between an Android POS machine and a USB composite device.
[0004] An embodiment of the present invention provides an interaction method between an Android POS machine and a USB composite device. The Android POS machine is configured with mobile wheels and multiple rescue tools. The interaction method between the Android POS machine and the USB composite device includes: When the Android POS machine and the USB composite device are in an interaction state, determine multiple sub-functional modules of the USB composite device based on the function recognition of the USB composite device by the Android POS machine; Determine the target sub-functional module according to the multiple sub-functional modules, the application scenario of the Android POS machine, and the corresponding interaction signals; Determine the corresponding communication space based on the target sub-functional module and the Android POS machine; Determine the dynamic interaction system of the communication space based on the communication method of the communication space, the dynamic matching rate between the target sub-functional module and the Android POS machine, and the storage capacity of the target sub-functional module; In this dynamic interaction system, determine the abnormal events of the communication space based on the data transmission efficiency of the target sub-functional module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space; Determine the corresponding optimization means based on the abnormal events of the communication space, the USB composite device, and the Android POS machine, and optimize the communication space online according to this optimization means.
[0005] An embodiment of the present invention provides an interaction system between an Android POS machine and a USB composite device. The interaction system between the Android POS machine and the USB composite device is applied to the above-mentioned interaction method between the Android POS machine and the USB composite device. The interaction system between the Android POS machine and the USB composite device includes: An identification module, configured to determine multiple sub-function modules of the USB composite device based on the function identification of the USB composite device by the Android POS machine when the Android POS machine and the USB composite device are in an interaction state; A target module, configured to determine a target sub-function module according to the multiple sub-function modules, the application scenario of the Android POS machine, and the corresponding interaction signals; A communication space module, configured to determine a corresponding communication space based on the target sub-function module and the Android POS machine; A dynamic interaction system module, configured to determine the dynamic interaction system of the communication space based on the communication method of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module; An exception event module, configured to determine the exception event of the communication space based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space in the dynamic interaction system; An online optimization module, configured to determine corresponding optimization means based on the exception event of the communication space, the USB composite device, and the Android POS machine, and optimize the communication space online according to the optimization means.
[0006] In the embodiment of the present invention, through the method in the embodiment of the present invention, when the Android POS machine and the USB composite device are in an interaction state, multiple sub-function modules of the USB composite device are determined based on the function identification of the USB composite device by the Android POS machine; a target sub-function module is determined according to the multiple sub-function modules, the application scenario of the Android POS machine, and the corresponding interaction signals; a corresponding communication space is determined based on the target sub-function module and the Android POS machine; the dynamic interaction system of the communication space is determined based on the communication method of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, which comprehensively considers the communication method of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, ensures the accuracy of the dynamic interaction system of the communication space, and realizes the accurate interaction between the Android POS machine and the USB composite device.
[0007] Therefore, in this dynamic interaction system, abnormal events in the communication space are determined based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space; corresponding optimization measures are determined based on the abnormal events in the communication space, the USB composite device, and the Android POS machine, and the communication space is optimized online according to the optimization measures, ensuring the dynamic stability of the communication space during data transmission and realizing the online control of the communication space, avoiding the inability to communicate between the Android POS machine and the USB composite device. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a schematic flowchart of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 2 is a schematic flowchart of step S11 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 3 is a schematic flowchart of step S12 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 4 is a schematic flowchart of step S13 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 5 is a schematic flowchart of step S14 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 6 is a schematic flowchart of step S15 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 7 is a schematic flowchart of step S16 of the interaction method between the Android POS machine and the USB composite device in an embodiment of the present invention; Figure 8 is a schematic diagram of the structural composition of the interaction system between the Android POS machine and the USB composite device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0009] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.
[0010] Please refer to Figures 1 to 8 , an interaction method between an Android POS machine and a USB composite device, which is applied to the interaction scenario between the Android POS machine and the USB composite device; the interaction method between the Android POS machine and the USB composite device includes: Step S11: When the Android POS machine and the USB composite device are in an interactive state, determine multiple sub-function modules of the USB composite device based on the function recognition of the USB composite device by the Android POS machine; Step S12: Determine the target sub-function module according to the multiple sub-function modules, the application scenario of the Android POS machine, and the corresponding interaction signals; Step S13: Determine the corresponding communication space based on the target sub-function module and the Android POS machine; Step S14: Determine the dynamic interaction system of the communication space based on the communication method of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module; Step S15: In this dynamic interaction system, determine the abnormal events of the communication space based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space; Step S16: Determine the corresponding optimization means based on the abnormal events of the communication space, the USB composite device, and the Android POS machine, and optimize the communication space online according to this optimization means.
[0011] Reference Figure 2 , in step S11, when the Android POS machine and the USB composite device are in an interactive state, determine multiple sub-function modules of the USB composite device based on the function recognition of the USB composite device by the Android POS machine; In the specific implementation process of the present invention, the specific steps are as follows: S111: Connect the USB composite device to the Android POS machine, and determine that the Android POS machine and the USB composite device are in an interactive state according to the response signal of the Android POS machine; S112: When the Android POS machine and the USB composite device are in an interactive state, determine the corresponding function recognition mode based on this response signal, the function matching signal of the Android POS machine to the USB composite device, and the USB composite device; S113: Trigger the function recognition of the USB composite device by the Android POS machine based on the Android POS machine, the function recognition mode, and the USB composite device, and determine multiple sub-function modules of the USB composite device.
[0012] In the embodiment of the present application, connect the USB composite device to the Android POS machine, and determine that the Android POS machine and the USB composite device are in an interactive state according to the response signal of the Android POS machine, introducing the interactive state between the Android POS machine and the USB composite device.
[0013] At this time, when the Android POS machine detects the insertion of a USB device, its built-in USB Host controller will start initializing the communication with the device. This process includes powering the device (if necessary), detecting the presence of the device, and preparing for data exchange with the device. The Android POS machine system or a specific application will listen for notifications or events from the USB Host controller, and these notifications indicate that a new device is connected or the device status has changed.
[0014] After the Android POS machine receives the response signals from the USB Host controller, it will analyze these signals to determine the type and status of the device. The response signals include the reading results of the device descriptor, which provides basic information about the device, such as the Vendor ID, Product ID, etc. If the Android POS machine successfully identifies the USB composite device and the device is in an interactive state (for example, there is no error status report and the device is ready for data transmission), then the system or application will confirm that the Android POS machine and the USB composite device are in an interactive state.
[0015] Furthermore, when the Android POS machine and the USB composite device are in an interactive state, based on the response signal, the function matching signal of the Android POS machine to the USB composite device, and the USB composite device, the corresponding function recognition mode is determined. Considering the response signal, the function matching signal of the Android POS machine to the USB composite device, and the USB composite device as a whole, the accuracy of the corresponding function recognition mode is ensured.
[0016] At this time, the Android POS machine and the USB composite device have confirmed the interactive state through physical connection and preliminary signal exchange, which means that the device has been powered on, recognized by the Android POS machine, and is ready for data communication.
[0017] The Android POS machine will analyze the response signals received from the USB composite device. These signals include the device descriptor, configuration descriptor, and interface descriptor, and these descriptors provide key information about the device functions, configurations, and supported interfaces. The Android POS machine will check the fields in these descriptors, such as the Vendor ID, Product ID, device class code, etc., to determine the type and functions of the device.
[0018] Based on the analysis of the response signals, the Android POS machine will send a series of function matching signals to the USB composite device. These signals include requests for specific configuration descriptors, activation or query of specific interface functions, etc. Meanwhile, the USB composite device responds to the function matching signal sent by the Android POS machine; it returns more detailed configuration information, interface status, or support for specific functions, and these response signals help the Android POS machine more accurately understand the actual functions and current status of the device.
[0019] Based on the exchange results of the response signals and function matching signals received from the USB composite device, the Android POS machine determines a corresponding function recognition mode; the function recognition mode is based on factors such as the type of device, manufacturer-specific implementation, supported function set, etc.; it defines the protocols, data formats, and operation procedures that the Android POS machine should follow when communicating with the device.
[0020] Therefore, based on the Android POS machine, the function recognition mode, and the USB composite device triggering the Android POS machine to recognize the functions of the USB composite device and determine multiple sub-function modules of the USB composite device, multiple sub-function modules of the USB composite device are introduced.
[0021] At this time, the Android POS machine has determined the function recognition mode for communicating with the USB composite device, which is obtained based on the analysis of device descriptors, configuration descriptors, interface descriptors, and the exchange results of function matching signals between the Android POS machine and the device; the Android POS machine will prepare corresponding communication protocols, data formats, and operation sequences according to this function recognition mode to interact with the device efficiently and accurately.
[0022] Once the function recognition mode is determined, the Android POS machine triggers the function recognition process for the USB composite device, which involves sending a series of specific requests or commands to the device to explore its supported functions and sub-function modules; the USB composite device responds to the requests or commands sent by the Android POS machine, and these responses contain key information about the device's functions and sub-function modules; the Android POS machine analyzes these responses and extracts information about each sub-function module, such as function description, operation mode, supported commands, and data formats.
[0023] Based on the analysis of the device responses, the Android POS machine determines multiple sub-function modules included in the USB composite device, and these sub-function modules represent different operation modes or function sets of the device, such as storage, printing, scanning, communication, etc.; the Android POS machine creates corresponding configurations and data structures for each identified sub-function module to communicate and control them correctly in subsequent operations.
[0024] Specifically, assume that the Android POS machine is used in a fast food restaurant and is connected to a composite USB device that integrates three sub - function modules: a receipt printer, a customer display, and a magnetic stripe card reader. The Android POS machine has determined the function recognition mode for communicating with the composite USB device through previous steps. This mode indicates that the device supports multiple interfaces, with each interface corresponding to a different sub - function module. The Android POS machine sends a series of requests to the composite device to explore the functions and sub - function modules it supports. These requests include querying the number of interfaces, the function description of each interface, etc.
[0025] The composite device responds to the requests of the Android POS machine and provides information about the three sub - function modules it supports: the receipt printer, the customer display, and the magnetic stripe card reader. Each sub - function module has corresponding interface descriptions, operation modes, and supported command sets. Based on the analysis of the composite device's response, the Android POS machine determines the three sub - function modules included in the device. It creates corresponding configurations and data structures for each sub - function module. For example, it configures the print command set and print buffer for the receipt printer, the display content and update frequency for the customer display, and the card - reading command and data - processing flow for the magnetic stripe card reader. Now, the fast - food restaurant application on the Android POS machine is configured to use these sub - function modules. For example, after a customer places an order and completes the payment, the application sends a print command to the receipt printer to print the receipt, updates the customer display to show the order status, and reads the magnetic stripe card for payment verification.
[0026] Reference Figure 3 , in step S12, determine the target sub - function module according to multiple sub - function modules, the application scenario of the Android POS machine, and the corresponding interaction signals; In the specific implementation process of the present invention, the specific steps are as follows: S121: Determine the application scenario of the Android POS machine according to multiple working parameters of the Android POS machine, the usage scenario where the Android POS machine is located, and the previous usage information of the Android POS machine; S122: Dynamically collect multiple interaction information based on the interaction between the Android POS machine and the USB composite device, and determine the corresponding interaction signals according to the multiple interaction information; S123: Determine the first target coefficient according to multiple sub - function modules and the application scenario of the Android POS machine, determine the second target coefficient according to multiple sub - function modules and the corresponding interaction signals, and determine the target sub - function module based on the first target coefficient, the second target coefficient, and multiple sub - function modules.
[0027] In an embodiment of the present application, the application scenario of the Android POS machine is determined based on multiple working parameters of the Android POS machine, the usage scenario where the Android POS machine is located, and the previous usage information of the Android POS machine. Considering the overall situation of multiple working parameters of the Android POS machine, the usage scenario where the Android POS machine is located, and the previous usage information of the Android POS machine, the accuracy of the application scenario of the Android POS machine is ensured.
[0028] At this time, multiple working parameters of the Android POS machine are obtained through the system settings, diagnostic tools, or management software of the Android POS machine, and the usage scenario where the Android POS machine is located is controlled. The multiple working parameters of the Android POS machine, the usage scenario where the Android POS machine is located, and the previous usage information of the Android POS machine are interacted with. By combining the working parameters, usage scenario, and previous usage information, comprehensive analysis and judgment are carried out, ensuring the accuracy of the application scenario of the Android POS machine.
[0029] Furthermore, multiple interaction information is dynamically collected based on the interaction between the Android POS machine and the USB composite device, and the corresponding interaction signals are determined according to the multiple interaction information; the interaction between the Android POS machine and the USB composite device is realized, and the interaction signals are further accurately controlled.
[0030] At this time, an interaction information collection module is integrated into the operating system or application program of the Android POS machine. This module is responsible for capturing key information such as communication data and status changes between devices; various information generated during the interaction between the Android POS machine and the USB composite device is collected in real time, including data transfer rate, data transfer volume, error code, device status (such as online, offline, busy, etc.), response time, etc.; through the interaction information collection mechanism, these information are captured and stored in real time for subsequent analysis and processing.
[0031] The collected interaction information is analyzed and evaluated to identify potential interaction signals; useful signals are extracted from the interaction information, such as the communication quality between devices and the change trend of device status; according to the conclusions obtained from the analysis, corresponding signal tags are assigned to each interaction information and stored in the signal database of the system.
[0032] Specifically, assume that a store named "Intelligent Retail" uses an Android POS machine, and this POS machine is connected to a USB composite device integrated with a printer, a scanner, and a payment terminal; an interaction information collection module is integrated into the operating system of the Android POS machine, and this module monitors and records information such as communication data and device status between the POS machine and the USB composite device in real time; during the operation of one day, the following information is captured in real time by the interaction information collection module: Data transfer rate: When printing receipts, the data transfer rate is stable at around 1 MB per second; Data transfer volume: Each time the scanner scans a product, the transferred data volume is approximately 2 KB; Error code: During the payment process, the "timeout" error code occasionally appears, but then it automatically recovers; Device status: The printer and scanner are mostly online, and the payment terminal is occasionally busy during peak periods.
[0033] By statistically analyzing the collected information, it is found that: The stable data transfer rate of the printer indicates good device performance; The small data transfer volume of the scanner has little impact on the system performance; The payment terminal occasionally has timeout errors, but recovers quickly, which is caused by network fluctuations; The device status changes as expected, and there are no long-term offline or failure situations.
[0034] Based on the above analysis, the following interaction signals are determined: Normal communication signal: The stable data transfer rate and moderate data transfer volume of the printer and scanner indicate normal communication between devices; Abnormal warning signal: The payment terminal occasionally has timeout errors but automatically recovers. The system regards this as a minor anomaly and generates a warning signal for merchants to pay attention in a timely manner; Device status change signal: The printer and scanner are mostly online, and the payment terminal is occasionally busy during peak periods. These status changes are recorded as device status change signals for monitoring the operation status of the devices.
[0035] Therefore, the first target coefficient is determined according to multiple sub-functional modules and the application scenarios of the Android POS machine, the second target coefficient is determined according to multiple sub-functional modules and the corresponding interaction signals, and the target sub-functional module is determined based on the first target coefficient, the second target coefficient, and multiple sub-functional modules, taking into account the overall compatibility of the first target coefficient, the second target coefficient, and multiple sub-functional modules to ensure the accuracy of the sub-functional modules.
[0036] At this time, the first target coefficient, the second target coefficient, and multiple sub-functional modules are introduced. For the first target coefficient, the importance and applicability of each sub-functional module in the current application scenario of the Android POS machine are evaluated; Method: According to the application scenarios of the Android POS machine (such as retail, catering, mobile payment, etc.), analyze the functional characteristics, performance requirements, and matching degree with the scenario of each sub-functional module. Assign a weight value (i.e., the first target coefficient) to each sub-functional module, and this value reflects the importance of the module in the current scenario.
[0037] For the second target coefficient, evaluate the response ability and adaptability of each sub-functional module to the interaction signals; Method: Based on the previously collected and analyzed interaction signals (such as data transmission rate, error rate, device status, etc.), analyze the sensitivity and processing ability of each sub-functional module to these signals. Assign another weight value (i.e., the second target coefficient) to each sub-functional module, which reflects the adaptability and response efficiency of the module to the interaction signals.
[0038] Combine the first target coefficient and the second target coefficient, as well as the functional characteristics of the sub-functional modules, to determine the optimal or most necessary sub-functional modules in the current application scenario and interaction signals; Method: Use the weighted summation method to combine the first target coefficient and the second target coefficient with the functional characteristics of the sub-functional modules, and calculate the comprehensive score of each sub-functional module. Determine the target sub-functional modules according to the score.
[0039] Specifically, assume that a clothing store named "Fashion Trend" uses an Android POS machine, which is connected to multiple sub-functional modules, including a barcode scanner, an NFC payment terminal, a receipt printer, an inventory management system interface, and a customer information display screen.
[0040] In the application scenario of the clothing store, the importance of each sub-functional module is as follows: Barcode scanner: Very important, used to quickly and accurately scan product barcodes to improve the checkout efficiency; NFC payment terminal: Important, supports contactless payment to meet the payment needs of modern customers; Receipt printer: Important, provides transaction vouchers for customers; Inventory management system interface: Relatively important, used to update inventory information in real time, but not as directly facing customers as the former two; Customer information display screen: Less important, displays customer information, but is not essential in the application of the clothing store; Based on the above analysis, assign the first target coefficient to each sub-functional module, such as 0.4 for the barcode scanner, 0.3 for the NFC payment terminal, 0.2 for the receipt printer, 0.05 for the inventory management system interface, and 0.05 for the customer information display screen.
[0041] Assume that through the analysis of interaction signals, the following situations are found: Barcode scanner: Fast data transmission rate, low error rate, and very rapid response to interaction signals; NFC payment terminal: Occasionally has network latency, but overall performance is stable; Receipt printer: Moderate printing speed, but occasionally has paper jams; Inventory management system interface: Stable data transmission, but slightly longer response time; Customer information display screen: Displays information accurately, but is not sensitive enough to interaction signals; Based on the above analysis, assign the second target coefficient to each sub-functional module, such as 0.4 for the barcode scanner, 0.35 for the NFC payment terminal, 0.2 for the receipt printer, 0.03 for the inventory management system interface, and 0.02 for the customer information display screen.
[0042] The comprehensive scores of each sub - function module are calculated using the weighted average method: Barcode scanner: 0.4 (first target coefficient) * 0.4 (second target coefficient) = 0.16; NFC payment terminal: 0.3 * 0.35 = 0.105; Receipt printer: 0.2 * 0.2 = 0.04; Inventory management system interface: 0.05 * 0.03 = 0.0015; Customer information display screen: 0.05 * 0.02 = 0.001.
[0043] According to the comprehensive scores, the barcode scanner and the NFC payment terminal have the highest scores, so they are determined as the target sub - function modules under the current application scenario and interaction signals. This means that in the daily operation of the clothing store, the normal operation and efficient interaction of these two sub - function modules should be ensured first.
[0044] Reference Figure 4 , in step S13, based on the target sub - function module and the Android POS machine, the corresponding communication space is determined; In the specific implementation process of the present invention, the specific steps are as follows: S131: Based on the traversal of the target sub - function module, the first node of the data output of the target sub - function module is determined; S132: Based on the interaction between the Android POS machine and the USB composite device, the second node of the data input of the Android POS machine is determined; S133: Perform multiple interactions on the first node, the second node, the function matching coefficients of the target sub - function module and the Android POS machine, and determine the corresponding communication space according to the multiple interactions of the first node, the second node, the function matching coefficients of the target sub - function module and the Android POS machine.
[0045] In the embodiment of the present application, based on the traversal of the target sub - function module, the first node of the data output of the target sub - function module is introduced.
[0046] At this time, inside the sub - function module, the components or interfaces responsible for data output are identified. These components or interfaces are the starting points for data to flow from the sub - function module to other parts; among the identified components or interfaces, the node closest to the final data output position is selected as the first node; optionally, according to the data flow path, trace back reversely from the output end of the sub - function module to find the last processing or storage point before the data is officially output.
[0047] Further, a second node for determining the data input of the Android POS machine is determined based on the interaction between the Android POS machine and the USB composite device; the interaction between the Android POS machine and the USB composite device is realized, and the second node of the data input of the Android POS machine is further accurately controlled.
[0048] At this time, a second node for the data input of the Android POS machine is introduced. On the Android POS machine, the interface responsible for communicating with the USB composite device and its specific functions are determined; the hardware interface layout of the Android POS machine is checked to identify the location, type, and specifications of the USB interface (such as USB2.0, USB3.0, Type-A, Type-C, etc.); at the same time, the configuration and functions of this interface are understood through software settings or driver programs.
[0049] For the second node, by analyzing the system architecture, driver code, or hardware design documents of the Android POS machine, trace the flow of data received by the USB interface inside the Android POS machine until the node before the data is officially processed or stored is found.
[0050] Specifically, assume that an Android POS machine is connected to a USB composite device that includes both a barcode scanner function and a magnetic stripe card reader function; in this scenario, focus on the data input of the barcode scanner function part; the Android POS machine communicates with the composite device through its built-in USB host controller; when the composite device is connected to the USB interface of the Android POS machine, the Android POS machine will recognize the device and load the corresponding driver; the driver is responsible for processing the USB communication protocol and transferring the data from the USB interface to the memory or processor of the Android POS machine; on the back or side of the Android POS machine, there is a Type-A USB interface that supports the USB2.0 communication protocol; this interface is configured to connect external USB devices such as keyboards, mice, or composite devices; when the composite device is connected to this interface, the Android POS machine will automatically recognize and load the corresponding driver.
[0051] Inside the Android POS machine, when the USB composite device sends barcode data through the Type-A interface, the data is first received by the USB host controller; the USB host controller converts the data from the USB physical layer to the logical layer data and transfers it to the USB driver layer of the Android operating system; at the driver layer, the data is further processed and routed to the corresponding application layer interface according to the device descriptor and configuration descriptor of the composite device; in this example, the barcode data is routed to a specific application programming interface (API) on the Android POS machine, and this API is responsible for processing the barcode data and passing it to the upper-layer application for further processing; therefore, the interface between the USB host controller and the USB driver layer of the Android operating system is determined as the second node for data input, which is the first formal processing point after the data enters the Android POS machine from the USB composite device and is also the key node before the data is further routed and processed inside the Android POS machine.
[0052] Therefore, the first node, the second node, the target sub-function module, and the function matching coefficient of the Android POS machine are interacted multiplicatively, and the corresponding communication space is determined according to the multiplicative interaction of the first node, the second node, the target sub-function module, and the function matching coefficient of the Android POS machine; the multiplicative interaction of the first node, the second node, the target sub-function module, and the function matching coefficient of the Android POS machine is realized, ensuring the accuracy of the corresponding communication space.
[0053] At this time, obtain the detailed information of the first node and the second node from the previous steps, including their locations, functions, data formats, communication protocols, etc.; at the same time, calculate the function matching coefficient according to the technical specifications and function requirements of the target sub-function module and the Android POS machine; simulate the data flow process from the first node through the second node to the Android POS machine; consider factors such as data format conversion, communication protocol matching, data rate, and bandwidth requirements.
[0054] According to the function characteristics of the target sub-function module (such as data output rate, data format, communication protocol, etc.) and the function requirements of the Android POS machine (such as data input rate, processing capacity, supported communication protocol, etc.), calculate the function matching coefficient, which is a numerical value or a set of scores used to represent the degree of fit between the two; analyze factors such as data flow, communication efficiency, and resource utilization in the multiplicative interaction model, and combine the evaluation results of the function matching coefficient to select a communication space for efficiently and stably transmitting data, and this communication space is physical (such as a specific USB channel, network interface, etc.) and also logical (such as a specific data channel, message queue, etc.).
[0055] Specifically, assume that the target sub - function module is a high - speed barcode scanner, which is connected to the USB interface of the Android POS machine; it has been determined that the first node is the data buffer inside the barcode scanner, and the second node is the interface between the USB host controller and the driver on the Android POS machine.
[0056] First node: The data buffer of the barcode scanner, supporting high - speed data output in the format of standard barcode - decoded text; Second node: The USB host controller - driver interface of the Android POS machine, supporting the USB2.0 communication protocol, receiving and processing data from external USB devices; Target sub - function module: High - speed barcode scanner, with high - speed scanning and decoding capabilities; Android POS machine: Having powerful data - processing capabilities, supporting multiple communication protocols and data formats.
[0057] Simulate the process of the barcode scanner sending data to the Android POS machine through the USB interface; The simulation software simulates the process of data from the data buffer of the barcode scanner reaching the USB host controller and driver of the Android POS machine through the USB interface, and considers factors such as data - format conversion and communication - protocol matching; According to the data - output rate of the barcode scanner (such as scanning 100 barcodes per second) and the data - processing capabilities of the Android POS machine (such as processing 200 data requests per second), a function - matching coefficient is calculated to represent the degree of fit between the two; Assume this coefficient is 0.9 (indicating a high degree of match); By analyzing the data flow, communication efficiency, and resource utilization in the simulation model, it is found that using the USB2.0 channel can efficiently transmit the data output by the barcode scanner to the Android POS machine; Due to the high function - matching coefficient (0.9), it is certain that this communication space meets the current application requirements. Therefore, it is determined to use the USB2.0 channel as the communication space between the barcode scanner and the Android POS machine, which can efficiently transmit data while meeting the functional requirements and matching degree of both.
[0058] Reference Figure 5 , in step S14, based on the communication method of the communication space, the dynamic matching rate between the target sub - function module and the Android POS machine, and the storage capacity of the target sub - function module, determine the dynamic interaction system of the communication space; In the specific implementation process of the present invention, the specific steps are as follows: S141: Collect the communication space, and based on the communication space and the Android POS machine, determine the communication method of the communication space; S142: Real - time monitor the dynamic interaction between the target sub - function module and the Android POS machine, and collect the dynamic matching rate between the target sub - function module and the Android POS machine; S143: Determine multiple interaction combinations based on the communication method in the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, and determine the dynamic interaction system of the communication space according to the multiple training of the multiple interaction combinations.
[0059] In the embodiments of the present application, collect the communication space, and determine the communication method of the communication space based on the communication space and the Android POS machine, which takes into account the overall consideration of the communication space and the Android POS machine, and ensures the accuracy of the communication method of the communication space.
[0060] At this time, consult the hardware specification of the communication space to understand the interface type (such as USB Type-A, Type-C), voltage and current requirements; confirm the communication protocols supported by the communication space, and understand the working principles and data formats of these protocols; collect information about data transfer rate, bandwidth and latency, which can be found in the specification or relevant documents of the communication space.
[0061] After understanding the detailed information of the communication space, the next step is to determine the most suitable communication method according to the hardware configuration, software support and application requirements of the Android POS machine, which involves selecting a communication protocol, configuring data transfer parameters (such as baud rate, packet size), ensuring that the Android POS machine has the corresponding driver or application support, and considering any factors that affect communication performance, such as electromagnetic interference, physical obstacles or network congestion.
[0062] Select the most suitable communication protocol according to the protocols supported by the communication space and the compatibility of the Android POS machine; for example, if the communication space is a USB interface and the Android POS machine supports the USB HID protocol, then select USB HID as the communication protocol; configure data transfer parameters according to the application requirements and the performance parameters of the communication space; for example, for applications that require high-speed data transfer, select a higher baud rate or a larger packet size (within the range allowed by the communication space), and confirm that the Android POS machine has the driver or application support that matches the selected communication protocol; if necessary, install or update the driver.
[0063] Furthermore, monitor the dynamic interaction between the target sub-function module and the Android POS machine in real time, and collect the dynamic matching rate between the target sub-function module and the Android POS machine; determine multiple interaction combinations based on the communication method in the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, and determine the dynamic interaction system of the communication space according to the multiple training of the multiple interaction combinations, which ensures the accuracy of the dynamic interaction system of the communication space.
[0064] At this time, continuously monitor the data exchange process between the target sub-functional module (such as barcode scanner, printer, etc.) and the Android POS machine, which involves the following aspects of monitoring: Integrity of data transmission: Ensure that the data sent from the target sub-functional module to the Android POS machine is not lost or damaged; Timeliness of data transmission: Monitor the transmission delay of data from the sender to the receiver to ensure it is completed within an acceptable time range; Adherence to communication protocol: Verify whether both parties conduct data transmission according to the predefined communication protocol; Error handling mechanism: Observe how both parties respond and handle when errors occur during data transmission.
[0065] Based on real-time monitoring, next, it is necessary to calculate the dynamic matching rate between the target sub-functional module and the Android POS machine. This matching rate is a comprehensive indicator that reflects the compatibility and efficiency of the two during the communication process; The matching rate is based on multiple factors, such as the success rate of data transmission, error rate, adherence to communication protocol, resource utilization, etc. To calculate the matching rate, it is necessary to collect and process the data generated during real-time monitoring, which involves technical means such as data filtering, statistical analysis, trend prediction, etc.; Finally, the matching rate is expressed as a numerical value or percentage, used to quantify the communication performance between the target sub-functional module and the Android POS machine.
[0066] Comprehensively consider the communication methods in the communication space (such as USB HID, Bluetooth SPP, etc.), the dynamic matching rate between the target sub-functional module and the Android POS machine (reflecting the compatibility and efficiency of their communication), and the storage capacity of the target sub-functional module (such as buffer size, storable data volume, etc.) to design multiple interaction combinations; The interaction combinations involve the following aspects: Data transmission strategy: Determine whether to transmit data continuously or in batches, and the size of each batch of data; Error handling mechanism: Design coping strategies when errors occur during data transmission, such as retransmission, error logging, etc.; Data caching strategy: According to the storage capacity of the target sub-functional module, decide whether to cache data on the Android POS machine or the target sub-functional module, as well as the size and strategy of caching; Communication protocol optimization: Adjust the parameters of the communication protocol, such as packet format, checksum algorithm, etc., according to the dynamic matching rate to improve communication efficiency.
[0067] After determining multiple interaction combinations, the next step is to evaluate the performance of these combinations through multiple trainings and accordingly determine the final dynamic interaction system. Multiple trainings include simulation tests, actual environment tests, stress tests, etc., aiming to comprehensively evaluate the performance of interaction combinations in different scenarios; During the training process, the following data needs to be collected and analyzed: Communication performance: such as data transfer rate, error rate, transmission delay, etc.; Resource utilization: such as CPU usage, memory occupancy, power consumption, etc.; User experience: such as response time, smoothness, stability, etc.; Based on these data, evaluate the advantages and disadvantages of different interaction combinations, and select the combination with the optimal performance as the basis of the dynamic interaction system. At the same time, a mechanism needs to be established to monitor the performance changes during actual operation and dynamically adjust the interaction strategy as needed.
[0068] Specifically, assume there is an Android POS machine that is connected to a barcode scanner through a Bluetooth interface. The goal is to determine a dynamic interaction system to optimize the communication between them; Analyze the communication method of the Bluetooth interface, understand its data transfer rate, bandwidth limit, and latency characteristics; Evaluate the feasibility of continuous transmission and batch transmission based on the dynamic matching rate between the barcode scanner and the Android POS machine, and find that batch transmission performs better in reducing the error rate and improving transmission stability; Considering the buffer size of the barcode scanner, design a data caching strategy, that is, cache a certain amount of barcode data on the scanner and then transmit it to the Android POS machine at one time when the buffer is full; Considering the above factors, design several interaction combination schemes, including different batch sizes, caching strategies, and error handling mechanisms.
[0069] Design several test scenarios, including high-load scanning, low-battery environment, network instability, etc.; Run tests in these scenarios and collect data on communication performance, resource utilization, and user experience; After analyzing the data, it is found that a specific interaction combination scheme performs excellently in terms of communication performance, resource utilization, and user experience. This scheme adopts a moderate batch size, an effective caching strategy, and a robust error handling mechanism; Therefore, select this scheme as the basis of the dynamic interaction system and establish a performance monitoring and adjustment mechanism to dynamically adjust the interaction strategy as needed during actual operation; Through this process, determine an optimized dynamic interaction system to support efficient and stable communication between the barcode scanner and the Android POS machine.
[0070] Reference Figure 6 In step S15, in this dynamic interaction system, determine the abnormal events of the communication space based on the data transfer efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space. In the specific implementation process of the present invention, the specific steps are as follows: S151: In this dynamic interaction system, collect the number of abnormal occurrences of the communication space under the dynamic interaction system, and determine the corresponding abnormal characteristics according to the traceability of the number of abnormal occurrences. S152: Determine the stability coefficient of the communication space based on each abnormal characteristic, the repair time of the communication space, and the repair efficiency of the communication space. S153: Collect the data transfer efficiency of the target sub - function module and the reading efficiency of the Android POS machine; S154: Determine multiple communication events based on the multiple interactions of the data transfer efficiency of the target sub - function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space, and determine the abnormal events of the communication space according to the identification of the multiple communication events.
[0071] In the embodiment of the present application, in this dynamic interaction system, collect the number of abnormal occurrences in the communication space under the dynamic interaction system, and determine the corresponding abnormal characteristics according to the traceability of the number of abnormal occurrences, ensuring the accuracy of the abnormal characteristics.
[0072] At this time, deploy monitoring tools at the key nodes of the communication space. These tools capture communication data in real - time and detect abnormalities. These tools are either dedicated software applications or built - in functions of hardware devices.
[0073] Whenever a monitoring tool detects an abnormality, detailed log information needs to be recorded. These logs should contain key information such as the timestamp of the abnormality occurrence, the type of abnormality, the scope of influence, the cause, etc. This information is crucial for subsequent abnormality traceability and characteristic determination; within a certain period (such as one day, one week, or one month), count and record the number of abnormalities occurring in the communication space, which helps to evaluate the stability and reliability of the system.
[0074] Furthermore, determine the stability coefficient of the communication space based on each abnormal characteristic, the repair time of the communication space, and the repair efficiency of the communication space, taking into account the overall compatibility of each abnormal characteristic, the repair time of the communication space, and the repair efficiency of the communication space, ensuring the accuracy of the stability coefficient of the communication space.
[0075] At this time, carefully analyze the abnormal logs to understand the specific situations and conditions of the abnormality occurrence, which includes the time of the abnormality occurrence, the communication components involved, the specific manifestations of the abnormality, etc.; based on the log analysis, extract the characteristics of each abnormality, and these characteristics include the frequency of the abnormality, the duration, the scope of influence, whether other abnormalities are accompanied, etc.; the extracted characteristics need to be verified to ensure their accuracy and reliability, which is carried out by simulating abnormal scenarios, comparing with other monitoring systems, etc.; after verification, organize and summarize the characteristics to form an abnormal characteristic library; based on the abnormal characteristics, preliminarily judge the cause of the abnormality, which helps with subsequent problem location and repair.
[0076] Specifically, assume there is a communication space formed by connecting an Android POS machine and a barcode scanner via Bluetooth. Under the dynamic interaction system, a network monitoring software is deployed to monitor this communication space. The monitoring software detected that the Bluetooth connection was abnormally disconnected 5 times in the past week. Each time an abnormal disconnection occurred, the monitoring software recorded detailed log information, including the disconnection timestamp, affected devices, error codes, etc.
[0077] By analyzing the log information, it was found that these 5 abnormal disconnections all occurred during the peak hours of each day (such as from 10 am to 11 am). Further analysis revealed that when the abnormal disconnections occurred, the signal strength of the Bluetooth connection was generally weak. After summarizing and organizing, the abnormal characteristics of this communication space were determined as follows: during peak hours, when the Bluetooth signal strength is weak, the Bluetooth connection is prone to abnormal disconnection. Based on these abnormal characteristics, it was initially judged that the cause of the abnormality was Bluetooth signal interference or excessive device load, which will help with subsequent problem location and repair work.
[0078] Furthermore, based on each abnormal characteristic, the repair time of the communication space, and the repair efficiency of the communication space, the stability coefficient of the communication space is determined, taking into account the overall consideration of each abnormal characteristic, the repair time of the communication space, and the repair efficiency of the communication space, ensuring the accuracy of the stability coefficient of the communication space.
[0079] At this time, key data related to the stability of the communication space is collected. This data includes each abnormal characteristic determined in the previous steps, the repair time of the communication space after each abnormal occurrence, and the repair efficiency.
[0080] The abnormal characteristics include features such as the frequency, type, and scope of influence of the abnormality. This data is obtained from the previous abnormal logs and analysis reports. The repair time refers to the time required for the communication space to return to normal operation from the occurrence of the abnormality, which is obtained through the log records of the monitoring system, manual records, or automated tools. The shorter the repair time, the stronger the recovery ability of the system. At the same time, the repair efficiency refers to the utilization efficiency of resources and the accuracy of repair during the repair process, which is evaluated by analyzing the logs during the repair process, resource usage (such as CPU usage rate, memory occupancy, etc.), and the system performance after repair. An efficient repair means that resources are used properly and the problem is accurately solved.
[0081] Different abnormal features have different degrees of influence on the stability of the communication space; therefore, it is necessary to assign a weight to each abnormal feature to reflect its importance; the repair time and repair efficiency are quantified into values between 0 and 1 through normalization for calculation in the formula; combining the weights of abnormal features, the quantified values of repair time and repair efficiency, design a stability coefficient calculation formula that should reflect the stability level of the communication space under different abnormal features and repair conditions. After determining the stability coefficient calculation formula, substitute the collected data into the formula to calculate the stability coefficient of the communication space, which is used as a quantitative indicator to evaluate the stability level of the communication space.
[0082] Specifically, assume there is a communication space that has shown the following abnormal features in the past month: Abnormal feature A: Packet loss, occurring once a week; Abnormal feature B: Communication delay, occurring twice a month; Abnormal feature C: Device unresponsiveness, occurring once a month.
[0083] At the same time, the following repair time and repair efficiency data are collected: Repair time: On average, each repair takes 2 hours; Repair efficiency: After repair, the proportion of the system performance restored to the normal level is 90%; Now, design a stability coefficient calculation formula, where the weight of abnormal feature A is 0.4, the weight of abnormal feature B is 0.3, and the weight of abnormal feature C is 0.3 (these weights are assigned according to business requirements and expert experience); the repair time and repair efficiency are quantified into 0.6 (indicating a relatively long repair time) and 0.9 (indicating a relatively high repair efficiency) through normalization respectively.
[0084] The stability coefficient calculation formula is designed as: Stability coefficient = (1 - weight of abnormal feature A × occurrence frequency of abnormal feature A) × normalized value of repair efficiency × (1 - reciprocal of normalized value of repair time) +... (similar calculations are performed for other abnormal features); substitute the above data into the formula to calculate the stability coefficient; assume that after calculation, the stability coefficient of the communication space is 0.75, which means that the communication space has a relatively good stability level under the current abnormal features and repair conditions, but there is still room for improvement; it should be noted that the specific calculation formula of the stability coefficient and the weight assignment vary according to business requirements and system characteristics; in actual applications, adjustments and optimizations need to be made according to specific situations.
[0085] Further, collect the data transmission efficiency of the target sub - function module and the reading efficiency of the Android POS machine; determine multiple communication events based on the multiple interactions of the data transmission efficiency of the target sub - function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space, and determine the abnormal events in the communication space according to the identification of multiple communication events; realize the multiple interactions of the data transmission efficiency of the target sub - function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space, and further accurately control multiple communication events.
[0086] At this time, collect the data transmission efficiency of the target sub - function module and the reading efficiency of the Android POS machine. The data transmission efficiency refers to the amount of data successfully transmitted by the target sub - function module per unit time; it is evaluated by measuring the data transmission rate (such as the number of bytes transmitted per second) or the integrity of data transmission (such as the packet loss rate). The reading efficiency of the Android POS machine refers to the rate at which the Android POS machine receives data from the communication space and successfully reads (or processes) it; it is evaluated by measuring the reading speed (such as the amount of data read per second) or the reading success rate (such as the proportion of successfully read data packets to the total number of data packets).
[0087] Perform multiple interactions on the data transmission efficiency of the target sub - function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space. At this time, construct a multiple - interaction model that comprehensively considers the data transmission efficiency of the target sub - function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space. This model will be used to simulate and predict communication events occurring in the communication space.
[0088] After constructing the multiple - interaction model, the next step is to use the model to simulate and predict communication events occurring in the communication space, which involves inputting model parameters, running the model, and analyzing the results; according to the actual situations of the target sub - function module, the Android POS machine, and the communication space, input corresponding parameters such as data transmission efficiency, reading efficiency, and stability coefficient; start the multiple - interaction model. After inputting the parameters, the model will start running and simulate the interaction process in the communication space; after the model runs to completion, it is necessary to analyze the output results and identify the communication events that occur. These events include data transmission delays, reading errors, communication interruptions, etc.
[0089] After simulating and predicting multiple communication events, the next step is to identify the abnormal events among them, which involves classifying the communication events, evaluating their impact levels, and determining whether measures need to be taken for intervention. Classify the simulated communication events, such as normal events, warning events, and abnormal events, according to the impact level, occurrence frequency, or severity of the events.
[0090] For each abnormal event, it is necessary to evaluate its impact on the stability of the communication space and business continuity, which is achieved by analyzing the specific impact of the event on data transmission efficiency, reading efficiency, and stability coefficient; Based on the impact assessment results, it is necessary to decide whether to take measures for intervention. Optionally, classify the simulated communication events; Evaluate the impact degree of each abnormal event; Develop intervention measures according to the evaluation results, and monitor the implementation effect.
[0091] Specifically, assume there is a payment system where the target sub-function module is responsible for processing payment requests and communicates with an Android POS machine via Bluetooth; To evaluate the communication performance of this system and identify abnormal events, the following operations were carried out.
[0092] Determined data transmission efficiency, reading efficiency, and stability coefficient as key interaction factors, and constructed a multiple interaction model using mathematical formulas; This model simulates the changes in data transmission, reading, and communication stability during the payment request processing; Collected the actual data of the target sub-function module, Android POS machine, and communication space as the input parameters of the model; Then run the model to simulate the communication events during the payment request processing; The results show that in some cases, the data transmission efficiency decreases, the reading error rate increases, and at the same time, the communication space stability coefficient decreases.
[0093] Classified and evaluated the simulated communication events; It was found that when the data transmission efficiency is lower than a certain threshold, it will cause a significant increase in the reading error rate, which in turn affects the stability and business continuity of the payment system; Therefore, this situation was identified as an abnormal event, and it was decided to take measures for intervention, such as optimizing the data transmission algorithm and improving the Bluetooth communication stability.
[0094] In an example of this application, the communication event matching table: Assume the collected data is: the data transmission efficiency is "medium", the reading efficiency is "low", and the stability coefficient is "medium"; According to the communication event matching table, the communication event is determined to be "communication instability" and identified as an abnormal event because communication instability affects the normal operation of the system.
[0095] Reference Figure 7 , In step S16, based on the abnormal events in the communication space, USB composite devices, and Android POS machines, determine the corresponding optimization means, and online optimize the communication space according to this optimization means; In the specific implementation process of the present invention, the specific steps are: S161: Collect the abnormal events in the communication space, and determine multiple sub-optimization means according to the abnormal events in the communication space and the optimization matching table; S162: Determine a first optimization coefficient based on multiple sub-optimization means and a USB composite device, determine a second optimization coefficient based on multiple sub-optimization means and an Android POS machine, and determine corresponding optimization means based on the first optimization coefficient, the second optimization coefficient, and multiple sub-optimization means; S163: Interact the optimization means with the communication space, and trigger the online optimization of the communication space according to the interaction between the optimization means and the communication space, without affecting the interaction between the Android POS machine and the USB composite device.
[0096] In an embodiment of the present application, abnormal events in the communication space are collected, and multiple sub-optimization means are determined according to the abnormal events in the communication space and an optimization matching table, which accommodates the overall consideration of the abnormal events in the communication space and the optimization matching table, and ensures the accuracy of multiple sub-optimization means.
[0097] At this time, various parameters and states during the communication process are monitored in real time, including but not limited to data transmission rate, error rate, delay time, device response time, etc.; clarify which situations or parameter changes are regarded as abnormal events, which are formulated based on historical data, system specifications, or business requirements; for example, the data transmission error rate exceeds a certain threshold, the communication delay exceeds the acceptable range, etc.; the monitoring system collects data during the communication process in real time, and automatically identifies and records abnormal events according to the predefined abnormal event definitions. These records should include specific information about the abnormal events, such as occurrence time, duration, and impact range.
[0098] Furthermore, an optimization matching table is formulated in advance, which lists the corresponding relationships between various abnormal events and sub-optimization means. This table is formulated based on historical experience, expert knowledge, or system specifications; when the monitoring system collects an abnormal event, the sub-optimization means corresponding to the abnormal event is found according to the optimization matching table; there are multiple sub-optimization means associated with the same abnormal event because different optimization means are applicable to different scenarios or conditions.
[0099] Evaluate each found sub-optimization means, considering factors such as feasibility, cost, and potential impact; according to the evaluation results, select the most appropriate sub-optimization means or combination; record the selected sub-optimization means, and formulate an implementation plan, which includes determining the execution time, execution personnel, required resources, etc.
[0100] Specifically, assume that in a payment system, the communication space is responsible for processing payment requests and responses between an Android POS machine and a server; the monitoring system collects the following abnormal events: Abnormal event one: The data transmission error rate suddenly increases and exceeds the preset threshold; Abnormal event two: The communication delay time extends, resulting in a decrease in the payment request processing speed.
[0101] Based on the optimized matching table, the following sub-optimization measures related to these abnormal events were found: For the increase in data transmission error rate: Sub-optimization measure 1: Check and update the driver of the Android POS machine to ensure its compatibility with the communication protocol on the server side; Sub-optimization measure 2: Increase the communication verification code to improve the accuracy of data transmission.
[0102] For the extension of communication delay time: Sub-optimization measure 3: Optimize the processing logic of the server to reduce the time for processing payment requests; Sub-optimization measure 4: Increase the communication bandwidth to support higher data transmission rates.
[0103] After evaluation, the following combination of sub-optimization measures was selected to solve the problem: Update the driver of the Android POS machine (Sub-optimization measure 1) to reduce data transmission errors; Optimize the processing logic of the server (Sub-optimization measure 3) to reduce communication delays; An implementation plan was formulated, and technicians were arranged to execute these optimization measures during the maintenance window; After execution, the monitoring system showed that both the data transmission error rate and the communication delay time had decreased, achieving the expected optimization effect.
[0104] Furthermore, a first optimization coefficient is determined according to multiple sub-optimization measures and the USB composite device, a second optimization coefficient is determined according to multiple sub-optimization measures and the Android POS machine, and the corresponding optimization measure is determined based on the first optimization coefficient, the second optimization coefficient, and multiple sub-optimization measures, taking into account the overall consideration of the first optimization coefficient, the second optimization coefficient, and multiple sub-optimization measures to ensure the accuracy of the corresponding optimization measure.
[0105] At this time, the first optimization coefficient, the second optimization coefficient, and multiple sub-optimization measures are introduced. For each sub-optimization measure, analyze its potential impact on aspects such as the performance, compatibility, and stability of the USB composite device; Consider the characteristics of the USB composite device, such as device type, data transmission rate, power consumption, etc., as well as its role and importance in the system.
[0106] For the first optimization coefficient, a first optimization coefficient is assigned to each sub-optimization measure. This first optimization coefficient is a numerical value or rating indicating the relative importance and effectiveness of the measure in optimizing the USB composite device; The size or rating of the first optimization coefficient is based on the positive impact degree of the sub-optimization measure on the performance of the USB composite device, as well as the cost and risk of implementing the measure.
[0107] For the second optimization coefficient, a second optimization coefficient is assigned to each sub-optimization measure, indicating the relative importance and effectiveness of the measure in optimizing the Android POS machine; The determination of the second optimization coefficient is also based on the positive impact degree of the sub-optimization measure on the performance of the Android POS machine, as well as the implementation cost and risk.
[0108] Furthermore, comprehensively consider the first optimization coefficient and the second optimization coefficient of each sub-optimization measure, and calculate a comprehensive score or rating; according to the level of the comprehensive score or rating, select the sub-optimization measure with the highest score or the best rating as the final optimization measure; when selecting, factors such as the feasibility of implementing this measure, the cost-benefit ratio, and the impact on the overall system performance also need to be considered.
[0109] Specifically, assume that in a payment system, the following two sub-optimization measures are faced: Sub-optimization measure A: Upgrade the operating system version of the Android POS machine to support a more efficient communication protocol; Sub-optimization measure B: Increase the redundancy of the communication network to improve the stability and reliability of data transmission.
[0110] For USB composite devices: Sub-optimization measure A has a certain impact on the compatibility of USB composite devices because the new version of the operating system introduces changes that are incompatible with old devices; therefore, assign a lower first optimization coefficient to it (for example, 0.6); Sub-optimization measure B has a smaller impact on USB composite devices, mainly focusing on the stability of the communication network, so assign a higher first optimization coefficient to it (for example, 0.9).
[0111] For Android POS machines: Sub-optimization measure A directly improves the performance and communication efficiency of the Android POS machine, so assign a higher second optimization coefficient to it (for example, 0.8); Sub-optimization measure B, although it improves communication stability, has limited improvement in the performance of the Android POS machine itself, so assign a lower second optimization coefficient to it (for example, 0.5); After comprehensive evaluation, calculate the comprehensive score of each sub-optimization measure: The comprehensive score of sub-optimization measure A = 0.6 (first optimization coefficient) * 0.8 (second optimization coefficient) = 0.48; The comprehensive score of sub-optimization measure B = 0.9 (first optimization coefficient) * 0.5 (second optimization coefficient) = 0.45.
[0112] According to the comprehensive score, select sub-optimization measure A as the final optimization measure because it has the highest score and more significantly improves the performance of the Android POS machine; formulate an implementation plan, including upgrading the operating system version of the Android POS machine during the next maintenance window, and conduct relevant tests and verifications to ensure that the optimization effect meets expectations.
[0113] Therefore, interact the optimization measure with the communication space, and trigger the online optimization of the communication space according to the interaction between the optimization measure and the communication space, and do not affect the interaction between the Android POS machine and the USB composite device.
[0114] At this time, according to the specific requirements of the optimization measures, necessary configuration changes or software updates are made in the communication space; after implementing the optimization measures, immediately start monitoring the status and performance of the communication space; use specialized monitoring tools or log analysis systems to track key metrics such as data transfer rate, error rate, and latency; verify whether the optimization measures have been correctly implemented and check whether the expected effects have been achieved.
[0115] The communication space should have a mechanism to dynamically adjust its configuration or behavior without interrupting the service to adapt to changing environmental conditions or business requirements; this mechanism includes functions such as automatic load balancing, dynamic routing selection, and adaptive transmission rate adjustment; at the same time, define the conditions for triggering online optimization, which are based on the performance metrics of the communication space, device status, user feedback, or business requirements; for example, when the data transfer error rate continues to rise, trigger online optimization to adjust the error correction algorithm or increase redundant checks.
[0116] When the triggering conditions are met, the communication space automatically executes predefined optimization operations; these operations involve adjusting the network topology, optimizing the data transfer path, increasing resource allocation, etc.; after the online optimization is executed, continue to monitor the status and performance of the communication space and make further adjustments as needed.
[0117] Before implementing the optimization measures, conduct compatibility tests on Android POS machines and USB composite devices; ensure that the optimization measures do not introduce changes incompatible with these devices, thus affecting their normal functions; if so, isolate the optimization operations of the communication space from the operations of Android POS machines and USB composite devices; this is achieved by using virtual networks, dedicated channels, or isolated network segments. Continuously monitor the status and performance of Android POS machines and USB composite devices during the optimization process; if any problems or abnormal behaviors occur, immediately conduct troubleshooting and take corresponding measures to solve the problems.
[0118] Specifically, assume the following optimization measures are selected: upgrade the router firmware of the communication network to support a more efficient routing algorithm; download the latest router firmware update package and apply it to the routers in the communication network; use a network monitoring tool to track changes in metrics such as data transfer rate, latency, and error rate; verify whether the firmware upgrade is successful and check whether the routers are working as expected.
[0119] Define the conditions for triggering online optimization, that is, automatically adjust the routing strategy when the data transfer latency exceeds a certain threshold; when the monitoring tool reports an increase in latency, the communication space automatically executes predefined routing optimization operations, such as selecting a shorter transmission path or adding backup routes; continuously monitor the network status and make fine-tuning as needed to ensure the optimization effect.
[0120] Before the firmware upgrade, compatibility tests were conducted on Android POS machines and USB composite devices to ensure their normal operation with the new version of the router firmware; a virtual network was used to isolate the optimization operations in the communication space from the operations of these devices to reduce potential impacts; during the entire optimization process, the status and performance of Android POS machines and USB composite devices were continuously monitored, and it was ensured that they interacted normally with the communication space.
[0121] Please refer to Figure 8 , Figure 8 which is a schematic structural composition diagram of the interaction system between the Android POS machine and the USB composite device in the embodiment of the present invention; As Figure 8 shown, an interaction system between an Android POS machine and a USB composite device, the interaction system between the Android POS machine and the USB composite device includes: An identification module 21, configured to determine multiple sub-function modules of the USB composite device based on the function identification of the USB composite device by the Android POS machine when the Android POS machine and the USB composite device are in an interaction state; A target module 22, configured to determine a target sub-function module according to the multiple sub-function modules, the application scenario of the Android POS machine, and the corresponding interaction signals; A communication space module 23, configured to determine a corresponding communication space based on the target sub-function module and the Android POS machine; A dynamic interaction system module 24, configured to determine a dynamic interaction system of the communication space based on the communication method of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module; An exception event module 25, configured to determine an exception event in the communication space based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space in this dynamic interaction system; An online optimization module 26, configured to determine corresponding optimization means based on the exception event of the communication space, the USB composite device, and the Android POS machine, and optimize the communication space online according to the optimization means.
[0122] Arbitrary combinations of the technical features of the above embodiments are made. For the sake of brevity of description, not all combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
Claims
1. An interaction method between an Android POS machine and a USB composite device, characterized in that: The interaction methods between Android POS machine and USB composite device include: When the Android POS machine and the USB composite device are in an interactive state, multiple sub-function modules of the USB composite device are determined based on the functional recognition of the USB composite device by the Android POS machine; Determine a target sub-function module according to multiple sub-function modules, application scenarios of the Android POS terminal, and corresponding interaction signals; Determine the corresponding communication space based on the target sub-function module and the Android POS machine; Determine the dynamic interaction system of the communication space based on the communication mode of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module; In this dynamic interaction system, abnormal events in the communication space are determined based on the data transmission efficiency of the target sub-functional module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space; Based on abnormal events in the communication space, USB composite devices and Android POS machines, corresponding optimization measures are determined, and the communication space is optimized online according to the optimization measures.
2. The method for interacting between an Android POS machine and a USB composite device according to claim 1, characterized in that: When the Android POS machine and the USB composite device are in an interactive state, multiple sub-function modules of the USB composite device are determined based on the functional identification of the USB composite device by the Android POS machine, including: Connect the USB composite device to the Android POS machine, and determine that the Android POS machine and the USB composite device are in an interactive state according to a response signal of the Android POS machine; When the Android POS machine and the USB composite device are in an interactive state, determining a corresponding function identification mode based on the response signal, a function matching signal of the Android POS machine to the USB composite device, and the USB composite device; Based on the Android POS machine, the function identification mode and the USB composite device, the Android POS machine is triggered to identify the function of the USB composite device, and multiple sub-function modules of the USB composite device are determined.
3. The method for interacting between an Android POS machine and a USB composite device according to claim 1, characterized in that: The method of determining a target sub-function module according to a plurality of sub-function modules, an application scenario of an Android POS terminal and a corresponding interaction signal includes: Determine the application scenario of the Android POS machine according to multiple working parameters of the Android POS machine, the usage scenario of the Android POS machine and the previous usage information of the Android POS machine; Dynamically collect multiple interaction information based on the interaction between the Android POS machine and the USB composite device, and determine corresponding interaction signals according to the multiple interaction information; The first target coefficient is determined according to multiple sub-function modules and application scenarios of the Android POS machine, the second target coefficient is determined according to multiple sub-function modules and corresponding interaction signals, and the target sub-function module is determined based on the first target coefficient, the second target coefficient and multiple sub-function modules.
4. The method for interacting between an Android POS machine and a USB composite device according to claim 1, characterized in that: The determining of the corresponding communication space based on the target sub-function module and the Android POS machine includes: Determine a first node of a data output of the target sub-functional module based on the traversal of the target sub-functional module; A second node for determining data input of the Android POS machine based on the interaction between the Android POS machine and the USB composite device; The functional matching coefficients of the first node, the second node, the target sub-functional module and the Android POS machine are multiple interacted, and the corresponding communication space is determined according to the multiple interactions of the functional matching coefficients of the first node, the second node, the target sub-functional module and the Android POS machine.
5. The method for interacting between an Android POS machine and a USB composite device according to any one of claims 1 to 4, characterized in that: The dynamic interaction system of the communication space is determined based on the communication mode of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, including: Collect the communication space, and determine the communication method of the communication space based on the communication space and the Android POS machine; Monitor the dynamic interaction between the target sub-function module and the Android POS machine in real time, and collect the dynamic matching rate between the target sub-function module and the Android POS machine; Based on the communication mode of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module, multiple interaction combinations are determined, and the dynamic interaction system of the communication space is determined according to multiple trainings of the multiple interaction combinations.
6. The method for interacting between an Android POS machine and a USB composite device according to claim 1, characterized in that: In the dynamic interaction system, the abnormal events of the communication space are determined based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine and the stability coefficient of the communication space, including: In the dynamic interaction system, the number of abnormalities in the communication space under the dynamic interaction system is collected, and the corresponding abnormal characteristics are determined based on the tracing of the number of abnormalities; The stability coefficient of the communication space is determined based on various abnormal characteristics, the repair time of the communication space, and the repair efficiency of the communication space.
7. The method for interacting between an Android POS machine and a USB composite device according to claim 6, characterized in that: In the dynamic interaction system, the abnormal events of the communication space are determined based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine and the stability coefficient of the communication space, and also include: Collect the data transmission efficiency of the target sub-function module and the reading efficiency of the Android POS machine; Based on the multiple interactions of the data transmission efficiency of the target sub-functional module, the reading efficiency of the Android POS machine and the stability coefficient of the communication space, multiple communication events are determined, and based on the identification of multiple communication events, abnormal events in the communication space are determined.
8. The method for interacting between an Android POS machine and a USB composite device according to claim 1, characterized in that: The method of determining corresponding optimization means based on abnormal events in the communication space, the USB composite device and the Android POS machine, and optimizing the communication space online according to the optimization means, includes: Collect abnormal events in the communication space, and determine multiple sub-optimization means according to the abnormal events in the communication space and the optimization matching table; A first optimization coefficient is determined according to multiple sub-optimization means and a USB composite device, a second optimization coefficient is determined according to multiple sub-optimization means and an Android POS machine, and corresponding optimization means are determined based on the first optimization coefficient, the second optimization coefficient and multiple sub-optimization means.
9. The method for interacting between an Android POS machine and a USB composite device according to claim 8, characterized in that: The method of determining corresponding optimization means based on abnormal events in the communication space, the USB composite device and the Android POS machine, and optimizing the communication space online according to the optimization means, further includes: The optimization means is interacted with the communication space, and the online optimization of the communication space is triggered according to the interaction between the optimization means and the communication space, without affecting the interaction between the Android POS machine and the USB composite device.
10. An interactive system between an Android POS machine and a USB composite device, characterized in that: The interactive system between the Android POS machine and the USB composite device is applied to the interactive method between the Android POS machine and the USB composite device as claimed in any one of claims 1 to 9, and the interactive system between the Android POS machine and the USB composite device includes: An identification module, used for determining a plurality of sub-function modules of the USB composite device based on the functional identification of the USB composite device by the Android POS machine when the Android POS machine and the USB composite device are in an interactive state; A target module, used to determine a target sub-function module according to multiple sub-function modules, application scenarios of the Android POS terminal and corresponding interaction signals; The communication space module is used to determine the corresponding communication space based on the target sub-function module and the Android POS machine; A dynamic interaction system module, used to determine the dynamic interaction system of the communication space based on the communication mode of the communication space, the dynamic matching rate between the target sub-function module and the Android POS machine, and the storage capacity of the target sub-function module; An abnormal event module is used to determine abnormal events in the communication space based on the data transmission efficiency of the target sub-function module, the reading efficiency of the Android POS machine, and the stability coefficient of the communication space in the dynamic interaction system; The online optimization module is used to determine the corresponding optimization means based on abnormal events in the communication space, USB composite devices and Android POS machines, and optimize the communication space online according to the optimization means.