CN111970102B - Data processing method, device, electronic equipment and storage medium - Google Patents

Data processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111970102B
CN111970102B CN202010899538.6A CN202010899538A CN111970102B CN 111970102 B CN111970102 B CN 111970102B CN 202010899538 A CN202010899538 A CN 202010899538A CN 111970102 B CN111970102 B CN 111970102B
Authority
CN
China
Prior art keywords
message
electronic device
identifier
field
information
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010899538.6A
Other languages
Chinese (zh)
Other versions
CN111970102A (en
Inventor
尹康凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010899538.6A priority Critical patent/CN111970102B/en
Publication of CN111970102A publication Critical patent/CN111970102A/en
Priority to PCT/CN2021/107458 priority patent/WO2022042140A1/en
Application granted granted Critical
Publication of CN111970102B publication Critical patent/CN111970102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a data processing method, a device, electronic equipment and a storage medium, wherein the data processing method comprises the following steps: determining first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action; and transmitting the first information to the second electronic equipment in the process of message interaction with the second electronic equipment.

Description

Data processing method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications, and in particular, to a data processing method, apparatus, electronic device, and storage medium.
Background
In the related art, for transactions that need to be completed through at least two times of data interaction, such as security authentication, over the air technology (OTA, over the Air Technology) upgrade, etc., no general processing flow is applicable to different transactions.
Disclosure of Invention
In view of this, it is desirable to provide a data processing method, apparatus, electronic device, and storage medium, so as to solve the technical problem that there is no general processing procedure in the related art that is applicable to different transactions that can be completed through at least two times of data interaction.
In order to achieve the above purpose, the technical scheme of the application is realized as follows:
the embodiment of the application provides a data processing method applied to first electronic equipment, comprising the following steps: determining first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action;
and transmitting the first information to the second electronic equipment in the process of message interaction with the second electronic equipment.
The scheme further comprises the following steps:
transmitting the first identifier and the second identifier to the second electronic device;
the transmitting the first information to the second electronic device in the process of message interaction with the second electronic device comprises the following steps:
under the condition that a first message sent by the second electronic equipment is received, carrying out message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes the receipt of the first and second identifications by the second electronic device.
The scheme further comprises the following steps:
receiving the first identifier and the second identifier sent by the second electronic device;
the transmitting the first information to the second electronic device in the process of message interaction with the second electronic device comprises the following steps:
and under the condition that the first identifier and the second identifier are confirmed to be valid, carrying out message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
According to the scheme, the message interacted by the first electronic equipment and the second electronic equipment is packaged according to the set message format; wherein, the message format of the setting includes: a first field, a second field, a third field, and a fourth field; the first field is used for writing a first sequence number; the first serial number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second serial number is used for identifying that the electronic equipment has received all valid messages with the serial number smaller than or equal to the second serial number; the third field characterizes the number of valid messages that the electronic device can cache; the valid message characterizes a message carrying data; the fourth field is used to carry data.
In the above scheme, in the process of performing message interaction with the receiving end, the transmitting the first information to the second electronic device includes:
generating at least one second message based on the first information; each second message in the at least one second message correspondingly carries all or part of data in the first information;
and sending the at least one second message to the second electronic device.
In the above solution, the sending the at least one second message to the second electronic device includes:
and continuously transmitting at least one second message in the at least one second message to the second electronic device based on a third field in the message received by the first electronic device last time.
In the above solution, in a case where a third field in a message received by the first electronic device last time indicates that a number of valid messages that the second electronic device can currently cache is greater than or equal to a total message amount of the at least one second message, the continuously sending at least one second message in the at least one second message to the second electronic device includes: and continuously transmitting all second messages in the at least one second message to the second electronic equipment.
The scheme further comprises the following steps: retransmitting at least one second message of the at least one second message to the second electronic device based on the first sequence number and the second sequence number if the third sequence number is different from the fourth sequence number; the third sequence number represents a sequence number represented by a second field in the last received message sent by the second electronic device; and the fourth serial number represents the serial number represented by the first field in the second message sent by the first electronic device for the last time.
According to the scheme, when the fourth field of the third message sent by the first electronic device last time is empty, the sequence number represented by the first field in the third message is the same as the sequence number represented by the first field in the effective message sent by the first electronic device last time.
The embodiment of the application also provides a data processing device, which comprises:
a determining unit configured to determine first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action;
And the message interaction unit is used for transmitting the first information to the second electronic equipment in the process of carrying out message interaction with the second electronic equipment.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is adapted to implement any one of the data processing methods described above when the computer program is run.
The embodiment of the application also provides a storage medium, on which a computer program is stored, the computer program implementing any one of the above data processing methods when executed by a processor.
According to the method, the service requested by the first identifier is represented, the second identifier represents the execution action related to the service, the first electronic device carries the first information determined based on the first identifier and the second identifier through the interaction message in the process of carrying out message interaction with the second electronic device, and the data processing method can be suitable for different transactions which can be completed through at least two times of interaction. After sending a message, the first electronic device can send the next message without waiting for a response message corresponding to the message, so that the data interaction efficiency and the data processing efficiency can be improved.
Drawings
Fig. 1 is an interaction diagram of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic implementation flow chart of a first electronic device transmitting first information in the data processing method provided in the embodiment of the present application;
fig. 3 is a schematic flowchart of an implementation of a first electronic device transmitting first information in a data processing method according to another embodiment of the present application;
FIG. 4 is an interaction diagram of a data processing method according to another embodiment of the present application;
FIG. 5 is an interaction diagram of a data processing method according to another embodiment of the present application;
FIG. 6 is an interaction diagram of a data processing method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a data processing apparatus according to another embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a data processing apparatus according to another embodiment of the present disclosure;
fig. 10 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
In the related art, different transactions that can be completed only after at least two times of data interaction, for example, security authentication, negotiation key, OTA upgrade, etc., generally correspond to different processing flows, and no general processing flow is applicable to different transactions that can be completed only after at least two times of data interaction. The OTA upgrading method comprises the following steps:
The electronic equipment sends an upgrading request carrying version information to a server, the server determines a corresponding upgrading packet based on the version information carried by the received upgrading request, the upgrading packet is packaged into a plurality of data packets, and the server sends each data packet corresponding to the upgrading packet to the electronic equipment. In the process that the server sends the data packet corresponding to the upgrade packet to the electronic equipment, the electronic equipment sends a corresponding response message or a confirmation message when receiving the first data packet sent by the server, the response message or the confirmation message is used for identifying that the corresponding data packet is received, and the server sends a second data packet to the electronic equipment when receiving the response message sent by the electronic equipment; and the server retransmits the first data packet under the condition that the response message sent by the electronic equipment is not received. And the server sends a corresponding notification message to the electronic equipment under the condition that all data packets corresponding to the upgrade package are sent to the electronic equipment, and the electronic equipment sends a response message corresponding to the notification message to the server when receiving the notification message.
In order to solve the technical problems, an embodiment of the present application provides a data processing method, which determines first information based on a first identifier and a second identifier; and transmitting the first information to the second electronic device through message interaction with the second electronic device. The data processing method may be adapted to different transactions requiring at least two data interactions to complete. Wherein the first identifier characterizes the requested service; a second identifier characterizes the service-related execution action; the first information characterizes data that is required to be sent to the second electronic device to complete the performing action.
The technical scheme of the application is further elaborated below with reference to the drawings in the specification and the specific embodiments.
Fig. 1 shows an interaction diagram of a data processing method according to an embodiment of the present application. Referring to fig. 1, the data processing method in the present embodiment includes:
s101: the first electronic device determines first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data that is required to be sent to a second electronic device to complete the performing act.
Here, the first identity may correspond to a service instance identity (SIID, service Instance ID), or to an application layer service identity. The service instance is used for realizing a corresponding service, and the application layer service is used for providing the corresponding service, wherein the service comprises at least one of OTA upgrading, security authentication and negotiation secret key.
The second identifier may be an Instance Identifier (IID) for identifying an Instance corresponding to the application layer service, the Instance characterizing an execution action associated with the service corresponding to the first identifier. In practical applications, examples may include at least one of: OTA upgrade instance, security authentication instance, negotiation key instance.
It should be noted that one first identifier corresponds to at least one second identifier. A second, different identifier corresponding to the same first identifier characterizes a different execution action associated with the service corresponding to the first identifier.
When the first electronic device is a device requesting the OTA upgrade service, the first information may include information such as an identifier and a version number of an object to be upgraded; the object to be upgraded includes an application in the first electronic device, firmware in the first electronic device, and the like. Firmware refers to a program written in an erasable programmable read-only Memory (EPROM, erasable Programmable ROM) or electrically erasable programmable read-only Memory (EEPROM, electrically erasable Programmable Read-only Memory) of an electronic device. When the first electronic device provides an upgrade service for the OTA server, the first information comprises a corresponding upgrade package, and the upgrade package is determined based on the identification and the version number of the object to be upgraded.
In the case that the service of the first identifier representation request corresponds to security authentication, the first information includes related data that the first electronic device needs to send to the second electronic device for security authentication.
S102: the first electronic equipment transmits the first information to the second electronic equipment in the process of message interaction with the second electronic equipment.
Here, the first electronic device may encapsulate the first information into at least one message, and transmit the at least one message to the second electronic device. Wherein the message is used for carrying part or all of the data in the first information. The first electronic device may continuously send all messages corresponding to the first information to the second electronic device.
When the first information is encapsulated into at least two messages, the first electronic device may also send all messages in the at least two messages to the second electronic device in batches. The number of messages per batch is at least one. When the number of the messages of each batch is at least two, the first electronic device continuously sends all the messages of each batch to the second electronic device. When all the messages included in the first information are sent in at least two batches, the first electronic device continuously sends all the messages in at least two messages in the first batch to the second electronic device, and when receiving a confirmation message sent by the second electronic device aiming at the messages in the first batch, at least one message corresponding to the first information is sent to the second electronic device. The confirmation message characterizes at least one message corresponding to the first information received by the second electronic device.
When receiving any message representation sent by the second electronic device and not completely receiving all data corresponding to the first information sent by the first electronic device, the first electronic device determines corresponding packet loss data from the first information based on the identification of the received data represented by the message representation sent by the second electronic device, and resends the determined packet loss data to the second electronic device.
In the scheme provided by the embodiment, the service requested is represented by the first identifier, the execution action related to the service is represented by the second identifier, the first electronic device carries the first information determined based on the first identifier and the second identifier through the interaction message in the process of carrying out message interaction with the second electronic device, and the data processing method can be suitable for different transactions which can be completed after at least two times of data interaction. After sending a message, the first electronic device can send the next message without waiting for a response message corresponding to the message, so that the data interaction efficiency and the data processing efficiency can be improved.
In an embodiment, the message that the first electronic device interacts with the second electronic device is encapsulated according to a set message format; wherein,,
the set message format includes: a first field, a second field, a third field, and a fourth field; the first field is used for writing a first sequence number; the written first serial number is a use serial number and is used for identifying data carried in the corresponding message and tracking whether the message is sent or not; the second field is used for writing a second sequence number; the second serial number is a confirmation serial number and is used for identifying that the electronic equipment has received all valid messages with the serial number smaller than or equal to the second serial number and notifying the opposite party that all messages before the serial number represented by the Ack have been received; the third field is a window field and is used for representing the number of effective messages which can be cached by the electronic equipment and prompting the opposite party, and before any Ack message is not received, the opposite party can send more messages to the my party; the valid message characterizes a message carrying data; the fourth field is used to carry data.
In practical application, the first field corresponds to a Seq, and is used for identifying an effective message, wherein the effective message characterizes a message with data carried in the fourth field; the second field corresponds to Ack and the third field corresponds to window Win. Here, the first sequence number in the first field of the different valid message is consecutive and incremented; the second sequence number written by the second field cannot overwrite the first sequence number in the first field of the non-received valid message. For example, the first electronic device continuously sends 5 pieces of effective information to the second electronic device, the first fields of the 5 pieces of effective information are 1, 2, 3, 4 and 5, respectively, and when the second electronic device receives the effective information with the first sequence number of 4 of the first field and the first sequence number of which is corresponding to 1, 2, 3 and 5, the second electronic device does not receive the effective information with the first sequence number of 4 of the first field, so that when the second electronic device replies to the effective information sent by the first electronic device, the second sequence number written in the second field of the corresponding information is 3, which indicates that the second electronic device has received all the effective information with the first sequence number of less than or equal to 3 sent by the first electronic device.
In practice, the Seq may be incremented from 0 by an increment value of 1, and then incremented to (2 32 -1) the Seq correspondence of the next valid message is 0. Here, the Seq may be incremented from 1 by an increment value of 1, and from the Seq to 2 32 When the Seq correspondence of the next valid message is 1.
The second sequence number written in the second field is dynamically updated along with the first sequence number corresponding to the first field in the valid message received by the electronic equipment. Here, when the fourth field in any message received by the electronic device is empty, it characterizes that the message is not a valid message, and the electronic device does not need to answer to the message, i.e. it does not need to send an acknowledgement message for the message identifying that the message has been received. That is, after receiving the message, the electronic device does not separately send an acknowledgement message for identifying that the message has been received without having to send a valid message to the electronic device that sent the message; in the case that a valid message needs to be sent to the electronic device that sent the message, the sequence number of the second field representation in the first valid message sent by the electronic device after receiving the message is the same as the sequence number of the second field representation in the last message sent before receiving the message.
In practical application, the third field characterizes that the number of the effective messages which can be cached by the electronic device is greater than or equal to 2, so that the electronic device sending the effective messages can continuously send at least two effective messages to the electronic device, and the electronic device receiving the effective messages can answer when receiving the at least two effective messages, and does not need to answer for each effective message, thereby improving the message transmission efficiency.
It should be noted that, the number of valid messages that the third field characterizes the electronic device may be determined based on the corresponding buffer space and the maximum number of bits occupied by one valid message. The number of currently cacheable active messages represented by the third field is dynamically updated as the progress of the processing of the active messages. For example, the first electronic device updates the number of valid messages currently cacheable by the first electronic device in real time when the first electronic device finishes processing at least one cached valid message.
In the initialization process, the first electronic device and the second electronic device initialize the following parameters:
LocalSeq,LocalAck,LocalWin;RemoteSeq,RemoteAck,RemoteWin。
when the first electronic device initializes the parameters, the LocalSeq corresponds to a first field of the first electronic device, the LocalAck corresponds to a second field of the first electronic device, and the LocalWin corresponds to a third field of the first electronic device; remoteSeq corresponds to a first field of the second electronic device, remoteAck corresponds to a second field of the second electronic device, and RemoteWin corresponds to a third field of the second electronic device. The method comprises the steps that LocalWin characterizes the number of effective messages which can be currently cached by first electronic equipment, and is used for identifying the total message quantity of the effective messages which can be continuously sent to the first electronic equipment by second electronic equipment; remoteWin characterizes the number of valid messages currently cacheable by the second electronic device, identifying the total amount of messages that the first electronic device can continuously send valid messages to the second electronic device. For example, when remotewin=14, the token first electronic device may currently send 14 valid messages continuously to the second electronic device.
When the second electronic device initializes the parameters, the LocalSeq corresponds to a first field of the second electronic device, the LocalAck corresponds to a second field of the second electronic device, and the LocalWin corresponds to a third field of the second electronic device; remoteSeq corresponds to a first field of the first electronic device, remoteAck corresponds to a second field of the first electronic device, and RemoteWin corresponds to a third field of the first electronic device. The LocalWin characterizes the number of the effective messages which can be currently cached by the second electronic equipment and is used for identifying the total message quantity of the effective messages which can be continuously sent to the second electronic equipment by the first electronic equipment; remoteWin characterizes the number of valid messages that the first electronic device can currently cache, and is used to identify the total number of messages that the second electronic device can continuously send valid messages to the first electronic device.
It should be noted that, during the initialization process, the third field characterizes that the number of valid messages that can be cached by the electronic device is greater than or equal to 2.
In the scheme provided by the embodiment, whether the messages are sent or not is tracked through the use sequence numbers written in the first field, so that the messages can be sent orderly, the confirmation sequence numbers written in the second field are used for notifying the opposite side that all the messages before the sequence numbers represented by the Ack are received, the reliable transmission of the messages can be ensured, the electronic equipment can be ensured to be capable of receiving all the messages finally, the opposite side is prompted through the third field, the opposite side can send more messages to the my side before any Ack message is not received, the electronic equipment does not need to answer every time when receiving one message, and the electronic equipment can continuously send at least two messages, so that the transmission efficiency of the messages can be improved.
In an embodiment, fig. 2 is a schematic diagram illustrating an implementation flow of a first electronic device transmitting first information in the data processing method provided in the embodiment of the present application. As shown in fig. 2, in a process of performing message interaction with a receiving end, the first electronic device transmits the first information to the second electronic device, and the method includes:
s201: generating at least one second message based on the first information; each second message in the at least one second message correspondingly carries all or part of the data in the first information.
The first electronic device encapsulates the first information into at least one second message according to the set message format. Here, when the number of bits occupied by the first information is greater than the maximum number of bits corresponding to data that can be carried by the fourth field of the set message format, the first information is encapsulated into at least two second messages. And the data carried by all the second messages in the at least two second messages form all the data of the first information, and the number of bits occupied by the data carried by the fourth field of each second message is smaller than or equal to the maximum number of bits corresponding to the data carried by the fourth field of the set message format. The second message may be marked as ActionMessage.
Since the fourth fields in the second message all carry data, the second message is a valid message.
The second sequence number written in the second field in each second message is determined based on the sequence number represented by the first field in the valid message last sent by the second electronic device and received by the first electronic device. The third field in each second message is used to identify the number of valid messages that the first electronic device is currently buffering in order for the second electronic device to determine the total number of valid messages that can be continuously sent to the first electronic device.
S202: and sending the at least one second message to the second electronic device.
Here, the specific implementation process of sending at least one second message to the second electronic device refers to the description related to the transmission of the first information to the second electronic device in S102, which is not described herein in detail.
In the scheme provided by the embodiment, the first information is encapsulated into at least one second message according to the set message format, and when the number of the second messages corresponding to the first information is at least two, because the number of the effective messages which can be buffered initially by the second electronic device is greater than or equal to 2, the first electronic device can continuously send at least two second messages carrying the data of the first information to the second electronic device, that is, after sending one second message, the next second message is not required to be sent after receiving the response message corresponding to the second message, thereby improving the interaction efficiency and the transmission efficiency of the messages. After receiving the effective message sent by the second electronic device, the first electronic device can bear the data of the first information in the message sent by the second electronic device, and can also characterize the sequence number corresponding to the received effective message, so that the data processing efficiency can be improved.
In an embodiment, the sending the at least one second message to the second electronic device includes: and continuously transmitting at least one second message in the at least one second message to the second electronic device based on a third field in the message received by the first electronic device last time.
The first electronic device determines the number of valid messages that can be currently cached by the second electronic device based on the third field in the last received message, and continuously sends at least one second message of the at least one second message to the second electronic device based on the number of valid messages that can be currently cached by the second electronic device, so that all second messages corresponding to the first information are transmitted to the second electronic device.
In the scheme provided by the embodiment, since the third field in the last received message of the first electronic device characterizes the number of the valid messages that can be cached currently by the second electronic device, the number of the valid messages that can be cached initially by the second electronic device is greater than or equal to 2, the first electronic device can continuously send at least two pieces of second messages carrying the data of the first information to the second electronic device, and the efficiency of the second messages can be improved.
In an embodiment, in a case that a third field in the last received message of the first electronic device indicates that the number of valid messages currently cacheable by the second electronic device is greater than or equal to the total message amount of the at least one second message, the continuously sending at least one second message of the at least one second message to the second electronic device includes: and continuously transmitting all second messages in the at least one second message to the second electronic equipment.
And when the number of the valid messages which can be cached currently by the second electronic device is larger than or equal to the total number of the at least one second message generated based on the first information, the first electronic device continuously sends all the second messages in the at least one second message to the second electronic device under the condition that the first electronic device determines the number of the valid messages which can be cached currently by the second electronic device based on the third field in the last received message.
In practical application, when the number of the effective messages which can be currently cached by the second electronic device is 14, and the total message amount of the second messages generated based on the first information is 10, the first electronic device continuously sends the 10 second messages to the second electronic device.
It should be noted that, when the number of the messages that the second electronic device can currently buffer is smaller than the total number of the messages of the at least one second message generated based on the first information, the first electronic device continuously sends the first number of the second messages in the at least one second message corresponding to the first information to the second electronic device. The first number is less than or equal to the number of messages currently cacheable by the second electronic device. The first number may be greater than or equal to 2.
And the second electronic equipment updates the number of the effective messages which can be currently cached by the second electronic equipment under the condition that the second electronic equipment receives at least one second message and the at least one second message is processed.
When the first electronic device receives a third message sent by the second electronic device, the first electronic device determines whether the second electronic device has received all second messages in the first number of second messages based on the second sequence number represented by the second field in the third message. The third message is used to identify that the second electronic device has received at least one second message sent by the first electronic device.
Here, when the second sequence number represented by the second field in the third message is equal to the first sequence number with the largest value corresponding to the first field in the first number of first messages, it is represented whether all the second messages in the first number of second messages have been received by the second electronic device. The first electronic device continuously sends a second number of second messages to the second electronic device based on a third field in the third message characterizing the number of valid messages that the second electronic device is currently caching. The second messages of the second quantity are all second messages which are not sent in the second messages corresponding to the first information.
And when the second sequence number represented by the second field in the third message is smaller than the first sequence number with the largest value corresponding to the first field of the first number of the first messages, representing that the second electronic equipment receives part of the second messages in the first number of the second messages. The first electronic device characterizes the number of valid messages currently cacheable by the second electronic device based on a third field in the third message, and continuously sends a third number of second messages to the second electronic device based on the second field in the third message. The third number of second messages includes second messages which are not sent in the second messages corresponding to the first information and second messages which are not received by the second electronic equipment in the first number of second messages. The second message which is not received by the second electronic equipment represents the second message of which the first sequence number of the first field is larger than the second sequence number corresponding to the second field in the third message.
In the solution provided in this embodiment, when the third field in the last received message of the first electronic device indicates that the number of the valid messages that can be currently cached by the second electronic device is greater than or equal to the total message amount of the at least one second message, the second electronic device may be indicated to cache all the second messages corresponding to the first information, so that the first electronic device continuously sends all the second messages corresponding to the first information to the second electronic device, and transmission efficiency of the second messages may be improved.
In an embodiment, fig. 3 is a schematic flow chart illustrating an implementation of the first electronic device transmitting the first information in the data processing method according to another embodiment of the present application. As shown in fig. 3, on the basis of fig. 2, when the at least one second message is sent to the second electronic device, the method further includes:
s203: retransmitting at least one second message of the at least one second message to the second electronic device based on the first sequence number and the second sequence number if the third sequence number is different from the fourth sequence number; the third sequence number represents a sequence number represented by a second field in the last received message sent by the second electronic device; and the fourth serial number represents the serial number represented by the first field in the second message sent by the first electronic device for the last time.
Here, the second electronic device is characterized as not successfully receiving all the second messages sent by the first electronic device, if the third sequence number and the fourth sequence number are different.
The first electronic equipment determines a second message corresponding to a fourth sequence number larger than the third sequence number based on the third sequence number and the fourth sequence number, obtains a second message which is not received by the second electronic equipment, and retransmits the determined second message to the second electronic equipment.
In the scheme provided by the embodiment, under the condition that the third serial number is different from the fourth serial number, the second electronic device is characterized in that all the second messages sent by the first electronic device are not received by the second electronic device, and the first electronic device can determine the second messages which are not received by the second electronic device from the second messages sent by the first electronic device based on the third serial number and the fourth serial number, so that the determined second messages are retransmitted to the second electronic device, and therefore the reliability of message transmission is ensured, and all the second messages corresponding to the first information can be finally received by the second electronic device.
In an embodiment, the first electronic device corresponds to a service requester, and fig. 4 shows an interaction diagram of a data processing method according to another embodiment of the present application. Referring to fig. 4, the data processing method in the present embodiment includes:
s401: the first electronic device sends the first identifier and the second identifier to the second electronic device.
The first electronic device may determine, based on the detected user operation, a service requested by the user, thereby determining a corresponding first identifier and second identifier, and send the first identifier and the second identifier to the second electronic device. When the first identifier corresponds to at least two second identifiers, the first electronic device can determine all execution actions related to the service based on the set implementation flow corresponding to the service requested by the user, and determine the current execution action based on the set execution sequence corresponding to the execution actions related to the service, so as to obtain the corresponding second identifiers.
In practical applications, the first electronic device may send a start message, for example, actionStart, to the second electronic device when the first electronic device establishes a communication connection with the second electronic device. The startup message includes a first field, a second field, a third field and a fourth field, where the first field seq=1, the second field ack=0, the third field Win is used to identify the number of valid messages that the first electronic device can currently cache, and the fourth field is used to carry the first identifier and the second identifier.
S402: the first electronic device determines first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data that is required to be sent to a second electronic device to complete the performing act.
In this embodiment, S402 refers to the description that the first electronic device determines the first information based on the first identifier and the second identifier in the foregoing embodiment, which is not described herein.
Here, the first electronic device may execute S401 first and then S402, may execute S402 first and then S401, and may execute S401 and S402 simultaneously.
S403: the second electronic device sends a first message to the first electronic device; the first message characterizes the receipt of the first and second identifications by the second electronic device.
And the second electronic equipment sends a first message to the first electronic equipment under the condition of receiving the first identifier and the second identifier sent by the first electronic equipment so as to inform the first electronic equipment that the second electronic equipment has received the first identifier and the second identifier.
In practical application, the second electronic device stores data of a third field in the ActionStart under the condition that the second electronic device receives the ActionStart carrying the first identifier and the second identifier, and sends an ActionMessage to the first electronic device. The ActionMessage is used for replying to the ActionStart and representing that the ActionStart is received. In the case that the first sequence number written in the first field in ActionStart is 1, the second sequence number written in the second field in the ActionMessage is 1. The data (at least one of numbers and letters) written by the third field in the ActionMessage characterizes the number of valid messages that the second electronic device can currently cache.
Here, the fourth field in the ActionMessage may be empty, where the ActionMessage is used as a confirmation message, and is only used to answer to the ActionStart sent by the first electronic device, so as to notify the first electronic device that the first identifier and the second identifier have been received by the second electronic device currently. At this time, the first sequence number written in the first field in the ActionMessage is 0, which indicates that the fourth field in the ActionMessage is empty.
The fourth field in the ActionMessage may also carry part or all of data in second information, where the second information is determined by the second electronic device based on the first identifier and the second identifier, and the second information characterizes data that needs to be sent to the first electronic device to complete the execution action corresponding to the second identifier. At this time, the first sequence number written in the first field in the ActionMessage is 1, which indicates that the fourth field in the ActionMessage carries data.
S404: and under the condition that the first electronic equipment receives the first message sent by the second electronic equipment, the first electronic equipment performs message interaction with the second electronic equipment, and the first information is transmitted to the second electronic equipment.
Here, the first electronic device transmits the first information determined in S402 to the second electronic device, in the case of receiving the first message sent by the second electronic device. The specific implementation process is referred to the related description in the above embodiments, and is not repeated here.
In an actual application, when receiving an ActionMessage sent by a second electronic device based on ActionStart, the first electronic device stores data of a third field in the ActionMessage, so that the data based on the third field in the ActionMessage transmits first information to the second electronic device.
In an actual application, the data corresponding to the first information is carried in a fourth field in at least one ActionMessage.
It should be noted that, after the first electronic device sends the first identifier and the second identifier to the second electronic device, and when the first message sent by the second electronic device is not received within the set duration, the first electronic device characterizes that the second electronic device does not receive the first identifier and the second identifier, where S401 is executed again to resend the first identifier and the second identifier to the second electronic device.
It should be noted that, when the first electronic device performs the execution action related to the service corresponding to the first identifier, an end request may be sent to the second electronic device to release the related resource, where the end request may correspond to the TransactionEndReq.
And when receiving the end request sent by the first electronic device, the second electronic device sends a message for identifying the end of confirmation, for example, genericEndResp, to the first electronic device based on the analysis results of all the received ActionMessage, and marks the execution action corresponding to the second identification as completed. Here, when the analysis result indicates that all ActionMessage analysis is normal, the GenericEndResp characterization is performed normally, and the second electronic device may splice the data carried in the fourth field in all the received ActionMessage based on the sequence numbers of the first field characterizations in all the ActionMessage, so as to obtain the first information; when the analysis result represents any ActionMessage analysis exception, the GenericEndResp represents an execution exception.
When the first electronic device receives the GenericEndResp sent by the second electronic device, the processing result can be reported to the application layer based on the GenericEndResp. Here, when the GenericEndResp characterizes an execution exception, a notification message for identifying a processing failure is reported to the application layer; when the GenericEndResp token performs normally, a notification message for identifying that the process was successful is reported to the application layer. The notification message carries a first identifier and a second identifier.
In the scheme provided by the embodiment, after the first electronic device sends the first identifier and the second identifier to the second electronic device, when receiving the first message sent by the second electronic device and used for representing that the first identifier and the second identifier are received, the first electronic device performs message interaction with the second electronic device, and transmits the first information determined based on the first identifier and the second identifier to the second electronic device, so that the second device can receive the first identifier and the second identifier, and executing actions related to the service requested by the first electronic device are completed based on the first information, so that the first electronic device can acquire the corresponding service.
In an embodiment, the first electronic device corresponds to a service provider, and fig. 5 shows an interaction diagram of a data processing method according to another embodiment of the present application. Referring to fig. 5, the data processing method in the present embodiment includes:
S501: the second electronic device sends the first identifier and the second identifier to the first electronic device.
In practical application, the second electronic device may send a start message to the first electronic device when the second electronic device establishes a communication connection with the first electronic device. For example, actionStart. The startup message comprises a first field, a second field, a third field and a fourth field, wherein the first field seq=1, the second field ack=0, the third field Window is used for identifying the number of the valid messages which can be currently cached by the second electronic device, and the fourth field carries a first identifier and a second identifier.
S502: and the first electronic equipment receives the first identifier and the second identifier sent by the second electronic equipment.
S503: and under the condition that the first identifier and the second identifier are confirmed to be valid, the first electronic device performs message interaction with the second electronic device, and transmits the first information to the second electronic device.
And under the condition that the first electronic equipment receives the first identifier and the second identifier sent by the second electronic equipment, the first electronic equipment checks the first identifier and the second identifier sent by the second electronic equipment based on the set first identifier and the set second identifier to obtain a check result. When the first electronic equipment searches the first identifier which is the same as or matched with the first identifier sent by the second electronic equipment from the set first identifier, the first identifier sent by the second electronic equipment is characterized to be valid; and when the first electronic equipment searches the first identifier which is different from or not matched with the first identifier sent by the second electronic equipment from the set first identifier, the first identifier sent by the second electronic equipment is invalid. When the first electronic equipment searches the second identifier which is the same as or matched with the second identifier sent by the second electronic equipment from the set second identifier, the second identifier sent by the second electronic equipment is characterized to be valid; and when the first electronic equipment searches the second identifier which is different from or not matched with the second identifier sent by the second electronic equipment from the set second identifier, the second identifier sent by the second electronic equipment is invalid.
And under the condition that the verification result indicates that the first identifier and the second identifier sent by the second electronic equipment are both effective, transmitting the first information to the second electronic equipment through message interaction with the second electronic equipment. The first electronic device may determine, based on a third field in the startup message sent by the second electronic device, a number of valid messages that the second electronic device may currently cache, so as to transmit the first information to the second electronic device based on the number of valid messages that the second electronic device may currently cache. The detailed implementation is referred to the related description of the above embodiments, and is not repeated here.
And ending the data processing flow when the verification result indicates that any one of the first identifier and the second identifier sent by the second electronic equipment is invalid.
In the scheme provided by the embodiment, the first electronic device determines the first information based on the first identifier and the second identifier under the condition that the received first identifier and the received second identifier are valid, so that the first information is transmitted to the second electronic device in the process of data interaction with the second electronic device, and the data processing flow is ended under the condition that the received first identifier or the received second identifier is invalid, so that the first information returned to the second electronic device is data corresponding to the service requested by the first electronic device, the correctness of the data is ensured, and the corresponding service is provided for the first electronic device.
Fig. 6 shows, as an application embodiment of the present application, an interaction diagram of a data processing method provided by the application embodiment of the present application. As shown in fig. 6, in an application scenario of OTA upgrade to a terminal, the data processing method includes:
s601: the terminal sends the first identifier and the second identifier to the server. The first identifier characterizes the requested service; the second identification characterizes the service-related execution action.
The first identifier may correspond to an OTA service instance identifier, and the first identifier characterizes that the requested service corresponds to an OTA upgrade service. The second identification characterizes an OTA service related execution action, e.g., OTA upgrade.
In practical application, the terminal sends ActionStart to the server. The first field seq=1 in the ActionStart, the second field ack=0 in the ActionStart, the third field window=16 in the ActionStart, which is used for identifying the number of the valid messages that the terminal can currently cache, and the fourth field in the ActionStart carries the first identifier and the second identifier.
S602: the server sends a first message to the terminal under the condition that the first identifier and the second identifier are confirmed to be valid; the first message characterizes the receipt of the first and second identifications by the server.
The first field of the first message seq=0, the second field of the first message ack=1, the third field of the first message characterizes the number of valid messages that the server can currently buffer, and the fourth field of the first message is empty.
S603: the terminal determines first information based on the first identifier and the second identifier; the first information characterizes data that is required to be sent to the server to complete the performing action.
Here, the first information may include information such as an identification and version number of the object to be upgraded; the object to be upgraded includes an application in the terminal, firmware in the terminal, and the like.
Note that S601 and S603 may be executed simultaneously.
S604: and under the condition that the terminal receives the first message sent by the server, carrying out message interaction with the server, and transmitting the first message to the server.
The terminal encapsulates the first information into at least one ActionMessage; all ActionMessage carried data in at least one ActionMessage form all data of the first information. The fourth field in ActionMessage is used to carry data of the first information.
In practical application, because the total number of bits occupied by the identifier and version number of the object to be upgraded is smaller, the first information may be encapsulated into an ActionMessage.
S605: the server determines second information based on the first identifier, the second identifier and the first information; the second information characterizes data required to be sent to the terminal for completing the execution action.
Here, the second information includes a corresponding upgrade package.
S606: and the server performs message interaction with the terminal and transmits the second information to the terminal.
Here, since the number of bits occupied by the upgrade package is large, the server generates at least two actionmessages based on the second information, and the data carried by the fourth field in all actionmessages in the at least two actionmessages forms all data of the second information.
And when the total message amount of the at least two actionmessages is smaller than or equal to the number of the valid messages which can be cached currently and are characterized by the third field in the ActionStart, continuously sending all the actionmessages in the at least two actionmessages to the terminal. For example, when the third field in ActionStart corresponds to 16, if the total message amount of the at least two actionmessages is less than or equal to 16, all actionmessages in the at least two actionmessages are continuously sent to the terminal.
And when the total quantity of the at least two ActionMessage messages is larger than the quantity of the current cacheable effective messages of the terminal represented by the third field in the ActionStart, continuously sending the first quantity of ActionMessage in the at least two ActionMessage to the terminal. The first number is less than or equal to the number of active messages that the terminal is currently buffering.
S607: and the terminal sends a third message to the server under the condition of receiving at least part of data of the second information.
And the terminal sends a third message to the server under the condition of receiving the ActionMessage corresponding to the second information sent by the server. The sequence number written in the second field in the third message represents that the terminal has received all actionmessages of which the sequence numbers represented by the first field in the actionmessages sent by the server are smaller than or equal to the sequence numbers represented by the second field in the third message.
It should be noted that, when the terminal receives at least two actionmessages corresponding to the second information sent by the server, it may determine whether the sequence numbers of the first field representation of the received actionmessages are continuous or not based on the sequence numbers of the first field representation of each of the at least two actionmessages received by the server, and when the sequence numbers of the first field representation of the received actionmessages are discontinuous, send a third message to the server. The terminal may also send a third message to the server when the determined result indicates that the sequence number of the first field of the ActionMessage is continuous and the maximum sequence number of the first field of the ActionMessage is equal to the number of the valid messages that the terminal can currently cache.
For example, the sequence numbers of the first field characterizations of at least two actionmessages sent by the server correspond to: 1. 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, the sequence number of the first field representation of the ActionMessage received by the terminal corresponds to 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, the second field ack=10 in the third message sent by the terminal, and the sequence number of the first field representation of the ActionMessage received by the terminal is 1 to 10.
When the number of the valid messages which are represented by the fourth field in the third message and can be cached currently by the terminal is 10, because the sequence number represented by the second field in the third message is 10, and the sequence number represented by the first field in the ActionMessage which is transmitted by the server last time is 14, the two sequence numbers are different, so that the server continuously transmits the ActionMessage of seq=11, 12, 13 and 14 to the terminal based on the sequence number represented by the second field in the third message. Here, after the server sends 14 actionmessages in S607, there is also an unsent ActionMessage corresponding to the second information, and the number of valid messages that can be currently cached by the terminal may be represented by the fourth field in the third message, and the ActionMessage with seq=11, 12, 13, 14 and at least one unsent ActionMessage corresponding to the second information may be continuously sent to the terminal.
Here, when the fourth field in the third message is empty, the sequence number of the first field representation of the third message is the same as the sequence number of the first field representation in the last valid message (e.g., actionStart) sent by the terminal to the server. When the fourth field in the third message is empty and the sequence number represented by the second field in the third message is the same as the maximum sequence number corresponding to the first field in the ActionMessage generated based on the second information, the token terminal has received all the messages for carrying the data of the upgrade package, and at this time, the server does not need to respond to the third message, that is, the server does not need to separately send a message for identifying that the third message has been received to the third message.
S608: and the terminal sends an end request message to the server.
The terminal sends an end request message, e.g., transactionEndReq, to the server in case of receiving all ActionMessage for carrying data of the upgrade package. The sequence number of the first field representation in the end request message is the same as the sequence number of the first field representation in the last valid message sent by the terminal to the server. The sequence number of the second field representation in the end message is the same as the sequence number of the first field representation in the ActionMessage of the data for carrying the second information, which is sent by the server last time.
S609: and the server sends a confirmation ending message to the terminal under the condition of receiving the ending request message.
And the server sends a confirmation ending message to the server under the condition that the ending request message sent by the terminal is received and the received third message sent by the terminal represents that the terminal has received all the messages used for bearing the data of the upgrade package, and marks the execution action represented by the second identifier as completed.
S610: and the terminal reports the corresponding execution result to the application layer under the condition of receiving the confirmation ending message.
Here, when all actionmessages corresponding to the second information have been received, the terminal analyzes all actionmessages corresponding to the second information, and obtains an analysis result. The analysis result comprises a sequence number of the first field representation corresponding to each ActionMessage and data carried by a corresponding fourth field. When the terminal can successfully analyze the data carried by all the ActionMessage, reporting a message for identifying normal execution to an application layer; and the terminal sorts the data carried by the corresponding fourth field based on the sequence number of the first field corresponding to each ActionMessage in the analysis result to obtain sorted data, and reports the sorted data to the application layer. The sorted data form corresponding second information (i.e. upgrade package) for the OTA upgrade service corresponding to the first identifier to upgrade the corresponding application program or firmware by using the upgrade package.
When any ActionMessage corresponding to the second information is analyzed by the terminal to make errors, OTA upgrading is ended, a processing result for identifying upgrading failure is reported to the application layer, and the data processing flow is ended.
In the scheme provided by the embodiment, the server can continuously send at least two ActionMessage to the terminal, and the terminal does not need to respond to each ActionMessage, so that the transmission efficiency of the OTA upgrade package can be improved, and the OTA upgrade speed is improved.
In order to implement the method of the embodiment of the application, the embodiment of the application also provides a data processing device which is arranged on the electronic equipment. As shown in fig. 7, the data processing apparatus includes:
a determining unit 71 for determining the first information based on the first identification and the second identification; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action;
a message interaction unit 72, configured to transmit the first information to the second electronic device during a message interaction with the second electronic device.
In an embodiment, as shown in fig. 8, the data processing apparatus further includes:
A transmitting unit 73, configured to transmit the first identifier and the second identifier to the second electronic device;
the message interaction unit 72 is configured to: under the condition that a first message sent by the second electronic equipment is received, carrying out message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes the receipt of the first and second identifications by the second electronic device.
In one embodiment, as shown in fig. 9, the data processing apparatus further includes:
a receiving unit 74, configured to receive the first identifier and the second identifier sent by the second electronic device;
the message interaction unit 72 is configured to: and under the condition that the first identifier and the second identifier are confirmed to be valid, carrying out message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
In an embodiment, the message that the first electronic device interacts with the second electronic device is encapsulated according to a set message format; wherein, the message format of the setting includes: a first field, a second field, a third field, and a fourth field; the first field is used for writing a first sequence number; the first serial number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second serial number is used for identifying that the electronic equipment has received all valid messages with the serial number smaller than or equal to the second serial number; the third field characterizes the number of valid messages that the electronic device can cache; the valid message characterizes a message carrying data; the fourth field is used to carry data.
In an embodiment, the message interaction unit 72 is configured to:
generating at least one second message based on the first information; each second message in the at least one second message correspondingly carries all or part of data in the first information;
and sending the at least one second message to the second electronic device.
In an embodiment, the message interaction unit 72 is configured to: and continuously transmitting at least one second message in the at least one second message to the second electronic device based on a third field in the message received by the first electronic device last time.
In an embodiment, in a case that the third field in the last received message of the first electronic device indicates that the number of valid messages currently cacheable by the second electronic device is greater than or equal to the total message amount of the at least one second message, the message interaction unit 72 is configured to: and continuously transmitting all second messages in the at least one second message to the second electronic equipment.
In an embodiment, the message interaction unit 72 is further configured to:
retransmitting at least one second message of the at least one second message to the second electronic device based on the first sequence number and the second sequence number if the third sequence number is different from the fourth sequence number; wherein,,
The third sequence number represents the sequence number represented by a second field in the last received message sent by the second electronic device; and the fourth serial number represents the serial number represented by the first field in the second message sent by the first electronic device for the last time.
In an embodiment, when the fourth field of the third message that is sent by the first electronic device last time is empty, the sequence number that the first field in the third message represents is the same as the sequence number that the first field in the valid message that is sent by the first electronic device last time represents.
In practice, the units comprised by the data processing device may be implemented by a processor in the data processing device. The processor needs to execute the program stored in the memory to implement the functions of the program modules.
It should be noted that: in the data processing apparatus provided in the above embodiment, only the division of each program module is used for illustration, and in practical application, the processing allocation may be performed by different program modules according to needs, that is, the internal structure of the data processing apparatus is divided into different program modules to complete all or part of the processing described above. In addition, the data processing apparatus and the data processing method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the data processing apparatus and the data processing method embodiment are detailed in the method embodiment, which is not described herein again.
Based on the hardware implementation of the program modules, and in order to implement the method of the embodiments of the present application, the embodiments of the present application further provide an electronic device, where the electronic device is the first electronic device or the second electronic device in any of the foregoing embodiments. Fig. 10 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present application, as shown in fig. 10, the electronic device includes:
a communication interface 1 capable of information interaction with other devices such as network devices and the like;
and the processor 2 is connected with the communication interface 1 to realize information interaction with other devices and is used for executing the data processing method provided by one or more technical schemes when running the computer program. And the computer program is stored on the memory 3.
Of course, in practice, the various components in the electronic device are coupled together by a bus system 4. It will be appreciated that the bus system 4 is used to enable connected communications between these components. The bus system 4 comprises, in addition to a data bus, a power bus, a control bus and a status signal bus. But for clarity of illustration the various buses are labeled as bus system 4 in fig. 10.
The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 3 may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Wherein the nonvolatile Memory may be Read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, electrically Erasable Programmable Read-Only Memory), magnetic random access Memory (FRAM, ferromagnetic random access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be random access memory (RAM, random Access Memory), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (ddr SDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, sync Link Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The memory 3 described in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the processor 2 or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 2 or by instructions in the form of software. The processor 2 described above may be a general purpose processor, DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 2 may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied in a hardware decoding processor or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium in the memory 3 and the processor 2 reads the program in the memory 3 to perform the steps of the method described above in connection with its hardware.
The processor 2 implements corresponding flows in the methods of the embodiments of the present application when executing the program, and for brevity, will not be described in detail herein.
In an exemplary embodiment, the present application also provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a memory 3 storing a computer program executable by the processor 2 for performing the steps of the method described above. The computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
The technical solutions described in the embodiments of the present application may be arbitrarily combined without any conflict.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A data processing method, applied to a first electronic device, the method comprising:
determining first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action;
transmitting the first information to a second electronic device in the process of message interaction with the second electronic device;
the first identifier comprises a service instance identifier, and the service instance is used for realizing corresponding service, and the service comprises:
OTA upgrade, and
secure authentication, and/or negotiating a key;
the second identity comprises an instance identity, the instance comprising:
OTA upgrade instance, and
secure authentication instance, and/or negotiation key instance.
2. The data processing method according to claim 1, characterized by further comprising:
transmitting the first identifier and the second identifier to the second electronic device;
the transmitting the first information to the second electronic device in the process of message interaction with the second electronic device comprises the following steps:
under the condition that a first message sent by the second electronic equipment is received, carrying out message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes the receipt of the first and second identifications by the second electronic device.
3. The data processing method according to claim 1, characterized by further comprising:
receiving the first identifier and the second identifier sent by the second electronic device;
the transmitting the first information to the second electronic device in the process of message interaction with the second electronic device comprises the following steps:
And under the condition that the first identifier and the second identifier are confirmed to be valid, carrying out message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
4. A data processing method according to any one of claims 1 to 3, wherein messages interacted with the second electronic device by the first electronic device are encapsulated in a set message format; wherein,,
the set message format includes: a first field, a second field, a third field, and a fourth field; the first field is used for writing a first sequence number; the first serial number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second serial number is used for identifying that the electronic equipment has received all valid messages with the serial number smaller than or equal to the second serial number; the third field characterizes the number of valid messages that the electronic device can cache; the valid message characterizes a message carrying data; the fourth field is used to carry data.
5. The method according to claim 4, wherein transmitting the first information to the second electronic device during the message interaction with the receiving end includes:
Generating at least one second message based on the first information; each second message in the at least one second message correspondingly carries all or part of data in the first information;
and sending the at least one second message to the second electronic device.
6. The data processing method of claim 5, wherein said sending the at least one second message to the second electronic device comprises:
and continuously transmitting at least one second message in the at least one second message to the second electronic device based on a third field in the message received by the first electronic device last time.
7. The method according to claim 6, wherein, in the case where the third field in the last received message by the first electronic device indicates that the number of valid messages currently cacheable by the second electronic device is greater than or equal to the total number of messages of the at least one second message, the continuously transmitting at least one second message of the at least one second message to the second electronic device includes:
and continuously transmitting all second messages in the at least one second message to the second electronic equipment.
8. The data processing method of claim 7, further comprising:
retransmitting at least one second message of the at least one second message to the second electronic device based on the first sequence number and the second sequence number if the third sequence number is different from the fourth sequence number; wherein,,
the third sequence number represents the sequence number represented by a second field in the last received message sent by the second electronic device; and the fourth serial number represents the serial number represented by the first field in the second message sent by the first electronic device for the last time.
9. The method according to claim 4, wherein in the case that the fourth field of the third message that was last transmitted by the first electronic device is empty, the sequence number that the first field in the third message represents is the same as the sequence number that the first field in the valid message that was last transmitted by the first electronic device represents.
10. A data processing apparatus, comprising:
a determining unit configured to determine first information based on the first identifier and the second identifier; the first identifier characterizes the requested service; the second identifier characterizes the service-related execution action; the first information characterizes data which is required to be sent to the second electronic equipment for completing the execution action;
The information interaction unit is used for transmitting the first information to the second electronic equipment in the process of carrying out information interaction with the second electronic equipment;
the first identifier comprises a service instance identifier, and the service instance is used for realizing corresponding service, and the service comprises:
OTA upgrade, and
secure authentication, and/or negotiating a key;
the second identity comprises an instance identity, the instance comprising:
OTA upgrade instance, and
secure authentication instance, and/or negotiation key instance.
11. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is adapted to execute the steps of the data processing method of any of claims 1 to 9 when the computer program is run.
12. A storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the data processing method according to any of claims 1 to 9.
CN202010899538.6A 2020-08-31 2020-08-31 Data processing method, device, electronic equipment and storage medium Active CN111970102B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010899538.6A CN111970102B (en) 2020-08-31 2020-08-31 Data processing method, device, electronic equipment and storage medium
PCT/CN2021/107458 WO2022042140A1 (en) 2020-08-31 2021-07-20 Data processing method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010899538.6A CN111970102B (en) 2020-08-31 2020-08-31 Data processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111970102A CN111970102A (en) 2020-11-20
CN111970102B true CN111970102B (en) 2023-06-23

Family

ID=73400318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010899538.6A Active CN111970102B (en) 2020-08-31 2020-08-31 Data processing method, device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111970102B (en)
WO (1) WO2022042140A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970102B (en) * 2020-08-31 2023-06-23 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium
CN111988217B (en) 2020-08-31 2022-09-23 Oppo广东移动通信有限公司 Data interaction method and device, electronic equipment and storage medium
CN116648871A (en) * 2020-12-01 2023-08-25 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019141008A1 (en) * 2018-01-22 2019-07-25 中兴通讯股份有限公司 Network communication-based identity authentication method and computer device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103313229B (en) * 2013-05-27 2017-04-19 华为终端有限公司 Method and device for upgrading aerial downloading technology
GB2539362A (en) * 2014-03-05 2016-12-21 Nec Corp Communication system
FR3022094B1 (en) * 2014-06-06 2017-12-08 Bull Sas METHOD AND SYSTEM FOR CONTROLLING FLOW
CN106302343A (en) * 2015-05-26 2017-01-04 中兴通讯股份有限公司 The exchange method of session and server, user terminal in a kind of equipment management system
KR102300583B1 (en) * 2015-06-26 2021-09-09 삼성전자주식회사 A service providing method using a beacon and electronic apparatus thereof
CN108289111B (en) * 2017-01-09 2021-10-08 斑马智行网络(香港)有限公司 Service providing method, device, terminal equipment and operating system
CN106912037A (en) * 2017-03-30 2017-06-30 珠海全志科技股份有限公司 A kind of OTA upgrade methods and device
CN107632896A (en) * 2017-10-20 2018-01-26 广东欧珀移动通信有限公司 A kind of data processing method, data processing equipment and communication apparatus
CN108833265B (en) * 2018-06-28 2021-04-20 腾讯科技(深圳)有限公司 Message processing method, device, server and storage medium
CN110858791A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Distributed parallel transmission method, device, equipment and storage medium
CN111970102B (en) * 2020-08-31 2023-06-23 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019141008A1 (en) * 2018-01-22 2019-07-25 中兴通讯股份有限公司 Network communication-based identity authentication method and computer device

Also Published As

Publication number Publication date
CN111970102A (en) 2020-11-20
WO2022042140A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
CN111970102B (en) Data processing method, device, electronic equipment and storage medium
CN108701039B (en) Method and device for wirelessly updating software of vehicle
US20060069836A1 (en) Communication system and method for upgrade of user terminal software and user terminal upgraded by the same
JP2013522793A (en) System and method for remote maintenance of multiple clients in an electronic network using virtual machines
CN110460412B (en) Method and RDMA network card for data transmission
CN103780396B (en) Token acquisition methods and device
CN106464667B (en) Certificate management method, equipment and system
CN109462601A (en) Multi-platform access method and device based on eSIM
US20140273973A1 (en) Method and system for replacing key deployed in se of mobile terminal
US11991167B2 (en) Rich one-time password message
EP3085128A1 (en) Systems, methods, and computer program products for obtaining mobile device data
CH715441A1 (en) Methods and devices for communicating between an internet of things device and a remote computing system.
CN103684707A (en) Server-side and user-side message transmission processing method, message transmission method and message transmission system
CN107819766A (en) Safety certifying method, system and computer-readable recording medium
CN108632037A (en) The public-key process method and device of Public Key Infrastructure
CN101453479A (en) Fast document transmission system
US20040205231A1 (en) Confirmation of delivery of content to an HTTP/TCP device
EP4087206A1 (en) Internet-of-things device registration method and apparatus, device and storage medium
CN103747423A (en) Registration method, apparatus and system of terminal application
WO2015143629A1 (en) Information transmission method and device
CN116648871A (en) Data processing method, device, electronic equipment and storage medium
US20210027298A1 (en) Method and apparatus for authenticating address of virtual asset
US20100070768A1 (en) Key exchange device, key exchange processing system, key exchange method, and program
CN111552907A (en) Message processing method, device, equipment and storage medium
CN110266476A (en) SMS platform sign test method, server and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant