An interactive method between an external device and a service terminal and related equipment

Through the interaction method between the Netty client and the server, the execution data of the external device is parsed and processed, and the system data is managed in a unified manner, which solves the problem of slow and incompatible interaction between the external device and the service terminal, and improves the data transmission efficiency and response speed. Ensure system data is consistent and up-to-date.

CN113691601BActive Publication Date: 2024-10-29SHENZHEN NETLINK OPTICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110938900.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-16
Publication Date
2024-10-29
Estimated Expiration
2041-08-16

AI Technical Summary

Technical Problem

The interactive response speed between existing external devices and service terminals is slow and often incompatible, resulting in low system processing efficiency and poor scalability.

Method used

Use the Netty client to establish communication connections with external devices, obtain system data by parsing and processing execution data, and update data through the Netty server and service terminal to ensure data transmission efficiency and response speed. At the same time, the heartbeat mechanism and reconnection mechanism are used for management. Connect and manage basic data and algorithm data in a unified manner.

Benefits of technology

It improves the data transmission efficiency and response speed between external devices and service terminals, ensures the consistency and latestness of system data, avoids system incompatibility issues, and improves the scalability and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113691601B_ABST
    Figure CN113691601B_ABST
Patent Text Reader

Abstract

The present invention discloses an interaction method between an external device and a service terminal and related equipment, the method comprising obtaining execution data sent by an external device terminal based on a pre-connected Netty client; when the execution data is basic data, parsing the basic data to obtain system data corresponding to the execution data; when the execution data is algorithm data, performing algorithm processing on the algorithm data to obtain system data corresponding to the execution data; verifying preset storage data according to the system data to obtain update data; based on the pre-connected Netty server, sending the update to the pre-connected service terminal. The present invention introduces Netty, improves data transmission efficiency and response efficiency, and updates the original data after obtaining the system data, ensuring that the data obtained by the subsequent service terminal is consistent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an interactive system, and in particular to an interactive method between an external device and a service terminal and related equipment. Background Art

[0002] The interactive system between the external device and the service terminal is currently a widely used interactive system, such as mouse and host, keyboard and host. In addition to relatively simple external devices such as mouse and keyboard, the external device can also be a complex device, such as an outdoor display.

[0003] At present, the interactive system between external devices and service terminals has the following problems:

[0004] 1. With the increase in the number of external devices and the number of operations, the processing efficiency of the service terminal is getting lower and lower, which is manifested in increased delay time and slow response speed.

[0005] 2. Currently, the communication between the service terminal and the external device adopts a single communication protocol. Therefore, when communicating with the external device, there is often system incompatibility, resulting in poor scalability. Summary of the invention

[0006] The technical problem to be solved by the present invention is that the interaction response speed between the existing external device and the service terminal is slow and often incompatible. In view of the shortcomings of the existing technology, an interaction method between an external device and a service terminal is provided.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0008] A method for interaction between an external device and a service terminal, the method comprising:

[0009] Obtain execution data sent by the external device based on the pre-connected Netty client;

[0010] When the execution data is basic data, parsing the basic data to obtain system data corresponding to the execution data;

[0011] When the execution data is algorithm data, performing algorithm processing on the algorithm data to obtain system data corresponding to the execution data;

[0012] According to the system data, the preset storage data is verified to obtain updated data;

[0013] Based on the pre-connected Netty server, the update is sent to the pre-connected service terminal.

[0014] The interaction method between the external device and the service terminal, wherein:

[0015] The step of verifying the preset stored data according to the system data to obtain the updated data specifically includes:

[0016] Comparing the system data with the stored data to determine difference data in the system data corresponding to the stored data;

[0017] The stored data is updated according to the difference data to obtain updated system data.

[0018] The interaction method between the external device and the service terminal, wherein:

[0019] The method further comprises:

[0020] Based on the Netty server, obtain the service command sent by the service terminal;

[0021] Parsing the service command to obtain a control command corresponding to the service command;

[0022] Based on the Netty client, the control command is sent to the external device to control the external device to execute the control command.

[0023] The interaction method between the external device and the service terminal, wherein:

[0024] The sending of the control command to the external device based on the pre-connected Netty client to control the external device to execute the control command includes:

