WO2018133828A1 - 用于客户端的数据处理方法和装置 - Google Patents

用于客户端的数据处理方法和装置 Download PDF

Info

Publication number
WO2018133828A1
WO2018133828A1 PCT/CN2018/073350 CN2018073350W WO2018133828A1 WO 2018133828 A1 WO2018133828 A1 WO 2018133828A1 CN 2018073350 W CN2018073350 W CN 2018073350W WO 2018133828 A1 WO2018133828 A1 WO 2018133828A1
Authority
WO
WIPO (PCT)
Prior art keywords
protocol
data
processing
client
setting
Prior art date
Application number
PCT/CN2018/073350
Other languages
English (en)
French (fr)
Inventor
李奇文
Original Assignee
深圳创维-Rgb电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳创维-Rgb电子有限公司 filed Critical 深圳创维-Rgb电子有限公司
Priority to EP18742195.3A priority Critical patent/EP3573306A4/en
Priority to US16/477,940 priority patent/US20190364134A1/en
Publication of WO2018133828A1 publication Critical patent/WO2018133828A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the present disclosure relates to the field of communication technologies, for example, to a data processing method and apparatus for a client.
  • An application refers to a computer program running on the operating system that is developed to complete a specific task or a plurality of specific tasks.
  • the application running on the client side can interact with the user and has a visual user interface.
  • the client Based on the data processing method between the server and the client application, the client generally performs the corresponding operation on the received data according to the fixed configuration mode of the server.
  • This treatment has the following disadvantages:
  • the server cannot fully configure the processing of the application.
  • the application changes the data processing mode due to the update, sometimes the problem can be solved by upgrading the client, which is not conducive to the sustainable development of the software.
  • the present disclosure provides a data processing method and apparatus for a client, which implements intelligent processing of protocol data by a client by processing protocol data according to a setting protocol by a client.
  • the present disclosure provides a data processing method for a client, which may include:
  • protocol data is data formed by the server encapsulating the transmission data in a setting protocol
  • the protocol data is processed according to the protocol header, protocol body, and protocol exception handling portion.
  • the present disclosure also provides a data processing apparatus for a client, which may include:
  • a protocol data obtaining module configured to acquire protocol data from a server, where the protocol data is data formed by the server to encapsulate the transmission data in a setting protocol;
  • a protocol data parsing module configured to parse the protocol data to obtain the setting protocol
  • Protocol identification module configured to identify a protocol header, a protocol body, and a protocol exception processing part of the setting protocol
  • the protocol data processing module is configured to process the protocol data according to the protocol header, the protocol body, and the protocol exception handling portion.
  • the present disclosure also provides a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • the present disclosure also provides a terminal device including one or more processors, a memory, and one or more programs, the one or more programs being stored in a memory when executed by one or more processors , perform any of the above methods.
  • the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, Having the computer perform any of the methods described above.
  • the data processing method and device provided by the present disclosure, by arranging a unified setting protocol between the server and the client, when the server transmits data to the client, the data to be transmitted is first encapsulated in a setting protocol to form protocol data.
  • the transmission can realize the intelligent processing of the protocol data by the client executing the application, and avoid the problem that the client cannot perform the application processing due to data incompatibility and the like in the subsequent expansion and update process, which is beneficial to the server and the server. Sustainability of software development between clients.
  • FIG. 1A is a schematic flowchart of a data processing method for a client according to an embodiment
  • FIG. 1B is a schematic structural diagram of a setting protocol according to an embodiment
  • FIG. 2 is a schematic flowchart diagram of a data processing method for a client according to an embodiment
  • FIG. 3A is a schematic structural diagram of a data processing apparatus for a client according to an embodiment
  • FIG. 3B is a schematic structural diagram of the protocol data processing module 340 of FIG. 3A according to an embodiment
  • FIG. 4 is a schematic structural diagram of hardware of a terminal device according to an embodiment.
  • FIG. 1A is a schematic flowchart of a data processing method for a client according to the embodiment.
  • FIG. 1B is a schematic structural diagram of a setting protocol provided by the embodiment.
  • the method in this embodiment is applicable to a scenario in which a client processes data acquired from a server, and may be executed by a client.
  • the client may be configured in a terminal device, including but not limited to a television set and a personal computer. , mobile phones and personal digital assistants (PDAs).
  • PDAs personal digital assistants
  • a data processing method for a client may include the following steps:
  • protocol data is obtained from the server side, and the protocol data is data formed by the server to encapsulate the transmission data in the setting protocol.
  • a client refers to a program corresponding to a server that provides a local service to a client, and a communication connection is maintained between the client and the server.
  • the server and the client pre-agreed the setting protocol for the specified application, and the server formulates the client application according to the setting protocol.
  • the service data to be transmitted is first encapsulated in the client.
  • protocol data is formed, and the client obtains the protocol data from the server.
  • the agreed setting protocol between the client and the server includes a protocol header, a protocol body, and a protocol exception handling portion.
  • the protocol header may include version information identifying the foregoing setting protocol, and client information applicable to the setting protocol;
  • the protocol body may include two parts: normal processing logic and exception processing logic, and the client performs the application according to the content of the protocol body.
  • the processing of the normal processing logic refers to the protocol content that the client can normally perform the application processing according to the content included in the normal processing logic, and the exception processing logic refers to the client not performing the application processing according to the normal processing logic, and the
  • the setting protocol is applied to the current client, the content of the protocol processed by the application according to the content included in the exception processing logic, wherein the content of the exception processing logic is different from the content of the normal processing logic; the protocol exception processing part refers to the protocol according to the foregoing protocol.
  • the header judges that the setting protocol does not apply to the protocol content executed by the client when the current client is used, and further, when the client that applies the setting protocol cannot perform application processing according to the content of the protocol body, the client can also The content of the protocol exception handling part Line application process.
  • the client can process the application by executing the protocol data.
  • the client executes the service data in the protocol data according to the processing logic provided by the protocol body, and implements the processing of the application.
  • the service data may include an instruction to open the application and update.
  • Business data for operations such as applications or deleting applications.
  • step 120 the protocol data is parsed to obtain a setup protocol.
  • parsing the protocol data that is, decapsulating the protocol data
  • the decapsulation is the inverse process of the data encapsulation in step 110
  • the client parses the obtained protocol data to obtain the protocol part of the protocol data and the encapsulated service data part.
  • the protocol data can be parsed into three different containers: a protocol header container, a protocol body container, and a protocol exception container.
  • step 130 the protocol header, protocol body, and protocol exception handling portion of the setup protocol are identified.
  • the protocol header, the protocol body, and the protocol exception handling portion of the setting protocol are identified based on the contents obtained from the three different containers when the protocol data is parsed as described above.
  • the protocol body may include normal processing logic and exception processing logic, wherein the client executes the application according to the normal processing logic and processes the protocol data, executes the application according to the exception processing logic, and processes the protocol data when When the processing logic execution application cannot process the protocol data, the application can be executed and the protocol data can be processed according to the exception handling section of the above protocol.
  • the protocol body and the protocol exception processing part may be mutually independent contents in the setting protocol.
  • the client performs the application processing according to the content of the protocol body, it is not necessary to interpret the content of the exception processing part, thereby reducing the processing time and occupying resources.
  • the protocol body and the protocol exception handling part may also be combined, that is, the protocol body may also include a protocol exception processing part, so that the content of the protocol exception processing part can also be read when the protocol body is executed.
  • step 140 the protocol data is processed in accordance with the protocol header, the protocol body, and the protocol exception handling portion.
  • the client determines, according to the identification information in the protocol header, whether the setting protocol is applicable to the current client, and the client selects the content processing protocol data according to the protocol body obtained by the parsing, or the content of the abnormal processing part according to the protocol obtained by the parsing. Process protocol data.
  • a unified setting protocol is agreed between the server and the client.
  • the server transmits data to the client
  • the data to be transmitted is first encapsulated in a setting protocol to form protocol data and then transmitted, and the client obtains the data.
  • the protocol data is parsed, the protocol header, the protocol body and the protocol exception processing part of the setting protocol are identified, and the application program is processed according to the protocol header, the protocol body and the protocol exception processing part, and the protocol data is processed to implement the client application.
  • the intelligent processing of the protocol data avoids the problem that the client cannot perform the application processing due to data incompatibility in the subsequent expansion and update process, which is beneficial to the sustainability of software development between the server and the client.
  • FIG. 2 is a schematic flowchart of a data processing method for a client provided by this embodiment.
  • the data processing method for the client provided by this embodiment may include the following steps:
  • protocol data is obtained from the server side, and the protocol data is data formed by the server to encapsulate the transmission data in the setting protocol.
  • step 220 the protocol data is parsed to obtain a setup protocol.
  • step 230 the protocol header, protocol body, and protocol exception handling portion of the setup protocol are identified.
  • step 240 it is determined according to the protocol header whether the setting protocol is applicable to the client.
  • the protocol header may include version information of the setting protocol and client information applicable to the setting protocol, and the current client determines, according to the content of the protocol header, whether the setting protocol is applicable to the current client and the version of the setting protocol. Whether it applies to the current client. If it is determined that the version of the setting protocol and the setting protocol is applicable to the current client, step 241 is performed, otherwise step 242 is performed.
  • step 241 the protocol data is processed according to the protocol body.
  • step 242 the protocol data is processed according to the protocol exception handling portion.
  • step 241 when the client executes the application according to the content of the protocol body and processes the protocol data, the application is executed according to normal processing logic in the protocol body and the protocol data is processed, and if the processing fails, according to the protocol
  • the exception handling logic in the body executes the application and processes the protocol data.
  • the client executes the application according to the exception handling logic in the protocol body and fails to process the protocol data
  • the above step 242 is performed by jumping, and the protocol data is processed according to the protocol exception processing part.
  • the application is processed according to the normal processing logic, and if it can be executed normally, the application is processed according to the normal processing logic until the processing is completed; if the application cannot be processed according to the normal processing logic Or if an exception occurs when the application is processed according to the normal processing logic, the application is processed according to the exception processing logic. If the execution is successful, the application is processed according to the exception processing logic until the processing is completed; if the application cannot be processed according to the exception processing logic Or if an exception occurs while processing the application in accordance with the exception handling logic, the application is processed according to the protocol exception handling section until the application is processed.
  • a unified setting protocol is agreed between the server and the client.
  • the server transmits data to the client
  • the data to be transmitted is first encapsulated in a setting protocol to form protocol data and then transmitted, and the client obtains the data.
  • the protocol data is parsed, the protocol header, the protocol body and the protocol exception handling part of the setting protocol are identified, and the setting protocol is determined according to the protocol header to be applicable to the client. If yes, the application is executed according to the protocol body. Processing the protocol data, if not, executing the application according to the protocol exception handling part and processing the protocol data, so as to implement intelligent processing of the protocol data by the client application, to avoid the client in the subsequent expansion and update process due to data incompatibility, etc.
  • the cause of the problem that the application processing cannot be performed normally is beneficial to the sustainability of software development between the server and the client.
  • the data processing device for the client is also provided by the embodiment, and the data processing device and the data processing method provided by the foregoing embodiment belong to the same inventive concept, and details not detailed in the embodiment of the device are provided. Refer to the embodiment of the above method.
  • FIG. 3A is a schematic structural diagram of a data processing apparatus for a client provided by this embodiment.
  • FIG. 3B is a schematic structural diagram of a protocol data processing module 340 of FIG. 3A.
  • a data processing apparatus 300 for a client provided by this embodiment may include, for example:
  • the protocol data obtaining module 310 is configured to acquire protocol data from the server, where the protocol data is data formed by the server to encapsulate the transmission data in the setting protocol.
  • the protocol data parsing module 320 is configured to parse the protocol data to obtain a setting protocol.
  • the setting protocol identification module 330 is configured to identify a protocol header, a protocol body, and a protocol exception processing portion of the setting protocol.
  • the protocol data processing module 340 is configured to process the protocol data according to the protocol header, the protocol body, and the protocol exception handling portion.
  • the foregoing protocol body includes normal processing logic and exception handling logic.
  • the protocol data processing module 340 may include:
  • the first processing unit 341 is configured to process the protocol data according to the protocol body if it is determined according to the protocol header that the setting protocol is applicable to the client.
  • the second processing unit 342 is configured to process the protocol data according to the protocol exception handling portion if it is determined according to the protocol header that the setting protocol is not applicable to the client.
  • the second processing unit 342 is further configured to:
  • the protocol data is processed according to the normal processing logic, and the processing fails, the protocol data is processed according to the exception handling logic.
  • the second processing unit 342 is further configured to:
  • the protocol data is processed according to the exception handling logic, and the processing fails, the protocol data is processed according to the protocol exception handling portion.
  • a unified setting protocol is agreed between the server and the client.
  • the server transmits data to the client
  • the data to be transmitted is first encapsulated in a setting protocol to form protocol data and then transmitted, and the client obtains the data.
  • the protocol data is parsed, the protocol header, the protocol body and the protocol exception processing part of the setting protocol are identified, and the application program is processed according to the protocol header, the protocol body and the protocol exception processing part, and the protocol data is processed to implement the client application.
  • the intelligent processing of the protocol data avoids the problem that the client cannot perform the application processing due to data incompatibility in the subsequent expansion and update process, which is beneficial to the sustainability of software development between the server and the client.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing any of the above methods.
  • the terminal device includes: a processor 410 and a memory 420; and a communication interface. (Communications lnterface) 430 and bus 440.
  • the processor 410, the memory 420, and the communication interface 430 can complete communication with each other through the bus 440.
  • Communication interface 430 can be used for information transmission.
  • Processor 410 can invoke logic instructions in memory 420 to perform any of the methods of the above-described embodiments.
  • the memory 420 may include a storage program area and a storage data area, and the storage program area may store an operating system and an application required for at least one function.
  • the storage data area can store data and the like created according to the use of the terminal device.
  • the memory may include, for example, a volatile memory of a random access memory, and may also include a non-volatile memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid state storage device.
  • the logic instructions in memory 420 described above can be implemented in the form of software functional units and sold or used as separate products, the logic instructions can be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a computer software product, which may be stored in a storage medium, and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) All or part of the steps of the method described in this embodiment are performed.
  • the storage medium may be a non-transitory storage medium or a transitory storage medium.
  • the non-transitory storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. medium.
  • All or part of the processes in the above embodiment may be indicated by a computer program to indicate related hardware completion.
  • the program may be stored in a non-transitory computer readable storage medium.
  • the method may include the above method. The flow of the embodiment.
  • the data processing method and device for the client provided by the disclosure enable the client to execute the application according to the setting protocol and intelligently process the protocol data, so as to prevent the client from being incompatible during the subsequent expansion and update process. For other reasons, the problem of application processing cannot be performed normally, which is beneficial to the sustainability of software development between the server and the client.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种用于客户端的数据处理方法和装置。其中,用于客户端的数据处理方法包括:从服务器端获取协议数据,协议数据为服务器将传输数据封装在设定协议中形成的数据,解析协议数据,得到所述设定协议,识别设定协议的协议头、协议体和协议异常处理部分,根据协议头、协议体和协议异常处理部分处理协议数据。

