Data processing method and device, equipment, storage medium and product
By constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameters and serializing the message load data, the problem of manual configuration in the SomeIP protocol stack is solved, and automated data serialization configuration is realized, and configuration efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510002778.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-29
AI Technical Summary
The serialized configuration in the existing SomeIP protocol stack mainly relies on manual configuration, resulting in cumbersome configuration and error-prone, and lack of automated data serialization configuration methods.
After receiving the registration message sent by the service provider, a serialization parameter mapping relationship between the registration message and the message data serialization parameters is constructed, the message load data is extracted, and the message load data is serialized and processed according to the serialization parameter mapping relationship is obtained, and the data structure serialization combination encoding is obtained, thereby realizing automated data serialization configuration.
Automatic data serialization configuration is realized, reducing the error rate of manual configuration and improving configuration efficiency and accuracy.
Smart Images

Figure CN119902914A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile technology, and in particular to a data processing method, device, equipment, storage medium and product. Background Art
[0002] The serialization automatic configuration method is of great significance for the implementation of the SomeIP protocol stack. SomeIP is a communication protocol for automotive electronic systems, which provides a flexible and scalable way to support communication between different applications and services. In the automotive field, the SomeIP protocol is widely used in vehicle gateways, vehicle entertainment systems, vehicle diagnostic systems, etc. In order to better support the application of the SomeIP protocol stack. AUTOSAR standard serialization refers to the conversion of data structures or objects into a specific format for transmission or storage between different systems. The serialization configuration in the SomeIP protocol stack mostly relies on manual configuration, which has the problems of cumbersome configuration and prone to errors. Therefore, how to realize automated data serialization configuration has become a problem to be solved urgently. Summary of the invention
[0003] The main purpose of this application is to provide a data processing method, device, equipment, storage medium and product, aiming to solve the technical problem of how to achieve automated data serialization configuration.
[0004] To achieve the above purpose, the present application provides a data processing method, which is applied to a server, and the data processing method comprises the following steps:
[0005] After receiving the registration message sent by the service provider, construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters;
[0006] Extracting message payload data from the registration message;
[0007] The message payload data is serialized according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
[0008] Optionally, after receiving the registration message sent by the service provider, the step of constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameter specifically includes:
[0009] After receiving the registration message sent by the service provider, obtaining the option array in the registration message;
[0010] Obtaining a zero-terminated configuration string in the option array, and determining a fixed parameter configuration and a floating parameter configuration according to the zero-terminated configuration string;
[0011] The message data serialization parameters are determined according to the fixed parameter configuration and the floating parameter configuration, and a serialization parameter mapping relationship between the registration message and the message data serialization parameters is constructed.
[0012] Optionally, the step of serializing the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code specifically includes:
[0013] Decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data;
[0014] A data structure serialization combination encoding is determined according to the basic type data, the string type data and the dynamic type data.
[0015] Optionally, the step of determining the serialized combined encoding of the data structure according to the basic type data, the string type data and the dynamic type data specifically includes:
[0016] Determine whether there is structure data in the basic type data;
[0017] If yes, determine whether to add a lenth field to the structure data;
[0018] If yes, return to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and obtain new basic type data, new string type data and new dynamic type data;
[0019] The data structure serialization combination encoding is determined according to the new basic type data, the new string type data and the new dynamic type data.
[0020] In addition, to achieve the above purpose, the present application also provides a data processing method, which is applied to the proxy application end, and the data processing method includes the following steps:
[0021] Upon receiving the message data serialization parameters sent by the server, constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameters;
[0022] When the data structure serialization combined code sent by the server is received, the data structure serialization combined code is deserialized according to the serialization parameter mapping relationship to obtain the registration message.
[0023] In addition, to achieve the above-mentioned purpose, the present application also provides a data processing device, which is applied to a server, and the data processing device includes:
[0024] A data receiving module, configured to construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters after receiving the registration message sent by the service provider;
[0025] A data extraction module, used to extract message payload data in the registration message;
[0026] The serialization processing module is used to perform serialization processing on the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
[0027] In addition, to achieve the above-mentioned purpose, the present application also provides a data processing device, which is applied to the proxy application end, and the data processing device includes:
[0028] A mapping relationship building module, used to build a serialization parameter mapping relationship between the registration message and the message data serialization parameter when receiving the message data serialization parameter sent by the server;
[0029] The deserialization processing module is used to, when receiving the data structure serialization combination code sent by the server, deserialize the data structure serialization combination code according to the serialization parameter mapping relationship to obtain the registration message.
[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a data processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the data processing method described above.
[0031] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data processing method described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data processing method described above are implemented.
[0033] After receiving the registration message sent by the service provider, the present application constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters, then extracts the message payload data in the registration message, and then serializes the message payload data according to the serialization parameter mapping relationship to obtain the data structure serialization combination code. The present application first constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters on the server side, which can correspond one-to-one between the registration message and the message data serialization parameters, and then serializes the message payload data according to the serialization parameter mapping relationship, thereby realizing automated data serialization configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 This is a flow chart of the first embodiment of the data processing method of the present application;
[0037] Figure 2 A schematic diagram of an option array in the SomeIP protocol of the AUTOSAR standard according to an embodiment of the data processing method of the present application;
[0038] Figure 3 This is a flow chart of the second embodiment of the data processing method of the present application;
[0039] Figure 4 A schematic diagram of the serialization process of an embodiment of the data processing method of the present application;
[0040] Figure 5 A schematic diagram of serialized combined encoding of a data structure according to an embodiment of the data processing method of the present application;
[0041] Figure 6 This is a flow chart of the third embodiment of the data processing method of the present application;
[0042] Figure 7 A schematic diagram of the deserialization process of an embodiment of the data processing method of the present application;
[0043] Figure 8 This is a schematic diagram of the overall flow of an embodiment of the data processing method of this application;
[0044] Fig. 9 This is a structural block diagram of the first embodiment of the data processing device of the present application;
[0045] Fig.10 This is a structural block diagram of the third embodiment of the data processing device of the present application;
[0046] Fig.11 It is a structural diagram of a data processing device of a hardware operating environment involved in an embodiment of the present application.
[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] Based on this, the present application embodiment provides a data processing method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data processing method of the present application.
[0051] In this embodiment, the data processing method is applied to the server, and includes the following steps:
[0052] Step S10: after receiving the registration message sent by the service provider, a serialization parameter mapping relationship between the registration message and the message data serialization parameters is constructed.
[0053] It should be noted that the execution subject of this embodiment may be a server.
[0054] It is understandable that based on the serialization requirements of the Automotive Open System Architecture (AUTOSAR) standard, the parameters required for the relevant serialization, i.e., message data serialization parameters, and their option meanings can be defined. For details, please refer to Table 1. The message data serialization parameters in this embodiment may include 15, i.e., protocol version, alignment, data padding of fixed-length fields, serialized tag configuration, byte order, string encoding method, configuration of the length field of the structure, length of the structure length field, length of the fixed-length array length field, length of the fixed-length string length field, length of the dynamic array length field, length of the dynamic string length field, length of the union length field, length of the union type field, and union null. The default configuration refers to the position of the above parameters in the default state, and the option refers to the range of the above parameter configuration. The length occupied by the above parameters is in brackets, for example, the protocol version occupies 4 bits.
[0055] Table 1:
[0056]
[0057]
[0058] It should be understood that the service provider may be an application end, and after receiving the registration message sent by the service provider, a serialization parameter mapping relationship between the registration message and the message data serialization parameters may be constructed, that is, the message data serialization parameters corresponding to the registration message.
[0059] Furthermore, in order to accurately construct a serialization parameter mapping relationship, in the present embodiment, the step S10 includes: after receiving a registration message sent by a service provider, obtaining an option array in the registration message; obtaining a zero-terminated configuration string in the option array, and determining a fixed parameter configuration and a floating parameter configuration according to the zero-terminated configuration string; determining message data serialization parameters according to the fixed parameter configuration and the floating parameter configuration, and constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameters.
[0060] It is understandable that Scalable service-oriented middleware over IP (SomeIP) is a protocol for real-time communication, mainly used to exchange data between different devices, such as vehicle electronic systems. In the SomeIP protocol, the configuration option custom field in the published message is registered, that is, the option array, and the corresponding option expression data bits of the above parameter content are defined. Figure 2 , Figure 2 This is a schematic diagram of an option array in the SomeIP protocol of the AUTOSAR standard according to an embodiment of the data processing method of the present application, such as Figure 2 As shown, Option Array can customize the field Zero-terminated Configuration String, that is, the zero-terminated configuration string. The custom field defines the following 19-bit definition parameters, as shown in Table 2. For example, parameter sequence number 1 is the protocol version, and the bit position is 4 bits, namely 0, 1, 2, and 3.
[0061] Table 2:
[0062]
[0063] It should be understood that in the SOME / IP protocol stack, the parameter group data structure and decomposition function required for serialization are supplemented and implemented to realize the association mapping of serialization with service messages. By obtaining the fixed parameter configuration {8,0,0,4,4,0,4,2,0,1} (fixed option parameter direct configuration) of the option custom field in the registration message, the floating parameter configuration can also be obtained, and the serialization parameter mapping relationship function of MessageTransmapping based on the SomeipTransProps structure is constructed based on the fixed parameter configuration and the floating parameter configuration. In the following example, the createMessageTrans and destroyMessageTrans functions are defined to create and destroy MessageTransmapping objects respectively. These functions use the new and delete operators to manage dynamic memory. The reference program is as follows:
[0064] / / Build the SomeipTransProps structure, which contains fixed parameter configuration
[0065] struct SomeipTransProps
[0066] {
[0067] uint8_t alignment;
[0068] uint8_t byteorder;
[0069] uint8_t isdynamiclengthfieldsize;
[0070] uint8_t arrayLFsize;
[0071] uint8_t stringLFsize;
[0072] uint8_t structLFsize;
[0073] uint8_t unionLFsize;
[0074] uint8_t unionTSFsize;
[0075] uint8_t stringEncoding;
[0076] uint8_t sessionHandling;
[0077] };
[0078] / / Build the service mapping relationship function of MessageTransmapping, including fixed parameter configuration and floating parameter configuration
[0079] struct MessageTransmapping:public internal::Service{
[0080] static constexpr::ara::com::internal::vsomeip::types::MethodIdmethod_id=0xXX;
[0081] static constexpr uint8_t is_reliable=0x0;
[0082] static constexpr uint8_t is_fireandforget=0x0;
[0083] static constexpr::ara::com::internal::vsomeip::types::SomeipTransProps someiptransprops={8,0,0,4,4,0,4,2,0,1};
[0084] using ArrayLengthFieldType=std::uint32_t;
[0085] using StringLengthFieldType=std::uint32_t;
[0086] };
[0087] / / Functions for creating and destroying serialized parameter mapping relationships
[0088] Message*createMessageTrans(int id,const std::MessageTransmapping&content){
[0089] return new Message(id, content); / / Use the new operator to dynamically create a MessageTransmapping object
[0090] }
[0091] void destroyMessageTrans(const std::MessageTransmapping&content){
[0092] if(content!=nullptr){ / / Check if the pointer is empty
[0093] delete content; / / Use the delete operator to destroy the MessageTransmapping object
[0094] }
[0095] }
[0096] Step S20: extracting the message payload data in the registration message.
[0097] It is understandable that the message payload data in the registration message, namely, the Payload data, can be extracted. The Payload data generally refers to the useful information part carried in the data packet, excluding other contents such as the protocol header and metadata.
[0098] Step S30: Serializing the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
[0099] In a specific implementation, the message payload data may be serialized according to the serialization parameter mapping relationship. Specifically, the message payload data may be decomposed according to the serialization parameter mapping relationship, and the lenth field may be added according to the serialization parameter mapping relationship to form a data structure serialization combination code, and store it in a memory cache buffer.
[0100] This embodiment constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters after receiving the registration message sent by the service provider, then extracts the message payload data in the registration message, and then serializes the message payload data according to the serialization parameter mapping relationship to obtain the data structure serialization combination code. This embodiment first constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters on the server side, which can correspond one-to-one between the registration message and the message data serialization parameters, and then serializes the message payload data according to the serialization parameter mapping relationship, thereby realizing automated data serialization configuration.
[0101] refer to Figure 3 , Figure 3 This is a flow chart of the second embodiment of the data processing method of the present application.
[0102] Based on the above first embodiment, in this embodiment, step S30 includes:
[0103] Step S301: Decompose the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data.
[0104] Understandably, referring to Figure 4 , Figure 4 This is a flow chart of serialization processing of an embodiment of the data processing method of the present application, such as Figure 4 As shown, the serialization parameters corresponding to the registration message can be determined according to the serialization parameter mapping relationship MessageTransmapping, and then the message payload data can be decomposed according to the serialization parameters to obtain basic type data, string type data and dynamic type data.
[0105] Step S302: determining a data structure serialization combination code according to the basic type data, the string type data and the dynamic type data.
[0106] Furthermore, in order to effectively perform serialization processing, in this embodiment, the step S302 includes: determining whether there is structure data in the basic type data; if so, determining whether the structure data adds a lenth field; if so, returning to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and obtaining new basic type data, new string type data and new dynamic type data; determining the data structure serialization combination encoding according to the new basic type data, the new string type data and the new dynamic type data.
[0107] It should be understood that for basic type data, it can be determined whether there is structure data in the data. If so, it is determined whether the structure data adds a lenth field. If so, it returns to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and obtains new basic type data, new string type data and new dynamic type data; if the structure data does not add a lenth field, it is re-determined whether there is structure data. If there is no structure data in the basic type data, it can be determined again whether the above basic type data belongs to the basic type. If so, the data size specification requirements can be identified and written into the memory serialization, that is, written into the buffer. For string type data, it can be written directly into the memory serialization. For dynamic type data, it can be determined whether the dynamic data adds a lenth field. If so, it returns to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and obtains new basic type data, new string type data and new dynamic type data; if the lenth field is not added, it is re-determined whether the dynamic data adds a lenth field.
[0108] In the specific implementation, refer to Figure 5 , Figure 5 A schematic diagram of a data structure serialization combination encoding of an embodiment of a data processing method of the present application, in Figure 5 In the figure, the rightmost part is the serialized combined encoding of the data structure, where length1 is the outermost structure Struct1, length2 is the nested structure Struct2, and length3 is the dynamic array Array[n].
[0109] This embodiment decomposes the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and then determines the data structure serialization combination code according to the basic type data, string type data and dynamic type data. This embodiment decomposes the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and then determines the data structure serialization combination code according to the above data, which can automatically serialize the message payload data, thereby realizing automated data serialization configuration.
[0110] In addition, the present application embodiment provides a data processing method, referring to Figure 6 , Figure 6 This is a flowchart of the third embodiment of the data processing method of the present application.
[0111] In this embodiment, the data processing method is applied to the proxy application end, and includes the following steps:
[0112] Step S40: upon receiving the message data serialization parameters sent by the server, a serialization parameter mapping relationship between the registration message and the message data serialization parameters is constructed.
[0113] It should be noted that the execution subject of this embodiment can be a proxy application terminal or an application APP.
[0114] It is understandable that the server can send message data serialization parameters to the proxy application, and the proxy application can construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters. The method of constructing the serialization parameter mapping relationship can refer to the method of constructing the serialization parameter mapping relationship on the server, and this embodiment will not go into details.
[0115] Step S50: when receiving the data structure serialization combination code sent by the server, deserialize the data structure serialization combination code according to the serialization parameter mapping relationship to obtain the registration message.
[0116] It should be understood that the proxy server can deserialize the serialized combination encoding of the data structure according to the serialization parameter mapping relationship, referring to Figure 7 , Figure 7 This is a flowchart of the deserialization process of an embodiment of the data processing method of this application, such as Figure 7As shown, the serialization parameters corresponding to the serialization combination encoding of the data structure can be determined according to the serialization parameter mapping relationship MessageTransmapping, and then the serialization combination encoding of the data structure can be parsed according to the serialization parameters to obtain basic type data, string type data, and dynamic type data. For basic type data, it can be determined whether there is structure data in the data. If so, it is determined whether the structure data meets the lenth length. If so, it returns to the step of parsing the data according to the serialization parameter mapping relationship MessageTransmapping and the corresponding serialization parameters to obtain new basic type data, new string type data, and new dynamic type data; if the structure data does not meet the lenth length, it is re-determined whether there is structure data. If there is no structure data in the basic type data, it can be determined again whether the above basic type data belongs to the basic type. If so, the data size specification requirements can be identified and written to the specified variable. For string type data, it can be directly written to the specified variable. For dynamic type data, it can be determined whether the dynamic data meets the lenth length. If so, the data is parsed according to the serialization parameter mapping relationship MessageTransmapping and the corresponding serialization parameters to obtain new basic type data, new string type data and new dynamic type data. If it does not meet the lenth length, it is re-determined whether the dynamic data meets the lenth length.
[0117] In the specific implementation, refer to Figure 8 , Figure 8 This is a schematic diagram of the overall flow of an embodiment of the data processing method of this application, such as Figure 8 As shown, APP (Skeleton) is the service provider, Server is the server, APP (Proxy) is the proxy application, and the overall process is: 1) In the A service registration stage, the service provider application entity sends a registration message offerService A to the server, and provides the serialized parameter list table information required for the A service message in the SomeIP Option Array in the A SomeIP registration message according to the application method.
[0118] 2) When the service provider application entity sends a registration message, the server actively builds the serialization parameter mapping relationship AMessageTransmapping between service A and message data serialization parameters based on the SomeIPTransProps structure. And stores this service data serialization mapping relationship locally on the server. This enables service A to form a unique association between the message data subsequently transmitted and the required data serialization parameters.
[0119] 3) When the proxy application obtains the service information, the server sends the A service publishing message (including the serialization parameters of the message data) to the proxy application.
[0120] 4) After receiving the message published by service A, the proxy application constructs the mapping relationship between service A and the message data serialization parameters, namely, service A MessageTransmapping. This service data serialization mapping relationship is stored locally on the application side. This enables service A to uniquely associate the message data subsequently transmitted with the required data serialization parameters.
[0121] 5) During the validity period of service A, the server, according to the data serialization mapping relationship of service A, forms a data structure serialization combination encoding of the information required by service A through the data serialization process as the message payload data Pyload, and sends service A related messages 1 to N to the proxy application.
[0122] 6) During the validity period of service A, the proxy application serializes and encodes the data structure in the payload data Pyload of the service A message according to the data serialization mapping relationship of service A through the data deserialization process, and parses it into the corresponding information provided by service A (stored in different information variables).
[0123] 7) When the service provider application entity no longer provides service A, the server receives Stop Offer A and cancels the service data serialization mapping relationship by destroying the A service MessageTransmapping; then it also sends it to the proxy application to cancel the service data serialization mapping relationship and destroy the A service MessageTransmapping.
[0124] 8) If the proxy application no longer needs the content of service A, it destroys the MessageTransmapping of service A and cancels the serialization mapping relationship of the service data; the synchronous proxy application sends Stop Offer A to the server, and the server cancels the serialization mapping relationship of the service data by destroying the MessageTransmapping of service A.
[0125] When receiving the message data serialization parameters sent by the server, this embodiment constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters. When receiving the data structure serialization combination code sent by the server, the data structure serialization combination code is deserialized according to the serialization parameter mapping relationship to obtain the registration message. This embodiment can realize automated data deserialization configuration by having the proxy application end deserialize the data structure serialization combination code according to the serialization parameter mapping relationship when receiving the message data serialization parameters sent by the server to obtain the registration message.
[0126] Reference Fig. 9 , Fig. 9 This is a structural block diagram of the first embodiment of the data processing device of the present application.
[0127] like Fig. 9 As shown, the data processing device proposed in the embodiment of the present application is applied to the server, including:
[0128] The data receiving module 10 is used to construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters after receiving the registration message sent by the service provider;
[0129] A data extraction module 20, used to extract message payload data in the registration message;
[0130] The serialization processing module 30 is used to perform serialization processing on the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
[0131] This embodiment constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters after receiving the registration message sent by the service provider, then extracts the message payload data in the registration message, and then serializes the message payload data according to the serialization parameter mapping relationship to obtain the data structure serialization combination code. This embodiment first constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters on the server side, which can correspond one-to-one between the registration message and the message data serialization parameters, and then serializes the message payload data according to the serialization parameter mapping relationship, thereby realizing automated data serialization configuration.
[0132] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present application. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0133] In addition, for technical details not fully described in this embodiment, please refer to the data processing method provided in any embodiment of the present application, which will not be repeated here.
[0134] Based on the above-mentioned first embodiment of the data processing device of the present application, a second embodiment of the data processing device of the present application is proposed.
[0135] In this embodiment, the data receiving module 10 is also used to obtain the option array in the registration message after receiving the registration message sent by the service provider; obtain the zero-terminated configuration string in the option array, and determine the fixed parameter configuration and the floating parameter configuration according to the zero-terminated configuration string; determine the message data serialization parameters according to the fixed parameter configuration and the floating parameter configuration, and construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters.
[0136] Furthermore, the serialization processing module 30 is also used to decompose the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data; and determine the data structure serialization combination encoding according to the basic type data, the string type data and the dynamic type data.
[0137] Furthermore, the serialization processing module 30 is also used to determine whether there is structure data in the basic type data; if so, determine whether the structure data adds a lenth field; if so, return to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, obtain new basic type data, new string type data and new dynamic type data; determine the data structure serialization combination code according to the new basic type data, the new string type data and the new dynamic type data.
[0138] Other embodiments or specific implementations of the data processing device of the present application can refer to the above-mentioned method embodiments and will not be described in detail here.
[0139] Reference Fig.10 , Fig.10 This is a structural block diagram of the third embodiment of the data processing device of the present application.
[0140] like Fig.10 As shown, the data processing device proposed in the embodiment of the present application is applied to the proxy application end, including:
[0141] A mapping relationship building module 40 is used to build a serialization parameter mapping relationship between the registration message and the message data serialization parameter when receiving the message data serialization parameter sent by the server;
[0142] The deserialization processing module 50 is used to, when receiving the data structure serialization combination code sent by the server, deserialize the data structure serialization combination code according to the serialization parameter mapping relationship to obtain the registration message.
[0143] The present application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method in the above-mentioned embodiment 1.
[0144] Reference below Fig.11 , which shows a schematic diagram of the structure of a data processing device suitable for implementing an embodiment of the present application. The data processing device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The data processing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0145] like Fig.11 As shown, the data processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data processing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data processing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0146] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0147] The data processing device provided by the present application adopts the data processing method in the above embodiment to solve the technical problem of how to realize automated data serialization configuration. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, and the other technical features in the data processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0148] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0150] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data processing method in the above-mentioned embodiment.
[0151] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0152] The computer-readable storage medium may be included in a data processing device, or may exist independently without being incorporated into a data processing device.
[0153] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a data processing device, the data processing device: after receiving a registration message sent by a service provider, constructs a serialization parameter mapping relationship between the registration message and the message data serialization parameters; extracts the message payload data in the registration message; and serializes the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
[0154] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0157] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data processing method, and can solve the technical problem of how to realize automated data serialization configuration. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the data processing method provided in the above-mentioned embodiment, and will not be repeated here.
[0158] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method when executed by a processor.
[0159] The computer program product provided by this application can solve the technical problem of how to realize automated data serialization configuration. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the data processing method provided by the above embodiment, which will not be repeated here.
[0160] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data processing method, applied to a server, characterized in that: The data processing method comprises the following steps: After receiving the registration message sent by the service provider, construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters; Extracting message payload data from the registration message; The message payload data is serialized according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
2. The data processing method according to claim 1, characterized in that: The step of constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameter after receiving the registration message sent by the service provider specifically includes: After receiving the registration message sent by the service provider, obtaining the option array in the registration message; Obtaining a zero-terminated configuration string in the option array, and determining a fixed parameter configuration and a floating parameter configuration according to the zero-terminated configuration string; The message data serialization parameters are determined according to the fixed parameter configuration and the floating parameter configuration, and a serialization parameter mapping relationship between the registration message and the message data serialization parameters is constructed.
3. The data processing method according to claim 1, characterized in that: The step of serializing the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code specifically includes: Decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data; A data structure serialization combination encoding is determined according to the basic type data, the string type data and the dynamic type data.
4. The data processing method according to claim 3, characterized in that: The step of determining the serialized combined encoding of the data structure according to the basic type data, the string type data and the dynamic type data specifically includes: Determine whether there is structure data in the basic type data; If yes, determine whether to add a lenth field to the structure data; If yes, return to the step of decomposing the message payload data according to the serialization parameter mapping relationship to obtain basic type data, string type data and dynamic type data, and obtain new basic type data, new string type data and new dynamic type data; The data structure serialization combination encoding is determined according to the new basic type data, the new string type data and the new dynamic type data.
5. A data processing method, applied to a proxy application, characterized in that: The data processing method comprises the following steps: Upon receiving the message data serialization parameters sent by the server, constructing a serialization parameter mapping relationship between the registration message and the message data serialization parameters; When the data structure serialization combination code sent by the server is received, the data structure serialization combination code is deserialized according to the serialization parameter mapping relationship to obtain the registration message.
6. A data processing device, applied to a server, characterized in that: The data processing device comprises: A data receiving module, configured to construct a serialization parameter mapping relationship between the registration message and the message data serialization parameters after receiving the registration message sent by the service provider; A data extraction module, used to extract message payload data in the registration message; The serialization processing module is used to perform serialization processing on the message payload data according to the serialization parameter mapping relationship to obtain a data structure serialization combination code.
7. A data processing device, applied to a proxy application end, characterized in that: The data processing device comprises: A mapping relationship building module, used to build a serialization parameter mapping relationship between the registration message and the message data serialization parameter when receiving the message data serialization parameter sent by the server; The deserialization processing module is used to, when receiving the data structure serialization combination code sent by the server, deserialize the data structure serialization combination code according to the serialization parameter mapping relationship to obtain the registration message.
8. A data processing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data processing method according to any one of claims 1 to 5 or 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 5 or 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 5 or 6 are implemented.