[0025] compressing the control command to obtain a compressed command;

[0026] Based on the Netty client, the compression command is sent to the external device to control the external device to execute the control command.

[0027] The interaction method between the external device and the service terminal, wherein:

[0028] After parsing the service command to obtain a control command corresponding to the service command, the method further includes:

[0029] Determining a system state corresponding to the external device according to the stored data;

[0030] Determining simulation data corresponding to the system state according to the control command;

[0031] Processing the simulation data to obtain test data corresponding to the simulation data;

[0032] Based on the Netty server, the test data is sent to the service terminal.

[0033] The interaction method between the external device and the service terminal, wherein:

[0034] Before obtaining the execution data sent by the external device based on the pre-connected Netty client, the method further includes:

[0035] When a connection request sent by the external device is detected, obtaining device information of the external device;

[0036] Controlling the Netty client to establish a communication connection with the external device, and recording the device information in a preset initial device table to obtain a device information table; and / or,

[0037] When a connection request sent by the service terminal is detected, obtaining the subject information of the service terminal;

[0038] The Netty server is controlled to establish a communication connection with the service terminal, and the subject information is recorded in a preset initial subject table to obtain a subject information table.

[0039] The interaction method between the external device and the service terminal, wherein:

[0040] The method further includes:

[0041] According to the preset heartbeat time and the device information table, based on the Netty client, a heartbeat signal is sent to the external device;

[0042] According to a preset monitoring time, determining whether feedback data sent by the external device according to the heartbeat signal is not detected;

[0043] If so, disconnect the communication connection between the Netty client and the external device.

[0044] An interactive device between an external device and a service terminal, which specifically includes:

[0045] The acquisition module is used to obtain the execution data sent by the external device based on the pre-connected Netty client;

[0046] A first determining module, configured to determine that the basic data is system data when the execution data is basic data;

[0047] A second determination module is used for, when the execution data is algorithm data, performing algorithm processing on the algorithm data to obtain system data corresponding to the execution data;

[0048] An updating module, used for verifying preset storage data according to the system data to obtain updated data;

[0049] The sending module is used to send the update to the pre-connected service terminal based on the pre-connected Netty server.

[0050] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any of the above-mentioned methods for interaction between an external device and a service terminal.

[0051] A terminal device comprises: a processor, a memory and a communication bus; the memory stores a computer-readable program executable by the processor;

[0052] The communication bus realizes the connection and communication between the processor and the memory;

[0053] When the processor executes the computer-readable program, the steps in any of the above-mentioned methods for interaction between an external device and a service terminal are implemented.

[0054] Beneficial effect: Compared with the prior art, the present invention provides an interaction method and related equipment between an external device and a service terminal. In the method, a communication connection between a Netty client and an external device, and a communication connection between a Netty server and a service terminal are pre-created. First, the execution data sent by the external device is obtained based on the pre-connected Netty client, and then the execution data is parsed, processed by an algorithm, and the system data is obtained. The stored data is updated uniformly through the system data. Finally, based on the Netty server, the updated stored data is sent to the service terminal. Since Netty is a non-blocking IO network communication framework, the efficiency and response speed of data transmission are guaranteed. In addition, this scheme adopts the step of processing both basic data and algorithm data into system data, and uniformly manages the system status data to ensure that the system data is the latest data, avoiding the data sources obtained by different service terminals being consistent, and the content of the obtained system data is also consistent. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A schematic diagram of an application scenario of the interaction method between an external device and a service terminal provided by the present invention.

[0056] Figure 2 This is an overall flow chart of the interaction method between the external device and the service terminal provided by the present invention.

[0057] Figure 3Flow chart of establishing a connection between an external device and a Netty client in the interaction method between an external device and a service terminal provided by the present invention

[0058] Figure 4 This is a schematic diagram of the interaction between a service terminal and an external device in the interaction method between the external device and the service terminal provided by the present invention.

[0059] Figure 5 A schematic diagram of interaction based on a data simulation service module in the interaction method between an external device and a service terminal provided by the present invention.

[0060] Figure 6 A schematic diagram of the structure of the interactive device between the external device and the service terminal provided by the present invention.

[0061] Figure 7 This is a structural principle diagram of the terminal device provided by the present invention. DETAILED DESCRIPTION