Description

用于客户端的数据处理方法和装置 技术领域
本公开涉及通信技术领域,例如涉及一种用于客户端的数据处理方法和装置。
背景技术
应用程序(Application,APP)指为完成某项或多项特定工作而被开发的运行于操作系统之上的计算机程序,运行在用户端的应用程序可以和用户进行交互,具有可视的用户界面。
基于服务器和客户端的应用程序之间的数据处理方式,一般是客户端根据服务器固定的配置方式对接收的数据执行相应的操作。这种处理方式有如下缺点:
1、客户端一旦出现无法实现该操作或执行该操作的过程中出现异常时,客户端将不做任何处理或者报错体现,用户体验较差;
2、在服务器端配置一致的情况下,如果客户端的版本碎片化严重,很可能导致部分客户端无法正常处理服务器端的配置,兼容性差,可扩展性不好;
3、服务器端无法全面地对应用程序的处理进行配置,当应用程序因为更新而导致数据处理方式有变更时,有时只能通过升级客户端来解决该问题,不利于软件的可持续开发。
发明内容
本公开提供一种用于客户端的数据处理方法和装置,通过客户端按照设定协议处理协议数据,实现客户端对协议数据的智能处理。
本公开提供了一种用于客户端的数据处理方法,可以包括:
从服务器端获取协议数据,所述协议数据为所述服务器将传输数据封装在设定协议中形成的数据;
解析所述协议数据,得到所述设定协议;
识别所述设定协议的协议头、协议体和协议异常处理部分;
根据所述协议头、协议体和协议异常处理部分处理所述协议数据。
本公开还提供了一种用于客户端的数据处理装置,可以包括:
协议数据获取模块,设置为从服务器端获取协议数据,所述协议数据为所述服务器将传输数据封装在设定协议中形成的数据;
协议数据解析模块,设置为解析所述协议数据,得到所述设定协议;
设定协议识别模块,设置为识别所述设定协议的协议头、协议体和协议异常处理部分;
协议数据处理模块,设置为根据所述协议头、协议体和协议异常处理部分处理所述协议数据。
本公开还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任意一种方法。
本公开还提供一种终端设备,该终端设备包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述任意一种方法。
本公开还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当 所述程序指令被计算机执行时,使所述计算机执行上述任意一种方法。
本公开提供的数据处理方法和装置,通过在服务器和客户端之间约定一个统一的设定协议,在服务器向客户端传输数据时,将要传输的数据先封装在设定协议中形成协议数据再传输,能够实现客户端执行应用程序对协议数据的智能处理,避免客户端在后续的扩展及更新过程中,出现由于数据不兼容等原因而导致无法正常执行应用程序处理的问题,有益于服务器与客户端之间软件开发的可持续性。
附图说明
图1A是一实施例提供的一种用于客户端的数据处理方法的流程示意图;
图1B是一实施例提供的设定协议的结构示意图;
图2是一实施例提供的一种用于客户端的数据处理方法的流程示意图;
图3A是一实施例提供的一种用于客户端的数据处理装置的架构示意图;
图3B是一实施例提供的图3A中协议数据处理模块340的一种架构示意图;
图4为一实施例提供的一种终端设备的硬件结构示意图。
具体实施方式
请参考图1A和图1B,其中,图1A是本实施例提供的一种用于客户端的数据处理方法的流程示意图;图1B是本实施例提供的设定协议的结构示意图。本实施例的方法适用于客户端处理从服务器端获取的数据的场景,可以由客户端来执行,其中,客户端可以设置在终端设备中,所述终端设备包括但不限于电视机、个人计算机、手机及个人数字助理(Personal Digital Assistant,PDA)等。
如图1A所示,本实施提供的一种用于客户端的数据处理方法,可以包括如下步骤:
在步骤110中,从服务器端获取协议数据,协议数据为服务器将传输数据封装在设定协议中形成的数据。
例如,客户端是指与服务器相对应,为客户提供本地服务的程序,客户端与服务器端之间保持通信连接。在本实施例中,服务器和客户端对指定的应用程序预先约定好设定协议,服务器根据设定协议制定客户端的应用程序,在向客户端传输业务数据时,先将要传输的业务数据封装在上述设定协议中,形成协议数据,客户端从服务器端获取该协议数据。
如图1B所示,客户端和服务器之间约定的设定协议包括协议头、协议体和协议异常处理部分。其中,协议头可以包括标识上述设定协议的版本信息,以及适用该设定协议的客户端信息;协议体可以包括正常处理逻辑和异常处理逻辑两部分,客户端根据协议体的内容进行应用程序的处理,其中,正常处理逻辑是指客户端能够按照该正常处理逻辑包括的内容正常进行应用程序处理的协议内容,异常处理逻辑是指客户端在不能按照正常处理逻辑进行应用程序处理,且该设定协议适用于当前客户端时,按照异常处理逻辑包括的内容进行应用程序处理的协议内容,其中,异常处理逻辑的内容不同于上述正常处理逻辑的内容;协议异常处理部分是指根据上述协议头判断出设定协议不适用于当前客户端时,客户端执行的协议内容,此外,当适用该设定协议的客户端无法根据协议体的内容进行应用程序处理时,客户端也可以根据该协议异常处理部分的内容进行应用程序处理。
其中,客户端可以通过执行协议数据进行应用程序的处理,例如,客户端按照协议体提供的处理逻辑执行协议数据中的业务数据,实现应用程序的处理, 业务数据可以包括指示打开应用程序、更新应用程序或删除应用程序等操作的业务数据。
在步骤120中,解析协议数据,得到设定协议。
例如,解析协议数据也即对协议数据进行解封装,解封装是步骤110中数据封装的逆过程,客户端解析获取到的协议数据,得到协议数据的设定协议部分和被封装的业务数据部分。其中,对协议数据进行解封装时,可以将协议数据解析到协议头容器、协议体容器和协议异常容器三个不同的容器中。
在步骤130中,识别设定协议的协议头、协议体和协议异常处理部分。
例如,根据从上述解析协议数据时的三个不同容器中获得的内容,识别设定协议的协议头、协议体和协议异常处理部分。,如图1B所示,协议体可以包括正常处理逻辑和异常处理逻辑,其中,客户端根据正常处理逻辑执行应用程序并处理协议数据,根据异常处理逻辑执行应用程序并处理协议数据,当根据异常处理逻辑执行应用程序无法处理协议数据时,可以根据上述协议异常处理部分执行应用程序并处理协议数据。
例如,协议体和协议异常处理部分可以为设定协议中相互独立的内容,当客户端根据协议体的内容进行应用程序处理时,无需解读异常处理部分的内容,减少处理时间和占用资源。也可以将协议体和协议异常处理部分合在一起,即协议体也可以包括协议异常处理部分,使得在执行协议体时也能够读取协议异常处理部分的内容。
在步骤140中,根据协议头、协议体和协议异常处理部分处理协议数据。
例如,客户端根据协议头中的标识信息,判断该设定协议是否适用于当前客户端,客户端选择根据解析得到的协议体的内容处理协议数据,或根据解析得到的协议异常处理部分的内容处理协议数据。
在本实施例中,服务器和客户端之间约定一个统一的设定协议,在服务器向客户端传输数据时,将要传输的数据先封装在设定协议中形成协议数据再传输,客户端获取该协议数据后,对协议数据解析,识别出设定协议的协议头、协议体和协议异常处理部分,根据协议头、协议体和协议异常处理部分执行应用程序并处理协议数据,实现客户端应用程序对协议数据的智能处理,避免客户端在后续的扩展及更新过程中出现由于数据不兼容等原因而导致无法正常执行应用程序处理的问题,有益于服务器与客户端之间软件开发的可持续性。
请参考图2,是本实施例提供的一种用于客户端的数据处理方法的流程示意图。图2所示,本实施例提供的用于客户端的数据处理方法,可以包括如下步骤:
在步骤210中,从服务器端获取协议数据,协议数据为服务器将传输数据封装在设定协议中形成的数据。
在步骤220中,解析协议数据,得到设定协议。
在步骤230中,识别设定协议的协议头、协议体和协议异常处理部分。
在步骤240中,根据协议头判断设定协议是否适用于客户端。
例如,协议头中可以包括设定协议的版本信息,以及适用该设定协议的客户端信息,当前客户端根据协议头的内容,判断设定协议是否适用于当前客户端以及设定协议的版本是否适用于当前客户端。如果判断设定协议及设定协议的版本适用于当前客户端,则执行步骤241,否则执行步骤242。
在步骤241中,根据协议体处理协议数据。
在步骤242中,根据协议异常处理部分处理协议数据。
可选地,在步骤241中,当客户端在根据协议体的内容执行应用程序并处 理协议数据时,根据协议体中的正常处理逻辑执行应用程序并处理协议数据,如果处理失败,则根据协议体中的异常处理逻辑执行应用程序并处理协议数据。
可选地,当客户端根据协议体中的异常处理逻辑执行应用程序并处理协议数据失败时,则跳转执行上述步骤242,根据协议异常处理部分处理协议数据。
例如,如果设定协议适用于当前客户端,则依据正常处理逻辑处理应用程序,如果能够正常执行,则依据该正常处理逻辑继续处理应用程序,直至处理完毕;若不能按照正常处理逻辑处理应用程序或者在按照正常处理逻辑处理应用程序时发生异常,则按照异常处理逻辑处理应用程序,如果能顺利执行,则依据该异常处理逻辑继续处理应用程序直至处理完毕;若不能按照异常处理逻辑处理应用程序或者在按照异常处理逻辑处理应用程序时发生异常,则按照协议异常处理部分来处理应用程序,直至处理完该应用程序。
在本实施例中,服务器和客户端之间约定一个统一的设定协议,在服务器向客户端传输数据时,将要传输的数据先封装在设定协议中形成协议数据再传输,客户端获取该协议数据后,对协议数据解析,识别出设定协议的协议头、协议体和协议异常处理部分,根据协议头判断设定协议是否适用于客户端,如果是,则根据协议体执行应用程序并处理协议数据,如果否,则根据协议异常处理部分执行应用程序并处理协议数据,实现客户端应用程序对协议数据的智能处理,避免客户端在后续的扩展及更新过程中出现由于数据不兼容等原因而导致无法正常执行应用程序处理的问题,有益于服务器与客户端之间软件开发的可持续性。
本实施例还提供的一种用于客户端的数据处理装置,所述数据处理装置和上述实施例提供的数据处理方法属于同一个发明构思,在装置的实施例中未详 尽描述的细节内容,请参考上述方法的实施例。
请参考图3A和图3B,其中,图3A是本实施例提供的一种用于客户端的数据处理装置的架构示意图;图3B是图3A中协议数据处理模块340的一种架构示意图。
本实施例提供的一种用于客户端的数据处理装置300,可以包括如:
协议数据获取模块310,设置为从服务器端获取协议数据,协议数据为服务器将传输数据封装在设定协议中形成的数据。
协议数据解析模块320,设置为解析协议数据,得到设定协议。
设定协议识别模块330,设置为识别设定协议的协议头、协议体和协议异常处理部分。
协议数据处理模块340,设置为根据协议头、协议体和协议异常处理部分处理协议数据。
可选地,上述协议体包括正常处理逻辑和异常处理逻辑。
可选地,如图3B所示,协议数据处理模块340可以包括:
第一处理单元341,设置为如果根据协议头确定设定协议适用于客户端,则根据协议体处理协议数据。
第二处理单元342,设置为如果根据协议头确定设定协议不适用于客户端,则根据协议异常处理部分处理协议数据。
可选地,第二处理单元342还设置为:
在根据正常处理逻辑处理协议数据,且处理失败时,则根据异常处理逻辑处理协议数据。
可选地,第二处理单元342还设置为:
在根据异常处理逻辑处理协议数据,且处理失败时,则根据协议异常处理 部分处理协议数据。
在本实施例中,服务器和客户端之间约定一个统一的设定协议,在服务器向客户端传输数据时,将要传输的数据先封装在设定协议中形成协议数据再传输,客户端获取该协议数据后,对协议数据解析,识别出设定协议的协议头、协议体和协议异常处理部分,根据协议头、协议体和协议异常处理部分执行应用程序并处理协议数据,实现客户端应用程序对协议数据的智能处理,避免客户端在后续的扩展及更新过程中出现由于数据不兼容等原因而导致无法正常执行应用程序处理的问题,有益于服务器与客户端之间软件开发的可持续性。
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任意一种方法。
如图4所示,是本实施例提供的一种终端设备的硬件结构示意图,如图4所示,该终端设备包括:处理器(processor)410和存储器(memory)420;还可以包括通信接口(Communications lnterface)430和总线440。
其中,处理器410、存储器420和通信接口430可以通过总线440完成相互间的通信。通信接口430可以用于信息传输。处理器410可以调用存储器420中的逻辑指令,以执行上述实施例的任意一种方法。
存储器420可以包括存储程序区和存储数据区,存储程序区可以存储操作系统和至少一个功能所需的应用程序。存储数据区可以存储根据终端设备的使用所创建的数据等。此外,存储器可以包括,例如,随机存取存储器的易失性存储器,还可以包括非易失性存储器。例如至少一个磁盘存储器件、闪存器件或者其他非暂态固态存储器件。
此外,在上述存储器420中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,该逻辑指令可以存储在一个计算机可读取存 储介质中。本公开的技术方案可以以计算机软件产品的形式体现出来,该计算机软件产品可以存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本实施例所述方法的全部或部分步骤。
存储介质可以是非暂态存储介质,也可以是暂态存储介质。非暂态存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质。
上述实施例方法中的全部或部分流程,可以通过计算机程序来指示相关的硬件完成,该程序可存储于一个非暂态计算机可读存储介质中,该程序被执行时,可包括如上述方法的实施例的流程。
工业实用性
本公开提供的用于客户端的数据处理方法和装置,能够实现客户端根据设定协议执行应用程序并对协议数据进行智能处理,避免客户端在后续的扩展及更新过程中,出现由于数据不兼容等原因而导致无法正常执行应用程序处理的问题,有益于服务器与客户端之间软件开发的可持续性。

