Protocol data processing method and device, storage medium and electronic equipment
By acquiring the protocol data of the terminal and determining the processing plan based on the requested content, the disorder problem of the printer interacting with multiple mobile phones is solved, and the synchronization processing of protocol data is realized, ensuring multi-device compatibility and communication stability.
Patent Information
- Application Number
- CN202510079170.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-23
AI Technical Summary
When a printer interacts with multiple phones, it may cause disordered protocol interaction and abnormal functions, especially when the OTA protocol is different from the general protocol.
By acquiring protocol data from the terminal, determining the processing plan based on the content of the protocol data request, separating the protocol data requesting the target protocol upgrade operation and the protocol data not requesting the target protocol upgrade operation for synchronization.
The protocol data processing synchronization is realized in the case of multi-device connection, avoids protocol interaction disorder, ensures multi-device compatibility and communication stability of the receiving terminal, and optimizes the use of communication resources.
Smart Images

Figure CN120034594A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication protocols, and in particular to a protocol data processing method, device, storage medium and electronic device. Background Art
[0002] Since the printer needs to be connected to multiple mobile phones and the printer and multiple mobile phones need to interact with each other at the same time, if the logic of protocol interaction between the printer and multiple mobile phones cannot be properly handled, it may cause protocol interaction disorder and functional abnormality.
[0003] At the same time, because the format of the OTA protocol commonly used by printers is different from the general protocol format, the processing of the OTA protocol is also different from the processing of the general protocol. Therefore, when the printer and a mobile phone are interacting with the OTA protocol, other mobile phones may be interacting with the printer with the general protocol. At this time, the different protocol interactions of the two mobile phones need to be processed separately. The general processing method is to prohibit the general protocol interaction of other mobile phones when the printer and the mobile phone are interacting with the OTA protocol. This method will cause the mobile phone that is performing OTA to interact normally, while the interaction of other mobile phones will be interrupted, and the working status of the printer cannot be obtained during the OTA process of the printer. Summary of the invention
[0004] The embodiments of the present application provide a protocol data processing method, device, storage medium and electronic device, which can solve the above problems. The technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a protocol data processing method, the method comprising:
[0006] Get protocol data from the terminal;
[0007] Determining a processing scheme corresponding to the protocol data according to the content of the protocol data request;
[0008] According to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are synchronously processed.
[0009] In a second aspect, an embodiment of the present application provides a protocol data processing device, the device comprising:
[0010] A data acquisition module, used for acquiring protocol data from a terminal;
[0011] A solution determination module, used to determine a processing solution corresponding to the protocol data according to the content of the protocol data request;
[0012] The protocol processing module is used to synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
[0013] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0014] In a fourth aspect, an embodiment of the present application provides a computer program product, which stores a plurality of instructions suitable for being loaded by a processor and executing the above-mentioned method steps.
[0015] In a fifth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0016] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0017] In the present application, according to the content of the protocol data request from the terminal, the processing scheme corresponding to the protocol data is determined, and further according to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are separated to achieve synchronous processing, that is, the target protocol upgrade operation is performed on the former while the latter is processed based on other protocols. Based on the protocol data processing method provided in the embodiment of the present application, when the protocol data receiving terminal is connected to multiple protocol data sending devices, it is avoided that when the target protocol upgrade operation is performed on the protocol data sent by one of the sending devices, the protocol data sent by other sending devices cannot be processed, resulting in abnormal communication of other sending devices, ensuring the multi-device compatibility of the receiving terminal and the communication stability between the receiving terminal and multiple sending devices, optimizing the use of communication resources, and improving the flexibility of multiple different types of protocol data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 It is a scenario diagram of a protocol data processing method provided in an embodiment of the present application;
[0020] Figure 2 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0021] Figure 3 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0022] Figure 4 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0023] Figure 5 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0024] Figure 6 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0025] Figure 7 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0026] Figure 8 This is a schematic diagram of a scenario of multiple cache spaces provided in an embodiment of the present application;
[0027] Fig. 9 It is a flowchart of a protocol data processing method provided in an embodiment of the present application;
[0028] Fig.10 It is a structural diagram of a protocol data processing device provided in an embodiment of the present application;
[0029] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0032] The present application is described in detail below with reference to specific embodiments.
[0033] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the features, information and data involved in this application are all obtained with full authorization.
[0034] Since the printer needs to be connected to multiple mobile phones and the printer and multiple mobile phones need to interact with each other at the same time, if the logic of protocol interaction between the printer and multiple mobile phones cannot be properly handled, it may cause protocol interaction disorder and functional abnormality.
[0035] At the same time, because the format of the OTA protocol commonly used by printers is different from the general protocol format, the processing of the OTA protocol is also different from the processing of the general protocol. Therefore, when the printer and a mobile phone are interacting with the OTA protocol, other mobile phones may be interacting with the printer with the general protocol. At this time, the different protocol interactions of the two mobile phones need to be processed separately. The general processing method is to prohibit the general protocol interaction of other mobile phones when the printer and the mobile phone are interacting with the OTA protocol. This method will cause the mobile phone that is performing OTA to interact normally, while the interaction of other mobile phones will be interrupted, and the working status of the printer cannot be obtained during the OTA process of the printer.
[0036] Based on the above problems, an embodiment of the present application proposes a protocol data processing method to solve the problem.
[0037] like Figure 1 As shown, Figure 1 It is a schematic diagram of the architecture of a protocol data processing method provided in an embodiment of the present application. Figure 1 The device at least includes a receiving terminal 101 for receiving protocol data, and also includes multiple sending terminals for sending protocol data. The multiple sending terminals for sending protocol data at least include a sending terminal 1021, a sending terminal 1022, and a sending terminal 1023. It can be understood that Figure 1 The number and type of receiving terminals and sending terminals shown in the figure are for illustration only and are not limited in any way in the embodiments of the present application.
[0038] A communication link is established between the receiving terminal 101 and the sending terminals 1021, 1022, 1023, etc. based on the communication protocol. The receiving terminal 101 is used to receive protocol data sent from the sending terminals 1021, 1022, 1023, etc. based on each communication protocol. The content of the protocol data may include instructions for the receiving terminal 101 to provide corresponding services or data.
[0039] The protocol types corresponding to the protocol data sent by different sending terminals to the receiving terminal 101 may be the same or different. For example, the protocol type corresponding to the protocol data sent by the sending terminal 1021 is the same as the protocol type corresponding to the protocol data sent by the sending terminal 1022, and the protocol type corresponding to the protocol data sent by the sending terminal 1021 is different from the protocol type corresponding to the protocol data sent by the sending terminal 1023.
[0040] The above-mentioned receiving terminal 101 includes but is not limited to physical or virtual processors, mobile stations (Mobile Station, MS), mobile terminal equipment (Mobile Terminal), mobile phones (Mobile Telephone), handsets and portable equipment (portable equipment), Bluetooth headsets, smart watches and other types. The electronic device can communicate with one or more core networks via a radio access network (Radio Access Network, RAN).
[0041] For example, the server is a plurality of physical servers, and the plurality of physical servers are independent in hardware. Or, the server is a plurality of virtual servers, and the plurality of virtual servers are deployed in the same hardware resource pool, and the deployment methods of the virtual servers include but are not limited to: VMware, Virtual Box and Virtual PC.
[0042] It is understandable that the receiving terminal 101 also has other service capabilities and functions to complete the tasks in the following embodiments. For example, the server 1011 also provides portal services, resource management services, and CI / CD services.
[0043] In one embodiment, the receiving terminal 101 may also be any printer device such as an inkjet printer, a laser printer, a thermal printer, a dot matrix printer, an LED printer, a 3D printer, etc., for receiving
[0044] In the embodiment of the present application, electronic devices such as the sending terminal 1021, the sending terminal 1022, and the sending terminal 1023 may also be equipped with a display device, and the display device may be any device capable of realizing a display function, for example, the display device may be a cathode ray tube display (Cathode ray tube display, referred to as CR), a light-emitting diode display (Light-emitting diode display, referred to as LED), an electronic ink screen, a liquid crystal display (Liquid crystal display, referred to as LCD), a plasma display panel (Plasma display panel, referred to as PDP), etc. For example, a user may use the display device on the sending device 1021 to send protocol data to the receiving terminal 101, or view the service content provided by the receiving terminal 101 based on the protocol data.
[0045] In one embodiment, Figure 2 As shown, it is a flowchart of a protocol data processing method provided by an embodiment of the present application, which can be implemented by a computer program and can be run on a protocol data processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0046] Specifically, the protocol data processing method includes:
[0047] S101. Acquire protocol data from a terminal.
[0048] Taking a printer as an example of a receiving terminal that executes the protocol data processing method, the printer as a receiving terminal establishes a communication link with at least one terminal based on a certain protocol to receive protocol data sent by different terminals, thereby executing a printing task according to the content of the protocol data.
[0049] The protocol type corresponding to the protocol data sent by the terminal can be the following types: USB protocol, WiFi protocol, Bluetooth protocol, PCL (Printer Control Language) protocol (PCL is a printer control language developed by HP, used to define the printer's page layout, text and graphics drawing instructions), PostScript protocol, IPP (Internet Printing Protocol) protocol (a protocol for printing over the network), ESC / POS (Escape Sequence for Point of Sale) protocol (mainly used to communicate with receiving terminals such as thermal printers and ticket printers), SNMP (Simple Network Management Protocol) protocol, etc.
[0050] The protocol type corresponding to the protocol data sent by the terminal may also be an OTA (Over-the-Air) protocol. The OTA protocol is a wireless data transmission technology that is typically used to remotely upgrade, configure, and manage the software or firmware of a device. The OTA protocol enables terminals (such as mobile phones, smart hardware, cars, IoT devices, etc.) to update the firmware or software of a printer via a wireless network (such as Wi-Fi, Bluetooth, mobile data, etc.) to improve performance, fix vulnerabilities, or add new features without the need for a physical connection.
[0051] S102: Determine a processing solution corresponding to the protocol data according to the content of the protocol data request.
[0052] The content of the protocol data request includes the protocol type and the task to be performed by the receiving terminal. For example, the protocol data is a registration request sent based on the Bluetooth protocol, the protocol data is a query request sent based on the WiFi protocol, and the protocol data can also be an upgrade request based on the OTA protocol.
[0053] A processing plan refers to the specific processing measures, decisions or operating steps taken based on the received protocol data and in response to different requests or conditions carried in the protocol data.
[0054] In the preset multiple processing schemes, the processing scheme corresponding to the protocol data is matched according to the content of the protocol data request. For example, if the protocol data is a registration request sent based on the Bluetooth protocol, the processing scheme corresponding to the Bluetooth protocol is determined in the preset multiple processing schemes, and if the protocol type of the protocol data is the OTA protocol, the processing scheme corresponding to the OTA protocol is determined in the preset multiple processing schemes.
[0055] S103: Synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
[0056] The protocol data is divided into protocol data for requesting a target protocol upgrade operation and protocol data for not requesting a target protocol upgrade operation, and the two correspond to different processing schemes. For example, the protocol data for requesting a target protocol upgrade operation is OTA protocol upgrade data, which is used to instruct the receiving terminal to start an upgrade operation on the receiving terminal based on the OTA protocol upgrade data.
[0057] According to the processing scheme corresponding to the protocol data of the requested target protocol upgrade operation and the processing scheme corresponding to the protocol data of the unrequested target protocol upgrade operation, multiple protocol data are processed synchronously at the same time. Specifically, the protocol data of the requested target protocol upgrade operation and the protocol data of the unrequested target protocol upgrade operation can be placed in the execution queue, and the protocol data of the requested target protocol upgrade operation can be executed in a synchronous manner according to the priority, and the protocol data of the unrequested target protocol upgrade operation can be executed asynchronously in the background, and the consistency of processing and prevention of concurrent conflicts can be further ensured through a lock mechanism and state management.
[0058] In one embodiment, according to the processing scheme corresponding to the protocol data, after synchronously processing the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation, it also includes: sending the processing result to the terminal based on the protocol type to which the protocol data belongs.
[0059] The receiving terminal sends a processing result to the terminal based on the protocol type to which the protocol data belongs, and the processing result is the execution result of executing the protocol data. For example, the terminal sends protocol data for a request target protocol upgrade operation to the receiving terminal, and the receiving terminal executes the protocol data to perform an OTA upgrade operation, and sends the processing result to the terminal based on the OTA protocol. For another example, the terminal sends protocol data for a non-request target protocol upgrade operation to the receiving terminal, and the protocol data is data based on the Bluetooth protocol. The receiving terminal completes a printing task based on the protocol data as a processing result, and sends the processing result to the terminal based on the Bluetooth protocol.
[0060] In the present application, according to the content of the protocol data request from the terminal, the processing scheme corresponding to the protocol data is determined, and further according to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are separated to achieve synchronous processing, that is, the target protocol upgrade operation is performed on the former while the latter is processed based on other protocols. Based on the protocol data processing method provided in the embodiment of the present application, when the protocol data receiving terminal is connected to multiple protocol data sending devices, it is avoided that when the target protocol upgrade operation is performed on the protocol data sent by one of the sending devices, the protocol data sent by other sending devices cannot be processed, resulting in abnormal communication of other sending devices, ensuring the multi-device compatibility of the receiving terminal and the communication stability between the receiving terminal and multiple sending devices, optimizing the use of communication resources, and improving the flexibility of multiple different types of protocol data processing.
[0061] In one embodiment, Figure 3 As shown, it is a flowchart of a protocol data processing method provided by an embodiment of the present application, which can be implemented by a computer program and can be run on a protocol data processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0062] Specifically, the protocol data processing method includes:
[0063] S201. Acquire protocol data from a terminal.
[0064] Refer to the above S101, which will not be repeated here.
[0065] S202: Determine, according to the content of the first protocol data request, whether the first protocol data is target protocol upgrade start data.
[0066] In this embodiment, the protocol data includes the first protocol data. The target protocol upgrade start data can be understood as data for instructing the receiving terminal to start the upgrade operation based on the protocol data. In other words, the receiving terminal starts to perform the upgrade operation task based on the target protocol upgrade start data.
[0067] In one embodiment, according to the content of the first protocol data request, whether it is the target protocol upgrade start data can be determined in the following ways: identifier judgment, checking whether there is an identifier that clearly indicates that the request type is "upgrade" or "start upgrade" (such as action, upgrade_flag, request_type, etc.); protocol version judgment, checking whether the first protocol data carries the target protocol version information, and the version identifies the target protocol upgrade start version; upgrade start related data, checking whether the first protocol data contains the current version, device information, upgrade compatibility and other data closely related to the upgrade start task; structure analysis of the first protocol data, by parsing specific fields and metadata in the structure of the first protocol data, identifying whether the first protocol data is used to indicate the start of the upgrade.
[0068] S203: When it is determined that the first protocol data is the target protocol upgrade start data, the identity information of the terminal sending the first protocol data is obtained, and the terminal sending the first protocol data is determined to be the first terminal.
[0069] The identity information of the first terminal is used to distinguish the terminal sending the first protocol data from other terminals.
[0070] The identity information of the first terminal may be any one or more of a device identifier (such as a device ID, IMEI, etc.), a user identifier (such as a user ID, account information, etc.), a device type and model, an operating system and version information, hardware information (such as CPU, RAM, storage, etc.), a device authentication information (such as an authentication token, a certificate, etc.), a network information (such as an IP address, a MAC address, etc.), a device credential, a service provider information, a device registration information, and the like.
[0071] S204: Determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
[0072] Determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and start the upgrade operation based on the target protocol based on the processing scheme. For example, the target protocol is an OTA protocol, and the receiving terminal starts the upgrade operation based on the OTA protocol to start upgrading the software or system of the receiving terminal.
[0073] Further, protocol data sent from the first terminal and protocol data sent from other terminals are received, and a processing scheme for the protocol data sent from the first terminal is determined to be based on the target protocol. For example, the target protocol is the OTA protocol, and the processing scheme for the protocol data sent from the first terminal is determined to be based on the OTA protocol.
[0074] A processing scheme corresponding to the first terminal is determined, the protocol data sent by the first terminal is processed according to the processing scheme, and while processing the protocol data sent by the first terminal, the protocol data sent by other terminals are synchronously processed.
[0075] S205 . Synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
[0076] Refer to the above S103, which will not be repeated here.
[0077] In one embodiment, according to the processing scheme corresponding to the protocol data, when the target protocol upgrade operation is performed on the first protocol data and the protocol data from the first terminal is processed based on the target protocol, the protocol data of the non-requested target protocol upgrade operation is processed synchronously.
[0078] In this embodiment, the first terminal that sends the protocol data of the target protocol type is distinguished from other terminals, and the other terminals send the protocol data of the non-request target protocol upgrade operation. Therefore, the upgrade start task is executed based on the target protocol upgrade start data sent by the first terminal, and while further receiving the protocol data sent by the first terminal to execute the upgrade task, the protocol data sent by other devices are synchronously processed based on other processing schemes.
[0079] In other words, the receiving terminal can process the protocol data sent by other terminals while executing the target upgrade start operation and further executing the target upgrade operation, thereby completing the upgrade task and the task corresponding to the protocol data sent by other terminals at the same time.
[0080] Please base on Figure 3 See also Figure 4 , Figure 4 A flowchart of a protocol data processing method is provided for an embodiment of the present application. Before step S204, the following steps may be included:
[0081] S301, judging whether the second protocol data is target protocol upgrade start data according to the content of the second protocol data request;
[0082] In this embodiment, the protocol data also includes second protocol data. To determine whether the second protocol data is the target protocol upgrade start data, refer to the determination method of determining whether the first protocol data is the target protocol upgrade start data in S202, which will not be repeated here.
[0083] S302: when it is determined that the second protocol data is the target protocol upgrade start data, the identity information of the terminal sending the second protocol data is obtained, and the terminal sending the second protocol data is determined to be the second terminal;
[0084] Obtain the identity information of the terminal sending the second protocol data and determine that the terminal sending the second protocol data is the second terminal. Refer to the method of obtaining the identity information of the terminal sending the first protocol data and determining that the terminal sending the first protocol data is the first terminal in S203, which will not be repeated here.
[0085] S303: Determine that the time of receiving the second protocol data is later than the time of receiving the first protocol data, and send a prompt message for rejecting the target protocol upgrade operation to the second terminal.
[0086] The time of receiving the first protocol data and the time of receiving the second protocol data are determined, and when the time of receiving the first protocol data is earlier than the time of receiving the second protocol data, a target protocol upgrade start task is determined to be started based on the first protocol data sent by the first terminal.
[0087] In other words, the first protocol data sent by the first terminal and the second protocol data sent by the second terminal are received, and both the first protocol data and the second protocol data are target protocol upgrade start data, which are used to instruct the receiving terminal to execute the target protocol upgrade start task. According to the order of the time of receiving the first protocol data and the time of receiving the second protocol data, it is determined to execute the target protocol upgrade start task based on the protocol data received first.
[0088] It is understandable that the specific contents of the first protocol data and the second protocol data requests may be the same or different. For example, the first protocol data starts upgrading software a based on the target protocol request, and the second protocol data starts upgrading software b based on the target protocol request.
[0089] Determine that the time of receiving the second protocol data is later than the time of receiving the first protocol data, and send prompt information for rejecting the target protocol upgrade operation to the second terminal. The prompt information is used to notify the second terminal to reject the target protocol upgrade operation based on the second protocol data.
[0090] Based on the embodiments of the present application, when multiple protocol data containing target protocol upgrade start data are received, the protocol data required to execute the target protocol upgrade operation is determined according to the receiving time, the upgrade process is optimized, repeated upgrades of the receiving terminal are prevented, and the flexibility and stability of the receiving terminal in processing protocol data are improved to adapt to complex scenarios.
[0091] Please base on Figure 3 See also Figure 5 , Figure 5 A flowchart of a protocol data processing method is provided for an embodiment of the present application. Before step S204, the following steps may be included:
[0092] S401, judging whether the third protocol data is target protocol upgrade start data according to the content of the third protocol data request;
[0093] In this embodiment, the protocol data also includes third protocol data. To determine whether the third protocol data is the target protocol upgrade start data, refer to the determination method of determining whether the first protocol data is the target protocol upgrade start data in S201, which will not be repeated here.
[0094] S402: when it is determined that the third protocol data is the target protocol upgrade start data, the identity information of the terminal sending the third protocol data is obtained, and the terminal sending the third protocol data is determined to be a third terminal;
[0095] Obtain the identity information of the terminal sending the third protocol data and determine that the terminal sending the third protocol data is the third terminal. Refer to the method of obtaining the identity information of the terminal sending the first protocol data and determining that the terminal sending the first protocol data is the second terminal in S203, which will not be repeated here.
[0096] S403: Determine that the time of receiving the third protocol data is earlier than the time of receiving the first protocol data, and that the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data, and send a prompt message for rejecting the target protocol upgrade operation to the third terminal.
[0097] An upgraded version refers to a version that is higher than the firmware or software version of the current receiving terminal. The upgraded version can be digitally identified (for example: 1.0, 1.1, 2.0, etc.) to indicate the degree of change in the version. For example, taking the target protocol as OTA, the firmware or software package included in the protocol data to indicate that the receiving terminal receives and installs it will usually include a "version number" to identify the upgrade level of the upgrade package relative to the current version of the receiving terminal.
[0098] In this embodiment, there are multiple firmware versions for the receiving terminal to select for upgrading. The management of these firmware versions depends on the version number, for example: the first protocol data carries data with a version number of 2.0, and the third protocol data carries data with a version number of 1.5. In this case, the first protocol data represents a higher version of firmware or software, with a version number of 2.0. The third protocol data represents a lower version of firmware or software, with a version number of 1.5, and the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data.
[0099] When it is determined that the time of receiving the third protocol data is earlier than the time of receiving the first protocol data, but the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data, the target protocol upgrade start operation is still performed based on the first protocol data sent by the first terminal.
[0100] The prompt information is used to notify the third terminal to refuse to perform a target protocol upgrade operation based on the third protocol data.
[0101] Based on the embodiments of the present application, when multiple protocol data containing the target protocol upgrade start data are received, the protocol data required to perform the target protocol upgrade operation is determined according to the receiving time and the upgrade version, the upgrade process is optimized, repeated upgrades of the receiving terminal are prevented, and the flexibility and stability of the receiving terminal in processing protocol data are improved to adapt to complex scenarios.
[0102] Please base on Figure 3 See also Figure 6 , Figure 6 A flowchart of a protocol data processing method is provided for an embodiment of the present application. Before step S205, the following steps may be included:
[0103] S501, judging whether the fourth protocol data is target protocol upgrade start data according to the content of the fourth protocol data request;
[0104] In this embodiment, the protocol data also includes fourth protocol data. To determine whether the fourth protocol data is the target protocol upgrade start data, refer to the determination method of determining whether the first protocol data is the target protocol upgrade start data in S201, which will not be repeated here.
[0105] S502: when it is determined that the fourth protocol data is the target protocol upgrade start data, the identity information of the terminal sending the fourth protocol data is obtained, and the terminal sending the fourth protocol data is determined to be a fourth terminal;
[0106] Obtain the identity information of the terminal sending the fourth protocol data and determine that the terminal sending the fourth protocol data is the fourth terminal. Refer to the method of obtaining the identity information of the terminal sending the first protocol data and determining that the terminal sending the first protocol data is the second terminal in S203, which will not be repeated here.
[0107] S503, determining that the time of receiving the fourth protocol data is earlier than the time of receiving the first protocol data, and the upgrade version corresponding to the fourth protocol data is lower than the upgrade version corresponding to the fourth protocol data, and sending inquiry information to the first terminal and the fourth terminal respectively;
[0108] When the time of receiving the fourth protocol data is earlier than the time of receiving the first protocol data, but the upgrade version corresponding to the fourth protocol data is lower than the upgrade version corresponding to the fourth protocol data, inquiry information is sent to the first terminal and the fourth terminal respectively. The inquiry information is used to instruct the first terminal and the fourth terminal to confirm the protocol data required by the receiving terminal to perform the target protocol upgrade operation.
[0109] S504, receiving a selection instruction from the first terminal and a selection instruction from the fourth terminal respectively;
[0110] The selection instruction indicates that the protocol data required by the receiving device to perform a target protocol upgrade operation is the first protocol data or the second protocol data.
[0111] S505, parsing the selection instruction of the first terminal and the selection instruction of the fourth terminal, obtaining that both designated results are the first terminal, or the two designated results are inconsistent, determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
[0112] When the contents of the selection instructions of the first terminal and the selection instructions of the second terminal are both to select the first protocol data, the receiving terminal determines to start the target protocol upgrade operation based on the first protocol data, and determines that the processing scheme corresponding to the protocol data sent by the first terminal is to process based on the target protocol.
[0113] When the selection instruction of the first terminal and the selection instruction of the second terminal are inconsistent, the receiving terminal determines to start the target protocol upgrade operation based on the first protocol data, and determines that the processing scheme corresponding to the protocol data sent by the first terminal is to process based on the target protocol.
[0114] When the contents of the selection instructions of the first terminal and the second terminal are both to select the fourth protocol data, the receiving terminal determines to start the target protocol upgrade operation based on the fourth protocol data, and determines that the processing scheme corresponding to the protocol data sent by the fourth terminal is to process based on the target protocol.
[0115] Based on the embodiments of the present application, when multiple protocol data containing target protocol upgrade start data are received, inquiry information is sent to different terminals according to the reception time and the upgrade version, so as to further determine the protocol data required to execute the target protocol upgrade operation according to the instructions issued by the terminal in response to the inquiry information, optimize the upgrade process, prevent the receiving terminal from repeated upgrades, and improve the flexibility and stability of the receiving terminal in processing protocol data to adapt to complex scenarios.
[0116] In one embodiment, Figure 7 As shown, it is a flowchart of a protocol data processing method provided by an embodiment of the present application, which can be implemented by a computer program and can be run on a protocol data processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0117] Specifically, the protocol data processing method includes:
[0118] S601. Traverse multiple cache spaces; wherein the multiple cache spaces correspond to multiple terminals respectively.
[0119] Traversing multiple cache spaces can be understood as searching, reading or operating data in multiple cache spaces (which may be memory cache, disk cache, distributed cache, etc.) allocated by multiple terminals.
[0120] In one embodiment, connection requests from multiple terminals are received; in response to the connection requests from the multiple terminals, a cache space corresponding to the terminal is constructed according to identity information of each terminal.
[0121] The receiving terminal establishes a communication connection with the terminal, and records the identity information of multiple terminals that have established communication connections with the receiving terminal. A cache space is allocated according to the identity information of each terminal, and the identity information of the terminal is associated with the allocated cache space.
[0122] When the terminal device receives the protocol data, it analyzes the identity information of the terminal indicated in the protocol data, and further stores the protocol data in a cache space associated with the terminal.
[0123] like Figure 8 As shown, Figure 8 1 is a schematic diagram of a scenario of multiple cache spaces provided in an embodiment of the present application. The receiving terminal receives protocol data sent from terminal 201, terminal 202, and terminal 203, and constructs cache space 2011 associated with terminal 201, cache space 2021 associated with terminal 202, and cache space 2031 associated with terminal 203 according to the identity information corresponding to terminal 201, terminal 202, and terminal 203, respectively. Each cache space stores one or more protocol data sent by each terminal.
[0124] S602: Acquire, from each cache space, protocol data sent by a terminal corresponding to the cache space.
[0125] The cache space stores the protocol data sent by the terminal associated with the cache space, and the receiving terminal obtains the protocol data sent by the terminal corresponding to the cache space from each cache space.
[0126] S603: Determine a processing solution corresponding to the protocol data according to the content of the protocol data request.
[0127] Refer to the above S102, which will not be repeated here.
[0128] S604: Synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
[0129] Refer to the above S103, which will not be repeated here.
[0130] Based on the embodiments of the present application, cache space associated with different terminals is allocated to separately store protocol data sent by different terminals, and protocol data is obtained by traversing the cache space, so as to better synchronize and process the protocol data sent by different terminals and improve the stability of the receiving terminal in synchronously processing the protocol data.
[0131] Please base on Figure 7 See also Fig. 9 , Fig. 9 A flowchart of a protocol data processing method is provided for an embodiment of the present application. Step S604 may further include the following steps:
[0132] S701. According to a processing scheme corresponding to the protocol data, determine a cache space corresponding to the protocol data for requesting a target protocol upgrade operation as a target protocol cache space.
[0133] According to the identity information of the terminal that sends the protocol data requesting the target protocol upgrade operation, the cache space associated with the terminal is determined, and the cache space is marked as the target protocol cache space. Figure 8 As shown, the terminal that sends the protocol data requesting the target protocol upgrade operation is determined to be the terminal 203, and the cache space 2031 associated with the terminal 203 is determined to be the target cache space.
[0134] S702: Process the protocol data in the target protocol cache space based on the target protocol, and simultaneously process the protocol data in at least one cache space other than the target protocol cache space.
[0135] like Figure 8 As shown, in the process of traversing multiple cache spaces, the protocol data stored in each cache space is continuously taken out, the protocol data obtained from the cache space 2031 which is the target protocol cache space is processed based on the target protocol, and the protocol data obtained from the cache space 2021 and the cache space 2031 are processed synchronously.
[0136] In one embodiment, after processing the protocol data in the target protocol cache space based on the target protocol and synchronously processing the protocol data in at least one cache space other than the target protocol cache space, the method further includes:
[0137] Receive protocol data from the terminal to be determined; determine whether the terminal to be determined corresponds to the target protocol cache space based on the identity information of the terminal to be determined; when it is determined that the terminal to be determined corresponds to the target protocol cache space, store the protocol data of the terminal to be determined in the target protocol cache space for processing.
[0138] While traversing the cache space to obtain the protocol data stored in the cache space, protocol data of a terminal whose identity is not determined is received. Based on the protocol data, the identity information of the terminal is determined, and if the identity information of the terminal matches the identity information associated with the target protocol cache space, the terminal is characterized as a terminal that sends protocol data requesting a target protocol upgrade operation, and the protocol data of the terminal is stored in the target protocol cache space for subsequent processing based on the target protocol.
[0139] In the present application, according to the content of the protocol data request from the terminal, the processing scheme corresponding to the protocol data is determined, and further according to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are separated to achieve synchronous processing, that is, the target protocol upgrade operation is performed on the former while the latter is processed based on other protocols. Based on the protocol data processing method provided in the embodiment of the present application, when the protocol data receiving terminal is connected to multiple protocol data sending devices, it is avoided that when the target protocol upgrade operation is performed on the protocol data sent by one of the sending devices, the protocol data sent by other sending devices cannot be processed, resulting in abnormal communication of other sending devices, ensuring the multi-device compatibility of the receiving terminal and the communication stability between the receiving terminal and multiple sending devices, optimizing the use of communication resources, and improving the flexibility of multiple different types of protocol data processing.
[0140] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0141] See also Fig.10 , which shows a schematic diagram of the structure of a protocol data processing device provided by an exemplary embodiment of the present application. The protocol data processing device can be implemented as all or part of the device through software, hardware or a combination of both. The device includes a data acquisition module 801, a solution determination module 802, and a protocol processing module 803.
[0142] The data acquisition module 801 is used to acquire the protocol data from the terminal;
[0143] A solution determination module 802, configured to determine a processing solution corresponding to the protocol data according to the content of the protocol data request;
[0144] The protocol processing module 803 is used to synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
[0145] In one embodiment, the acquisition module 801 includes:
[0146] A first data acquisition unit, configured to traverse a plurality of cache spaces; wherein the plurality of cache spaces correspond to a plurality of terminals respectively;
[0147] The second data acquisition unit is used to acquire, from each of the cache spaces, the protocol data sent by the terminal corresponding to the cache space.
[0148] In one embodiment, the protocol data includes first protocol data;
[0149] The solution determination module 802 includes:
[0150] A first judging unit, configured to judge whether the first protocol data is target protocol upgrade start data according to the content of the first protocol data request;
[0151] A first determining unit is configured to, when determining that the first protocol data is the target protocol upgrade start data, obtain identity information of a terminal sending the first protocol data, and determine that the terminal sending the first protocol data is a first terminal;
[0152] The first processing unit is used to determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
[0153] In one embodiment, the protocol data further includes second protocol data;
[0154] The solution determination module 802 includes:
[0155] A second judging unit, configured to judge whether the second protocol data is target protocol upgrade start data according to the content of the second protocol data request;
[0156] A second determining unit is configured to, when determining that the second protocol data is the target protocol upgrade start data, obtain identity information of a terminal sending the second protocol data, and determine that the terminal sending the second protocol data is a second terminal;
[0157] The first rejecting unit is used to determine that the time of receiving the second protocol data is later than the time of receiving the first protocol data, and send prompt information of rejecting the target protocol upgrade operation to the second terminal.
[0158] In one embodiment, the protocol data further includes third protocol data;
[0159] The solution determination module 802 includes:
[0160] A third judgment unit, configured to determine whether the third protocol data is target protocol upgrade start data according to the content of the third protocol data request;
[0161] A third determination unit, configured to obtain the identity information of the terminal that sends the third protocol data and determine that the terminal that sends the third protocol data is a third terminal when it is determined that the third protocol data is the target protocol upgrade start data;
[0162] A second rejection unit, configured to determine that the time of receiving the third protocol data is earlier than the time of receiving the first protocol data, and the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data, and send a prompt message for rejecting the target protocol upgrade operation to the third terminal.
[0163] In one embodiment, the protocol data further includes fourth protocol data;
[0164] A solution determination module 802 includes:
[0165] A fourth judgment unit, configured to determine whether the fourth protocol data is target protocol upgrade start data according to the content of the fourth protocol data request;
[0166] A fourth determination unit, configured to obtain the identity information of the terminal that sends the fourth protocol data and determine that the terminal that sends the fourth protocol data is a fourth terminal when it is determined that the fourth protocol data is the target protocol upgrade start data;
[0167] An inquiry unit, configured to determine that the time of receiving the fourth protocol data is earlier than the time of receiving the first protocol data, and the upgrade version corresponding to the fourth protocol data is lower than the upgrade version corresponding to the first protocol data, and send inquiry messages to the first terminal and the fourth terminal respectively;
[0168] A receiving unit, configured to receive a selection instruction from the first terminal and a selection instruction from the fourth terminal respectively;
[0169] A first processing unit includes:
[0170] A second processing unit, configured to analyze the selection instruction of the first terminal and the selection instruction of the fourth terminal, and when it is obtained that both specified results are the first terminal or the two specified results are inconsistent, determine that the processing solution corresponding to the first protocol data is the target protocol upgrade operation, and determine that the processing solution of the protocol data from the first terminal is to be processed based on the target protocol.
[0171] In one embodiment, a protocol processing module 803 includes:
[0172] The first protocol processing unit is used to perform a target protocol upgrade operation on the first protocol data according to a processing scheme corresponding to the protocol data and to process the protocol data from the first terminal based on the target protocol, and to synchronously process the protocol data of the non-requested target protocol upgrade operation.
[0173] In one embodiment, the protocol processing module 803 includes:
[0174] A second protocol processing unit, configured to determine, according to a processing scheme corresponding to the protocol data, a cache space corresponding to the protocol data for requesting a target protocol upgrade operation as a target protocol cache space;
[0175] The third protocol processing unit processes the protocol data in the target protocol cache space based on the target protocol, and simultaneously processes the protocol data in at least one cache space other than the target protocol cache space.
[0176] In one embodiment, the protocol data processing device further includes:
[0177] A protocol receiving unit, used for receiving protocol data from a terminal to be determined;
[0178] An identity determination module, used to determine whether the terminal to be determined corresponds to the target protocol cache space according to the identity information of the terminal to be determined;
[0179] The data cache module is used to store the protocol data of the terminal to be determined in the target protocol cache space for processing when it is determined that the terminal to be determined corresponds to the target protocol cache space.
[0180] In one embodiment, the protocol data processing device further includes:
[0181] A connection module, configured to receive connection requests from the plurality of terminals;
[0182] The establishing module is used to respond to the connection requests of the multiple terminals and to establish a cache space corresponding to the terminal according to the identity information of each terminal.
[0183] In one embodiment, the protocol data processing device further includes:
[0184] The result sending module is used to send the processing result to the terminal based on the protocol type to which the protocol data belongs.
[0185] In the present application, according to the content of the protocol data request from the terminal, the processing scheme corresponding to the protocol data is determined, and further according to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are separated to achieve synchronous processing, that is, the target protocol upgrade operation is performed on the former while the latter is processed based on other protocols. Based on the protocol data processing method provided in the embodiment of the present application, when the protocol data receiving terminal is connected to multiple protocol data sending devices, it is avoided that when the target protocol upgrade operation is performed on the protocol data sent by one of the sending devices, the protocol data sent by other sending devices cannot be processed, resulting in abnormal communication of other sending devices, ensuring the multi-device compatibility of the receiving terminal and the communication stability between the receiving terminal and multiple sending devices, optimizing the use of communication resources, and improving the flexibility of multiple different types of protocol data processing.
[0186] It should be noted that the protocol data processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the protocol data processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the protocol data processing device provided in the above embodiment and the protocol data processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0187] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0188] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 - Fig. 9 The protocol data processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 - Fig. 9 The specific description of the illustrated embodiment will not be repeated here.
[0189] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 - Fig. 9 The protocol data processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 - Fig. 9 The specific description of the illustrated embodiment will not be repeated here.
[0190] See also Fig.11, is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device 900 may include: at least one processor 901 , at least one network interface 904 , a user interface 903 , a memory 905 , and at least one communication bus 902 .
[0191] The communication bus 902 is used to realize the connection and communication between these components.
[0192] The user interface 903 may include a display screen (Display) and a camera (Camera), and the optional user interface 903 may also include a standard wired interface and a wireless interface.
[0193] The network interface 904 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0194] Among them, the processor 901 may include one or more processing cores. The processor 901 uses various interfaces and lines to connect various parts within the entire server 900, and executes various functions and processes data of the server 900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 905, and calling data stored in the memory 905. Optionally, the processor 901 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 901 can integrate one or more combinations of a processor (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 901, and it can be implemented by a single chip.
[0195] Among them, the memory 905 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 905 includes a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 905 may optionally be at least one storage device located away from the aforementioned processor 901. As Fig.11 As shown, the memory 905 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a protocol data processing application.
[0196] exist Fig.11 In the electronic device 900 shown, the user interface 903 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 901 can be used to call the protocol data processing application stored in the memory 905, and specifically perform the following operations:
[0197] Get protocol data from the terminal;
[0198] Determining a processing scheme corresponding to the protocol data according to the content of the protocol data request;
[0199] According to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are synchronously processed.
[0200] In one embodiment, the processor 901 executes the acquiring of the protocol data from the terminal, specifically executing:
[0201] Traversing a plurality of cache spaces; wherein the plurality of cache spaces correspond to a plurality of terminals respectively;
[0202] The protocol data sent by the terminal corresponding to the cache space is acquired from each cache space.
[0203] In one embodiment, the protocol data includes first protocol data;
[0204] The processor 901 executes the content of the protocol data request, determines the processing scheme corresponding to the protocol data, and specifically performs:
[0205] Determining, according to the content of the first protocol data request, whether the first protocol data is target protocol upgrade start data;
[0206] When it is determined that the first protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the first protocol data, and determining that the terminal sending the first protocol data is a first terminal;
[0207] Determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
[0208] In one embodiment, the protocol data further includes second protocol data;
[0209] Before the processor 901 executes the step of determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, it further executes:
[0210] determining, according to the content of the second protocol data request, whether the second protocol data is target protocol upgrade start data;
[0211] When it is determined that the second protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the second protocol data, and determining that the terminal sending the second protocol data is a second terminal;
[0212] It is determined that the time of receiving the second protocol data is later than the time of receiving the first protocol data, and prompt information for rejecting the target protocol upgrade operation is sent to the second terminal.
[0213] In one embodiment, the protocol data further includes third protocol data;
[0214] Before the processor 901 executes the step of determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, it further executes:
[0215] According to the content of the third protocol data request, determining whether the third protocol data is target protocol upgrade start data;
[0216] When it is determined that the third protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the third protocol data, and determining that the terminal sending the third protocol data is a third terminal;
[0217] Determine that the time of receiving the third protocol data is earlier than the time of receiving the first protocol data, and the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data, and send a prompt message for rejecting the target protocol upgrade operation to the third terminal.
[0218] In one embodiment, the protocol data further includes fourth protocol data;
[0219] Before the processor 901 executes the step of determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, it further executes:
[0220] According to the content of the fourth protocol data request, determining whether the fourth protocol data is target protocol upgrade start data;
[0221] When it is determined that the fourth protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the fourth protocol data, and determining that the terminal sending the fourth protocol data is a fourth terminal;
[0222] Determine that the time of receiving the fourth protocol data is earlier than the time of receiving the first protocol data, and that the upgrade version corresponding to the fourth protocol data is lower than the upgrade version corresponding to the first protocol data, and send inquiry information to the first terminal and the fourth terminal respectively;
[0223] receiving a selection instruction from the first terminal and a selection instruction from the fourth terminal respectively;
[0224] The processor 901 executes the step of determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, specifically performing:
[0225] Parse the selection instruction of the first terminal and the selection instruction of the fourth terminal, obtain that both designated results are the first terminal, or the two designated results are inconsistent, determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
[0226] In one embodiment, the processor 901 executes the processing scheme corresponding to the protocol data, and synchronously processes the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation, specifically performing:
[0227] According to the processing scheme corresponding to the protocol data, when the target protocol upgrade operation is performed on the first protocol data and the protocol data from the first terminal is processed based on the target protocol, the protocol data of the non-requested target protocol upgrade operation is processed synchronously.
[0228] In one embodiment, the processor 901 executes the processing scheme corresponding to the protocol data, and synchronously processes the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation, specifically performing:
[0229] According to the processing scheme corresponding to the protocol data, the cache space corresponding to the protocol data for requesting the target protocol upgrade operation is determined as the target protocol cache space;
[0230] The protocol data in the target protocol cache space is processed based on the target protocol, and the protocol data in at least one cache space other than the target protocol cache space is processed synchronously.
[0231] In one embodiment, after the processor 901 executes the processing of the protocol data in the target protocol cache space based on the target protocol, and synchronously processes the protocol data in at least one cache space other than the target protocol cache space, it further executes:
[0232] receiving protocol data from a terminal to be determined;
[0233] Determining, according to the identity information of the terminal to be determined, whether the terminal to be determined corresponds to the target protocol buffer space;
[0234] When it is determined that the terminal to be determined corresponds to the target protocol cache space, the protocol data of the terminal to be determined is stored in the target protocol cache space for processing.
[0235] In one embodiment, before executing the traversal of the multiple cache spaces, the processor 901 further executes:
[0236] receiving connection requests from the plurality of terminals;
[0237] In response to the connection requests of the multiple terminals, a cache space corresponding to the terminal is constructed according to the identity information of each terminal.
[0238] In one embodiment, the processor 901 executes the processing scheme corresponding to the protocol data, and after synchronizing the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation, further executes:
[0239] Based on the protocol type to which the protocol data belongs, a processing result is sent to the terminal.
[0240] In the present application, according to the content of the protocol data request from the terminal, the processing scheme corresponding to the protocol data is determined, and further according to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are separated to achieve synchronous processing, that is, the target protocol upgrade operation is performed on the former while the latter is processed based on other protocols. Based on the protocol data processing method provided in the embodiment of the present application, when the protocol data receiving terminal is connected to multiple protocol data sending devices, it is avoided that when the target protocol upgrade operation is performed on the protocol data sent by one of the sending devices, the protocol data sent by other sending devices cannot be processed, resulting in abnormal communication of other sending devices, ensuring the multi-device compatibility of the receiving terminal and the communication stability between the receiving terminal and multiple sending devices, optimizing the use of communication resources, and improving the flexibility of multiple different types of protocol data processing.
[0241] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0242] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0243] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A protocol data processing method, characterized in that: The method comprises: Get protocol data from the terminal; Determining a processing scheme corresponding to the protocol data according to the content of the protocol data request; According to the processing scheme corresponding to the protocol data, the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation are synchronously processed.
2. The protocol data processing method according to claim 1, characterized in that: The acquiring of the protocol data from the terminal comprises: Traversing a plurality of cache spaces; wherein the plurality of cache spaces correspond to a plurality of terminals respectively; The protocol data sent by the terminal corresponding to the cache space is acquired from each cache space.
3. The protocol data processing method according to claim 1, characterized in that: The protocol data includes first protocol data; Determining a processing scheme corresponding to the protocol data according to the content of the protocol data request includes: Determining, according to the content of the first protocol data request, whether the first protocol data is target protocol upgrade start data; When it is determined that the first protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the first protocol data, and determining that the terminal sending the first protocol data is a first terminal; Determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
4. The protocol data processing method according to claim 3, characterized in that: The protocol data also includes second protocol data; Before determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, the method further includes: determining, according to the content of the second protocol data request, whether the second protocol data is target protocol upgrade start data; When it is determined that the second protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the second protocol data, and determining that the terminal sending the second protocol data is a second terminal; It is determined that the time of receiving the second protocol data is later than the time of receiving the first protocol data, and prompt information for rejecting the target protocol upgrade operation is sent to the second terminal.
5. The protocol data processing method according to claim 3, characterized in that: The protocol data also includes third protocol data; Before determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, the method further includes: According to the content of the third protocol data request, determining whether the third protocol data is target protocol upgrade start data; When it is determined that the third protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the third protocol data, and determining that the terminal sending the third protocol data is a third terminal; Determine that the time of receiving the third protocol data is earlier than the time of receiving the first protocol data, and the upgrade version corresponding to the third protocol data is lower than the upgrade version corresponding to the first protocol data, and send a prompt message for rejecting the target protocol upgrade operation to the third terminal.
6. The protocol data processing method according to claim 3, characterized in that: The protocol data also includes fourth protocol data; Before determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, the method further includes: According to the content of the fourth protocol data request, determining whether the fourth protocol data is target protocol upgrade start data; When it is determined that the fourth protocol data is the target protocol upgrade start data, acquiring identity information of a terminal sending the fourth protocol data, and determining that the terminal sending the fourth protocol data is a fourth terminal; Determine that the time of receiving the fourth protocol data is earlier than the time of receiving the first protocol data, and that the upgrade version corresponding to the fourth protocol data is lower than the upgrade version corresponding to the first protocol data, and send inquiry information to the first terminal and the fourth terminal respectively; receiving a selection instruction from the first terminal and a selection instruction from the fourth terminal respectively; The determining that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determining that the processing scheme for the protocol data from the first terminal is processing based on the target protocol, includes: Parse the selection instruction of the first terminal and the selection instruction of the fourth terminal, obtain that both designated results are the first terminal, or the two designated results are inconsistent, determine that the processing scheme corresponding to the first protocol data is a target protocol upgrade operation, and determine that the processing scheme for the protocol data from the first terminal is processing based on the target protocol.
7. The protocol data processing method according to claim 3, characterized in that: The synchronous processing of the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data includes: According to the processing scheme corresponding to the protocol data, when the target protocol upgrade operation is performed on the first protocol data and the protocol data from the first terminal is processed based on the target protocol, the protocol data of the non-requested target protocol upgrade operation is processed synchronously.
8. The protocol data processing method according to claim 2, characterized in that: The synchronous processing of the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data includes: According to the processing scheme corresponding to the protocol data, the cache space corresponding to the protocol data for requesting the target protocol upgrade operation is determined as the target protocol cache space; The protocol data in the target protocol cache space is processed based on the target protocol, and the protocol data in at least one cache space other than the target protocol cache space is processed synchronously.
9. The protocol data processing method according to claim 8, characterized in that: After the protocol data in the target protocol cache space is processed based on the target protocol, and the protocol data in at least one cache space other than the target protocol cache space is synchronously processed, the method further includes: receiving protocol data from a terminal to be determined; Determining, according to the identity information of the terminal to be determined, whether the terminal to be determined corresponds to the target protocol buffer space; When it is determined that the terminal to be determined corresponds to the target protocol cache space, the protocol data of the terminal to be determined is stored in the target protocol cache space for processing.
10. The protocol data processing method according to claim 2, characterized in that: Before traversing the multiple cache spaces, the method further includes: receiving connection requests from the plurality of terminals; In response to the connection requests of the multiple terminals, a cache space corresponding to the terminal is constructed according to the identity information of each terminal.
11. The protocol data processing method according to claim 1, characterized in that: After synchronously processing the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data, the method further includes: Based on the protocol type to which the protocol data belongs, a processing result is sent to the terminal.
12. A protocol data processing device, characterized in that: The device comprises: A data acquisition module, used for acquiring protocol data from a terminal; A solution determination module, used to determine a processing solution corresponding to the protocol data according to the content of the protocol data request; The protocol processing module is used to synchronously process the protocol data of the requested target protocol upgrade operation and the protocol data of the non-requested target protocol upgrade operation according to the processing scheme corresponding to the protocol data.
13. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 11.
15. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 11.