[0062] The present invention provides an interaction method between an external device and a service terminal and related devices. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0063] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0064] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0065] For example, the embodiments of the present invention can be applied to Figure 1 The external devices may include Figure 1 The laser scanner in the embodiment may also include a printer, a mouse, a keyboard and other external service devices, and the service terminal may include a computer, a tablet and other main bodies.

[0066] It is understandable that in the above application scenarios, the interaction between the service terminal and the external device can be implemented based on wired transmission or in the form of wireless transmission.

[0067] It should be noted that the above application scenarios are only shown to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in this respect. On the contrary, the embodiments of the present invention can be applied to any applicable scenarios.

[0068] The invention is further described below by describing embodiments in conjunction with the accompanying drawings.

[0069] like Figure 2 As shown, this embodiment provides an interaction method between an external device and a service terminal. The method can be installed in the service terminal in the form of a plug-in, a program, etc., or work in the form of an interactive device connected to the service terminal and the external device respectively. This embodiment is described with an independent interactive device as the execution subject. The interaction method between the external device and the service terminal includes the following steps:

[0070] S10. Obtain execution data sent by the external device based on the pre-connected Netty client.

[0071] Specifically, Netty is an asynchronous event-driven network application framework for rapidly developing maintainable high-performance protocol servers and clients. The Netty client uses a module in the Netty network communication framework that communicates with the Web end. In this embodiment, the Web end that is connected to the Netty client communication is an external device.

[0072] The service terminal itself has a communication connection with the Netty client. Therefore, when the external device feeds back execution data to the service terminal, the external device first sends the execution data to the Netty client. The service terminal then obtains the execution data based on the Netty client. In this embodiment, the execution data refers to the execution result fed back to the service terminal by the external device after executing a certain command. For example, the external device is a display screen. When the display screen displays an image, it is necessary to first decode the image or video data before displaying it. Therefore, the decoding result and display result of the image or video can be used as execution data. In addition, the execution data may also include operation data, input data, etc. obtained by active monitoring. For example, the display screen is a touch screen display screen, and the execution data also includes monitoring the screen to obtain operation data such as clicks and slides, or input data such as handwriting. When the external device is working normally, it will continuously feed back the execution data to the Netty client.

[0073] Furthermore, when establishing a connection between a Netty client and an external device, in order to better manage the external device, this embodiment adopts a registration mechanism. Figure 3 As shown, the specific process is:

[0074] A10. When a connection request sent by the external device is detected, device information of the external device is obtained.

[0075] Specifically, before the external device establishes a connection with the Netty client, the external device first sends a connection request to the interactive device.

[0076] The connection request includes device information of the external device, where the device information refers to information for distinguishing the external device from other external devices, such as the device name, device number, device model, etc.

[0077] Through the connection request, the interactive device obtains the device information of the external device.

[0078] A20. Control the Netty client to establish a communication connection with the external device, and record the device information in a preset initial device table to obtain a device information table.

[0079] Specifically, the Netty client is then controlled to establish a communication connection with an external device. While establishing the communication connection, the interactive device also registers and manages the external device connected to the Netty client. A data table for registering device information is pre-set. Since the table is used to register external devices, it is named the initial device table. Then the device information is recorded in the initial device table to obtain a device information table.

[0080] Relatively speaking, for the connection between the service terminal and the Netty server, a similar solution to the above can also be adopted. The specific process is as follows:

[0081] B10. When a connection request sent by the service terminal is detected, the subject information of the service terminal is obtained.

[0082] B20. Control the Netty server to establish a communication connection with the service terminal, and record the subject information in a preset initial subject table to obtain a subject information table.

[0083] Since the specific process is the same as the way the Netty client establishes a connection with an external device, it will not be repeated here.

[0084] Furthermore, based on the above registration mechanism, when managing external devices or service terminals, a heartbeat mechanism can be used for supervision. The specific process is as follows:

[0085] C10. According to the preset heartbeat time and the device information table, based on the Netty client, a heartbeat signal is sent to the external device.

[0086] Specifically, a heartbeat time for periodic access to an external device is pre-set. The start time is recorded from the moment the device information table is generated, and then a heartbeat signal is periodically sent to the external device based on the heartbeat time and the device information table and the Netty client. The heartbeat signal is a very small data packet.