Claims (11)

  1. 一种用于客户端的数据处理方法,包括:
    从服务器端获取协议数据,所述协议数据为所述服务器将传输数据封装在设定协议中形成的数据;
    解析所述协议数据,得到所述设定协议;
    识别所述设定协议的协议头、协议体和协议异常处理部分;
    根据所述协议头、协议体和协议异常处理部分处理所述协议数据。
  2. 如权利要求1所述的方法,其中,所述根据所述协议头、协议体和协议异常处理部分处理所述协议数据,包括:
    根据所述协议头确定所述设定协议是否适用于所述客户端;
    当根据所述协议头确定所述设定协议适用于所述客户端时,根据所述协议体处理所述协议数据;
    当根据所述协议头确定所述设定协议不适用于所述客户端时,根据所述协议异常处理部分处理所述协议数据。
  3. 如权利要求2所述的方法,其中,所述协议体包括正常处理逻辑和异常处理逻辑。
  4. 如权利要求3所述的方法,其中,所述根据所述协议体处理所述协议数据,包括:
    根据所述正常处理逻辑处理所述协议数据,如果处理失败,则根据所述异常处理逻辑处理所述协议数据。
  5. 如权利要求4所述的方法,其中,所述根据所述异常处理逻辑处理所述协议数据之后,还包括:
    当根据所述异常处理逻辑处理所述协议数据失败时,则根据所述协议异常处理部分处理所述协议数据。
  6. 一种用于客户端的数据处理装置,包括:
    协议数据获取模块,设置为从服务器端获取协议数据,所述协议数据为所述服务器将传输数据封装在设定协议中形成的数据;
    协议数据解析模块,设置为解析所述协议数据,得到所述设定协议;
    设定协议识别模块,设置为识别所述设定协议的协议头、协议体和协议异常处理部分;
    协议数据处理模块,设置为根据所述协议头、协议体和协议异常处理部分处理所述协议数据。
  7. 如权利要求6所述的装置,其中,所述协议数据处理模块,包括:
    确定单元,设置为根据所述协议头确定所述设定协议是否适用于所述客户端;
    第一处理单元,设置为当根据所述协议头确定所述设定协议适用于所述客户端,根据所述协议体处理所述协议数据;
    第二处理单元,设置为当根据所述协议头确定所述设定协议不适用于所述客户端时,根据所述协议异常处理部分处理所述协议数据。
  8. 如权利要求7所述的装置,其中,所述协议体包括正常处理逻辑和异常处理逻辑。
  9. 如权利要求8所述的装置,其中,所述第二处理单元还设置为:
    当根据所述正常处理逻辑处理所述协议数据失败时,根据所述异常处理逻辑处理所述协议数据。
  10. 如权利要求9所述的装置,其中,所述第二处理单元还设置为:
    当根据所述异常处理逻辑处理所述协议数据失败时,根据所述协议异常处理部分处理所述协议数据。
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5任一项所述的方法。
PCT/CN2018/073350 2017-01-19 2018-01-19 用于客户端的数据处理方法和装置 WO2018133828A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18742195.3A EP3573306A4 (en) 2017-01-19 2018-01-19 DATA PROCESSING PROCESS AND DEVICE USED IN A CUSTOMER TERMINAL
US16/477,940 US20190364134A1 (en) 2017-01-19 2018-01-19 Data processing method and apparatus for client

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710038068.2A CN107070872B (zh) 2017-01-19 2017-01-19 一种用于客户端的数据处理方法和装置
CN201710038068.2 2017-01-19