[0087] C20. Determine, according to a preset monitoring time, whether feedback data sent by the external device according to the heartbeat signal is not detected.

[0088] Specifically, a monitoring time is pre-set for judging whether the connection between the external device and the interactive device is normal. The monitoring time can be determined according to the duration of the external device's feedback of the heartbeat signal in the past, the device type of the external device, etc. When sending the heartbeat signal, the sending time is recorded.

[0089] Then, based on the monitoring time, the detection time corresponding to the sending time is calculated, and at the detection time, it is detected whether there is feedback data sent by the external device according to the heartbeat signal. If so, it is determined that the communication between the external device and the interactive device is good; if not, it means that there is a connection barrier between the external device and the interactive device.

[0090] C30. If yes, disconnect the communication connection between the Netty client and the external device.

[0091] Specifically, when there is a connection barrier between the two, the communication connection between the Netty client and the external device is disconnected to reduce the sending of useless commands and information and reduce traffic consumption.

[0092] In contrast, the connection between the service terminal and the Netty server can also use a heartbeat mechanism, namely:

[0093] According to the preset heartbeat time and the subject information table, based on the Netty server, a heartbeat signal is sent to the service terminal;

[0094] Determining, according to a preset monitoring time, whether feedback data sent by the service terminal according to the heartbeat signal is not detected;

[0095] If so, disconnect the communication connection between the Netty server and the service terminal.

[0096] In addition, an automatic reconnection mechanism is introduced in terms of connecting to the service terminal and external devices. When the connection between the Netty server and the service terminal or the connection between Netty and the external device is disconnected, the service terminal or external device will not be directly deleted from the subject information table or the device subject table. A reconnection time is set in advance. For each service terminal or external device, when the service terminal is disconnected from the Netty server and / or the external device is disconnected from the Netty client, the time is recorded to obtain the disconnection time. Then, according to the reconnection time, the Netty server is controlled to actively establish a connection with the service terminal and / or the Netty client is controlled to actively establish a connection with the external device. Through this reconnection mechanism, uninterrupted system operation is guaranteed.

[0097] S20: When the execution data is basic data, determine that the basic data is system data.

[0098] Specifically, in this embodiment, the execution data is divided into two types, one is basic data and the other is algorithm data.

[0099] Basic data refers to data that does not require additional processing regarding the function and status of the external device, such as the temperature of the external device, the operating time of the external device, etc.

[0100] After obtaining the execution data, first determine whether the execution data is basic data or algorithm data. Figure 4 As shown, the Socekt command service module determines the type of execution data, and the Socket command service module is a module that parses data based on the Socket convention. Since Socket can realize communication between different devices, the Socket command service module can parse the data between the service terminal and the external device. Figure 4 The solid arrow in the figure indicates the direction of data transmission from the external device to the service terminal.

[0101] For basic data, the Socket command service module can directly parse, so the data directly parsed for execution data is the basic data in this embodiment. In addition, based on the differences in the types of service terminals and external devices, command service modules based on other methods can be selected. The Socket command service module can realize multiple ways of communication with the hardware end due to its compatibility. Most hardware on the market is suitable for this system, which has good compatibility and scalability.

[0102] If the execution data is basic data, the basic data is directly stored as system data. In this embodiment, the state management service module stores the system data.

[0103] S30: When the execution data is algorithm data, the algorithm data is parsed to obtain system data corresponding to the execution data.

[0104] Specifically, the algorithm data is the execution data that needs to be additionally processed after being parsed. In this embodiment, the work of additionally processing the algorithm data obtained after being parsed is performed by the Socket command service module and the data analysis service module.

[0105] For example, the execution data sent by the external device is the data obtained after executing the laser scan, the laser scan data. The laser scan data cannot be directly displayed by the service terminal, and it needs to be processed by the three-dimensional model first. When the execution data is algorithm data, the Socket command service module first parses the algorithm data through the communication protocol, thereby obtaining the parsed data corresponding to the algorithm data.

[0106] Then the socket command service module transmits the parsed data to the data analysis service module. A variety of model algorithms are set in advance in the data analysis service module. The data analysis service module inputs the parsed data into these model algorithms. The model algorithms analyze and process these parsed data to obtain the system data corresponding to the execution data and transmit it to the state management service module. The state management service module finally stores these system data.

[0107] This solution adopts the step of processing both basic data and algorithm data into system data, and manages the system status data in a unified manner to ensure that the system data is the latest data, avoiding the problem that different service terminals obtain the same data source and the same content of the obtained system data. In addition, through the setting of the data analysis service module, in addition to the hardware data analysis algorithm provided by itself, the device also supports the use of other data analysis algorithms, providing users with a variety of data processing options.

[0108] S40: verifying the preset storage data according to the system data to obtain updated data.

[0109] Specifically, all system data are stored and managed by the state management service module, but the content of the data is different for the same parameter obtained by the state management service module at different times. For example, the usage time of an external device becomes longer and longer with the urgency of use. In order to avoid conflicts between data, in this embodiment, the state management service module verifies the system data to be stored with the previously stored system data to ensure that the system status remains up to date as the user uses the external device. In order to improve the efficiency of the state management service module, the state management service module adopts vertical expansion, horizontal expansion and other framework structures to cope with high concurrency. For the system data before regional storage and the system data after storage, in this embodiment, the system data after storage is named storage data.

[0110] The state management service module has a high concurrency mechanism to ensure the synchronization of system data between the service terminal and the external device. When there are multiple service terminals, the system data obtained by each service terminal is consistent, ensuring that the subsequent commands of each service terminal can be effectively responded to.

[0111] In this embodiment, the first verification method is to directly enter the system data into the storage data, and for the same system data object, regardless of whether the parameter value, that is, the content of the system data is the same, the update process is performed. For example, if the system data object is the temperature of an external device, regardless of the temperature value in the storage data, the storage data is updated according to the latest system data.

[0112] In another verification method, the system data is first compared with the stored data to determine the difference data in the system data corresponding to the stored data. For each system data, determine whether the content of the system data is the same as the stored data corresponding to the same object. If they are the same, the system data is the same data, and if they are different, the system data is the difference data. For example, the object is the temperature of an external device, the system data is 65 degrees Celsius, and the stored data is 55 degrees Celsius. The two are not the same, then the system data is the difference data. Then, according to the difference data, the stored data is updated to obtain the updated system data. In other words, only the system data with differences will be updated, and the system data without differences will not be updated. This verification method can achieve the effect of reducing system resource usage and waiting time.

[0113] S50. Based on the pre-connected Netty server, send the update to the pre-connected service terminal.

[0114] Finally, the state management service module communicates with the Netty server. The Netty server is similar to the Netty client and uses the module in the Netty network communication framework to communicate with the Web client.

[0115] The state management service module sends these system data to the service terminal for subsequent notification to the user. The notification method may include display notification, voice notification, etc. For example, the service terminal includes a display terminal, and the display terminal receives these system data and renders and displays them.

[0116] Since Netty is a non-blocking IO network communication framework, it ensures the efficiency of data transmission and the response speed. In addition, the process of sending data to the service terminal is active, abandoning the traditional polling of the service terminal to obtain system data. As long as there is updated data, it means that the system data has changed, and the updated data will be sent to the service terminal, which reduces the pressure of frequently processing service terminal requests and improves the response speed of the system.

[0117] The way the service terminal issues commands to the external device is similar to the above process, such as Figure 4 As shown, the dotted line is the direction of data transmission when the service terminal issues a command to the external device, and the specific process is as follows:

[0118] After the user issues a command through the service terminal, the service terminal sends a service command to the device based on the Netty server. Relatively speaking, the Netty server device obtains the service command sent by the service terminal. First, the received service command is transmitted to the Socket command service module. The Socket command service module continues to parse the service command to obtain the control command corresponding to the service command. Finally, based on the Netty client, the Socket command service module sends the control command to the external device to control the external device to execute the control command. After the external device performs the operation according to the control command, it feeds back the executed operation data to the Netty client, repeats the above process, and realizes the closed loop of data transmission and command transmission.

[0119] Furthermore, since a wireless connection may be used between the external device and the execution subject, in order to reduce traffic consumption, in this embodiment, the control command to be sent to the external device is compressed to obtain a compressed command. Then, based on the Netty client, the compressed command is sent to the external device. After the external device obtains the compressed command, it decompresses the compressed command to obtain the control command, and then performs the corresponding operation according to the control command.