Publications (1)

Publication Number Publication Date
WO2018133828A1 true WO2018133828A1 (zh) 2018-07-26

Family

ID=59597921

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073350 WO2018133828A1 (zh) 2017-01-19 2018-01-19 用于客户端的数据处理方法和装置

Country Status (4)

Country Link
US (1) US20190364134A1 (zh)
EP (1) EP3573306A4 (zh)
CN (1) CN107070872B (zh)
WO (1) WO2018133828A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070872B (zh) * 2017-01-19 2019-08-27 深圳创维-Rgb电子有限公司 一种用于客户端的数据处理方法和装置
CN114553479B (zh) * 2022-01-13 2024-01-02 广东化一环境科技有限公司 一种协议接收和处理系统、方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1867152A (zh) * 2006-06-01 2006-11-22 东南大学 移动互联网内容监管设备及其监管方法
CN101064712A (zh) * 2006-04-24 2007-10-31 维豪信息技术有限公司 一种基于Linux内核实现双通道穿越多级NAT和防火墙的系统及方法
US20140119199A1 (en) * 2012-10-29 2014-05-01 Fujitsu Limited Wireless communication system and method for controlling wireless communication
CN107070872A (zh) * 2017-01-19 2017-08-18 深圳创维-Rgb电子有限公司 一种用于客户端的数据处理方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005335A1 (en) * 2005-05-16 2007-01-04 Cinnober Financial Technology Ab Methods for protocol compatibility
US8656054B2 (en) * 2008-04-30 2014-02-18 International Business Machines Corporation Message send version management in network
US8705524B1 (en) * 2010-06-17 2014-04-22 Adtran, Inc. Systems and methods for embedding metadata in data packets
CN103004158B (zh) * 2011-01-06 2016-12-28 马维尔以色列(M.I.S.L)有限公司 具有可编程内核的网络设备
US10142444B2 (en) * 2014-07-01 2018-11-27 Trinity Mobile Networks, Inc. Methods, devices, and systems for implementing centralized hybrid wireless self-organizing networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064712A (zh) * 2006-04-24 2007-10-31 维豪信息技术有限公司 一种基于Linux内核实现双通道穿越多级NAT和防火墙的系统及方法
CN1867152A (zh) * 2006-06-01 2006-11-22 东南大学 移动互联网内容监管设备及其监管方法
US20140119199A1 (en) * 2012-10-29 2014-05-01 Fujitsu Limited Wireless communication system and method for controlling wireless communication
CN107070872A (zh) * 2017-01-19 2017-08-18 深圳创维-Rgb电子有限公司 一种用于客户端的数据处理方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3573306A4 *