[0120] In addition, the connection between the external device and the service terminal is not 100% stable and there may be connection failures. In order to determine the connection failure between the external device and the service terminal, the solution often adopted is to connect the external device or the service terminal to a normal device to gradually eliminate the existence of the fault. Therefore, when a connection failure occurs, the user cannot quickly and effectively locate the area where the fault occurs, which increases the debugging cost.

[0121] Therefore, in order to solve this problem, in this implementation, Figure 5 As shown, the device executing the method is also provided with a data simulation service module. The data simulation service module is mainly responsible for simulating the data on the hardware side to facilitate debugging and troubleshooting. Among them, the solid arrow is the direction of data transmission from the service terminal to the data simulation service module, and the dotted arrow is the direction of data transmission from the data simulation service module to the service terminal.

[0122] After receiving the control command generated by the socket command service module, the control command is sent to the data simulation service module. The data simulation service module determines the system status of the external device under normal communication status in advance based on the stored data. After receiving the control command, the execution data obtained after the control command is simulated according to the system status is called simulation data because the execution data is generated by the data simulation service simulation.

[0123] The data simulation service module sends the simulation data to the Socket command service module. The Socket command service module regards the simulation data as execution data, parses the simulation data and performs algorithm processing on the simulation data to obtain test data corresponding to the simulation data. Then the Socket sends the processed test data to the state management service module. The state management service module saves the test data and sends it to the pre-connected service terminal based on the Netty server. The service terminal is provided with a notification module, which includes a voice notification unit and / or an image notification unit. Through the voice notification unit and the image notification unit, the notification module feeds back the test data to the user. The user can thus determine whether there is a fault in the service terminal or the external device.

[0124] For example, the external device is a laser scanner. When the user sends a command to the laser scanner through the service terminal, there is a fault. For example, a certain page switch button on the display page of the service terminal cannot be clicked. The user turns on the data simulation service module. The data simulation service module first determines the system state corresponding to the external device that last fed back the execution data based on the stored data. Then, according to the control command sent by the user, the simulation data after executing the control command in the current system state is determined. Here, the control command is the execution command corresponding to the button. Then the data simulation service module sends the simulation data to the socket command service module. The socket command service module processes the simulation data, obtains the test data and sends it to the state management module. Finally, the state management module sends the test data to the service terminal with the Netty server. If the page switch can be clicked at this time, it can be concluded that the service terminal is normal and the fault occurs in the external device; if the page switch still cannot be clicked at this time, it can be preliminarily judged that the fault occurs in the service terminal, and then the method of controlling variables is used to gradually troubleshoot along the data transmission route, and finally determine the fault point in the service terminal.

[0125] In addition, this embodiment also has a basic information service module, which is mainly responsible for real-time synchronization of basic information data such as system continuous operation time and reference time to ensure the authenticity and effectiveness of data transmission between the external device and the service terminal.

[0126] like Figure 6 As shown, based on the above-mentioned interaction method between an external device and a service terminal, this embodiment provides an interaction device 100 between an external device and a service terminal, wherein the interaction device 100 between an external device and a service terminal includes:

[0127] The acquisition module 110 is used to acquire the execution data sent by the external device based on the pre-connected Netty client;

[0128] A first determining module 120, configured to determine that the basic data is system data when the execution data is basic data;

[0129] A second determination module 130 is used to perform algorithm processing on the algorithm data to obtain system data corresponding to the execution data when the execution data is algorithm data;

[0130] An updating module 140, configured to verify the preset storage data according to the system data to obtain update data;

[0131] The sending module 150 is used to send the update to the pre-connected service terminal based on the pre-connected Netty server.

[0132] The updating module 140 is specifically used for:

[0133] Comparing the system data with the stored data to determine difference data in the system data corresponding to the stored data;

[0134] The stored data is updated according to the difference data to obtain updated system data.

[0135] The interactive device 100 further includes a command module, which is used to:

[0136] Based on the Netty server, obtain the service command sent by the service terminal;

[0137] Parsing the service command to obtain a control command corresponding to the service command;

[0138] Based on the Netty client, the control command is sent to the external device to control the external device to execute the control command.

[0139] The sending module 150 is specifically used for:

[0140] compressing the control command to obtain a compressed command;

[0141] Based on the Netty client, the compression command is sent to the external device to control the external device to execute the control command.

[0142] The interactive device 100 further includes a simulation module, which is specifically used for:

[0143] Determining a system state corresponding to the external device according to the stored data;

[0144] Determining simulation data corresponding to the system state according to the control command;

[0145] Processing the simulation data to obtain test data corresponding to the simulation data;

[0146] Based on the Netty server, the test data is sent to the service terminal.

[0147] The interactive device 100 further includes a registration module, which includes:

[0148] A first registration unit is used to obtain device information of the external device when a connection request sent by the external device is detected; and control the Netty client to establish a communication connection with the external device, and record the device information in a preset initial device table to obtain a device information table;

[0149] The second registration unit is used to obtain the subject information of the service terminal when a connection request sent by the service terminal is detected; and control the Netty server to establish a communication connection with the service terminal, and record the subject information in a preset initial subject table to obtain a subject information table.

[0150] The interactive device 100 further includes a heartbeat module, which is used to:

[0151] According to the preset heartbeat time and the device information table, based on the Netty client, a heartbeat signal is sent to the external device;

[0152] According to a preset monitoring time, determining whether feedback data sent by the external device according to the heartbeat signal is not detected;

[0153] If so, disconnect the communication connection between the Netty client and the external device.

[0154] Based on the above-mentioned interaction method between an external device and a service terminal, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the interaction method between an external device and a service terminal as described in the above-mentioned embodiment.

[0155] Based on the above-mentioned interaction method between the external device and the service terminal, the present invention also provides a terminal device, such as Figure 7 As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communications interface (CommunicationsInterface) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic command in the memory 22 to execute the method in the above embodiment.

[0156] In addition, the logic commands in the memory 22 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0157] The memory 22, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, such as program commands or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, commands or modules stored in the memory 22, that is, implementing the methods in the above embodiments.

[0158] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient computer-readable storage medium.

[0159] In addition, the specific process of loading and executing the above-mentioned computer-readable storage medium and the multiple command processors in the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for interaction between an external device and a service terminal, characterized in that: The method comprises: Obtain execution data sent by the external device based on the pre-connected Netty client; When the execution data is basic data, parsing the basic data to obtain system data corresponding to the execution data; When the execution data is algorithm data, performing algorithm processing on the algorithm data to obtain system data corresponding to the execution data; According to the system data, the preset storage data is verified to obtain updated data; Based on the pre-connected Netty server, sending the update to the pre-connected service terminal; The execution data is divided into two types. The type of the execution data is determined by the Socket command service module. The Socket command service module is a module that performs data parsing based on the Socket convention. For the basic data, the Socket command service module can directly parse; if the execution data is the basic data, the basic data is directly stored as system data; when the execution data is the algorithm data, the Socket command service module first parses the algorithm data through the communication protocol to obtain parsed data corresponding to the algorithm data; then the Socket command service module transmits the parsed data to the data analysis service module; a variety of model algorithms are pre-set in the data analysis service module, and the data analysis service module inputs the parsed data into the model algorithm, and the model algorithm analyzes and processes the parsed data to obtain system data corresponding to the execution data; The method of verifying the preset storage data according to the system data to obtain the updated data specifically includes: comparing the system data with the storage data to determine the difference data in the system data corresponding to the storage data; updating the storage data according to the difference data to obtain the updated system data; all system data are stored and managed by the state management service module, but the data content is different for the same parameter obtained by the state management service module at different times; the state management service module verifies the system data to be stored with the previously stored system data to ensure that the system state remains in the latest state as the user uses the external device; in order to improve the efficiency of the state management service module, the state management service module adopts a vertical expansion and horizontal expansion framework structure to cope with high concurrency; Wherein, the method further comprises: Based on the Netty server, obtain the service command sent by the service terminal; Parsing the service command to obtain a control command corresponding to the service command; Based on the Netty client, the control command is sent to the external device to control the external device to execute the control command; Wherein, based on the pre-connected Netty client, sending the control command to the external device to control the external device to execute the control command includes: compressing the control command to obtain a compressed command; Based on the Netty client, the compression command is sent to the external device to control the external device to execute the control command; Wherein, after parsing the service command to obtain a control command corresponding to the service command, the method further includes: Determining a system state corresponding to the external device according to the stored data; Determining simulation data corresponding to the system state according to the control command; Processing the simulation data to obtain test data corresponding to the simulation data; Based on the Netty server, the test data is sent to the service terminal.