Also Published As

Publication number Publication date
EP3573306A1 (en) 2019-11-27
CN107070872B (zh) 2019-08-27
US20190364134A1 (en) 2019-11-28
CN107070872A (zh) 2017-08-18
EP3573306A4 (en) 2020-07-22

Similar Documents

Publication Publication Date Title
EP3332309B1 (en) Method and apparatus for facilitating a software update process over a network
WO2019085079A1 (zh) 接口测试方法、装置、计算机设备和存储介质
EP3493057A1 (en) Method and apparatus for awakening application by means of mobile browser
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
US20170163478A1 (en) Method,electronic device and system for updating client configuration in key-value pair database
TWI650645B (zh) 基於Hybrid的兼容方法、適配件、運行裝置及系統
WO2015192608A1 (zh) 安卓系统中app的更新方法、终端及存储介质
WO2017071358A1 (zh) 一种软件升级的方法及装置
WO2019184658A1 (zh) 配置文件的切换方法、装置与移动终端
US20130152069A1 (en) Method, apparatus and system for initiating terminal operation
US20180295668A1 (en) Call termination method, application processor, and modem
US20160345283A1 (en) Method and apparatus for adjacent node registration, and method and system for cross-node registration
CN105610730B (zh) Cpu与网络设备之间的消息交互方法及系统
CN107766127B (zh) 事务消息处理方法、装置、设备及系统
WO2018133828A1 (zh) 用于客户端的数据处理方法和装置
CN107273226B (zh) 在安卓系统中集成组件及调用被集成组件的方法和装置
WO2019062634A1 (zh) 通信方法及装置
CN108052401B (zh) 系统属性监听方法、终端设备及计算机可读存储介质
US9819725B1 (en) System, method, and computer program for remotely controlling mobile web applications installed on a mobile device
US20220052902A1 (en) Method for managing remote device through management device
WO2018121652A1 (zh) 通过用户设备中的应用连接无线接入点的方法与设备
US20120252404A1 (en) Method, apparatus and computer program product for security configuration coordination during a cell update procedure
KR101838772B1 (ko) 셀 업데이트 절차 동안의 보안 구성 코디네이션을 위한 방법, 장치 및 컴퓨터 프로그램 제품
CN108288135B (zh) 系统兼容方法及装置、计算机可读存储介质及电子设备
CN113411250B (zh) 一种实时消息处理方法、系统、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18742195

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018742195

Country of ref document: EP

Effective date: 20190819