2. The method for interaction between an external device and a service terminal according to claim 1, characterized in that: Before obtaining the execution data sent by the external device based on the pre-connected Netty client, the method further includes: When a connection request sent by the external device is detected, obtaining device information of the external device; Controlling the Netty client to establish a communication connection with the external device, and recording the device information in a preset initial device table to obtain a device information table; and / or, When a connection request sent by the service terminal is detected, obtaining the subject information of the service terminal; The Netty server is controlled to establish a communication connection with the service terminal, and the subject information is recorded in a preset initial subject table to obtain a subject information table.

3. The method for interaction between an external device and a service terminal according to claim 2, characterized in that: The method further comprises: According to the preset heartbeat time and the device information table, based on the Netty client, a heartbeat signal is sent to the external device; According to a preset monitoring time, determining whether feedback data sent by the external device according to the heartbeat signal is not detected; If so, disconnect the communication connection between the Netty client and the external device.

4. An interactive device between an external device and a service terminal, characterized in that: The interaction device specifically includes: The acquisition module is used to obtain the execution data sent by the external device based on the pre-connected Netty client; A first determining module, configured to determine that the basic data is system data when the execution data is basic data; A second determination module is used for, when the execution data is algorithm data, performing algorithm processing on the algorithm data to obtain system data corresponding to the execution data; An updating module, used for verifying preset storage data according to the system data to obtain updated data; A sending module, used for sending the update to a pre-connected service terminal based on a pre-connected Netty server; The execution data is divided into two types. The type of the execution data is determined by the Socket command service module. The Socket command service module is a module that performs data parsing based on the Socket convention. For the basic data, the Socket command service module can directly parse; if the execution data is the basic data, the basic data is directly stored as system data; when the execution data is the algorithm data, the Socket command service module first parses the algorithm data through the communication protocol to obtain parsed data corresponding to the algorithm data; then the Socket command service module transmits the parsed data to the data analysis service module; a variety of model algorithms are pre-set in the data analysis service module, and the data analysis service module inputs the parsed data into the model algorithm, and the model algorithm analyzes and processes the parsed data to obtain system data corresponding to the execution data; The update module is specifically used to: compare the system data with the stored data to determine the difference data in the system data corresponding to the stored data; update the stored data according to the difference data to obtain the updated system data; all system data are stored and managed by the state management service module, but the data content is different for the same parameter obtained by the state management service module at different times; the state management service module verifies the system data to be stored with the previously stored system data to ensure that the system state remains up to date as the user uses the external device; in order to improve the efficiency of the state management service module, the state management service module adopts a framework structure of vertical expansion and horizontal expansion to cope with high concurrency; Wherein, the interaction device further includes a command module, and the command module is further used for: Based on the Netty server, obtain the service command sent by the service terminal; Parsing the service command to obtain a control command corresponding to the service command; Based on the Netty client, the control command is sent to the external device to control the external device to execute the control command; Wherein, the sending module is further specifically used for: compressing the control command to obtain a compressed command; Based on the Netty client, the compression command is sent to the external device to control the external device to execute the control command; The interactive device further comprises a simulation module, and the simulation module is further specifically used for: Determining a system state corresponding to the external device according to the stored data; Determining simulation data corresponding to the system state according to the control command; Processing the simulation data to obtain test data corresponding to the simulation data; Based on the Netty server, the test data is sent to the service terminal.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for interaction between an external device and a service terminal as described in any one of claims 1 to 3.

6. A terminal device, characterized in that: include: A processor, a memory and a communication bus; the memory stores a computer-readable program that can be executed by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps of the method for interaction between an external device and a service terminal as claimed in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Electronic price tag system and data communication method thereof

    CN108924197A

  • Data management method and device and computer readable storage medium

    CN110868336A