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

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

Info

Publication number
CN111970102A
CN111970102A CN202010899538.6A CN202010899538A CN111970102A CN 111970102 A CN111970102 A CN 111970102A CN 202010899538 A CN202010899538 A CN 202010899538A CN 111970102 A CN111970102 A CN 111970102A
Authority
CN
China
Prior art keywords
message
electronic device
field
sequence number
identifier
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.)
Granted
Application number
CN202010899538.6A
Other languages
Chinese (zh)
Other versions
CN111970102B (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

Abstract

The application discloses a data processing method, a data processing device, an electronic device 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 identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed; and transmitting the first information to a second electronic device in a message interaction process with the second electronic device.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
In the related art, for transactions that need to be completed after at least two data interactions, such as security authentication, Over the Air Technology (OTA) upgrade, etc., there is no general processing flow applicable to different transactions.
Disclosure of Invention
In view of this, embodiments of the present application are intended to provide a data processing method, an apparatus, an electronic device, and a storage medium, so as to solve the technical problem that no general processing flow is applicable to different transactions that can be completed only after at least two data interactions in the related art.
In order to achieve the purpose, the technical scheme of the application is realized as follows:
the embodiment of the application provides a data processing method, which is applied to first electronic equipment, and the method comprises the following steps: determining first information based on the first identifier and the second identifier; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed;
and transmitting the first information to a second electronic device in a message interaction process with the second electronic device.
Above-mentioned scheme still includes:
sending 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 includes:
under the condition of receiving a first message sent by the second electronic equipment, performing message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes that the second electronic device receives the first identifier and the second identifier.
Above-mentioned scheme still includes:
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 includes:
and under the condition that the first identification and the second identification are both valid, performing message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
According to the scheme, the interactive message of the first electronic device and the second electronic device is packaged according to a set message format; wherein the set message format comprises: 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 sequence number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second sequence number is used for identifying that the electronic equipment has received all effective messages with sequence numbers smaller than or equal to the second sequence number; the third field represents the number of valid messages which can be cached by the electronic equipment; the effective message represents a message carrying data; the fourth field is used for carrying data.
In the foregoing solution, in the process of performing message interaction with the receiving end, 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 bears all or part of data in the first information;
and sending the at least one second message to the second electronic equipment.
In the above solution, the sending the at least one second message to the second electronic device includes:
and continuously sending 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 last time by the first electronic device.
In the above solution, when a third field in a message received last time 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 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 the second messages in the at least one second message to the second electronic equipment.
Above-mentioned scheme still includes: under the condition that a third sequence number is different from a fourth sequence number, retransmitting at least one second message in the at least one second message to the second electronic equipment based on the first sequence number and the second sequence number; the third sequence number represents a sequence number represented by a second field in a message sent by the second electronic device and received last time; and the fourth sequence number represents the sequence number represented by the first field in the second message sent by the first electronic equipment for the last time.
In the foregoing solution, when a fourth field of a third message that is sent by the first electronic device last time is empty, a sequence number represented by a first field in the third message is the same as a sequence number represented by the first field in an effective message that is sent by the first electronic device last time.
An embodiment of the present application further provides a data processing apparatus, including:
a determining unit configured to determine first information based on the first identifier and the second identifier; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed;
and the message interaction unit is used for transmitting the first information to the second electronic equipment in the process of message interaction with the second electronic equipment.
An embodiment of the present application further provides an electronic device, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is configured to implement any of the data processing methods described above when executing the computer program.
The embodiment of the application also provides a storage medium, on which a computer program is stored, and the computer program realizes any one of the data processing methods when being executed by a processor.
According to the data processing method, the requested service is represented by the first identifier, 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 interactive message in the process of message interaction with the second electronic device, and the data processing method can be suitable for different transactions which can be completed only through at least two times of data interaction. After the first electronic device sends one message, the first electronic device can send the next message without waiting for the response message corresponding to the message, and therefore data interaction efficiency and 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 flow chart illustrating an implementation process of a first electronic device transmitting first information in a data processing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating an implementation process 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 structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present application;
fig. 9 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present application;
fig. 10 is a schematic diagram of a hardware component 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 data interactions, such as security authentication, key negotiation, OTA upgrade, and the like, 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 data interactions. The OTA upgrading method comprises the following steps:
the electronic equipment sends an upgrading request carrying version information to the 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 corresponding confirmation message when receiving a first data packet sent by the server, wherein the response message or the confirmation message is used for identifying that the corresponding data packet is received; and the server retransmits the first data packet under the condition that the response message sent by the electronic equipment is not received. The server sends a corresponding notification message to the electronic device when all the data packets corresponding to the upgrade packet are sent to the electronic device, and the electronic device sends a response message corresponding to the notification message to the server when receiving the notification message.
In order to solve the above technical problem, an embodiment of the present application provides a data processing method, where first information is determined based on a first identifier and a second identifier; and transmitting the first information to the second electronic equipment through message interaction with the second electronic equipment. The data processing method can be suitable for different transactions which need to be completed through at least two data interactions. Wherein the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which is required to be sent to the second electronic equipment to complete the executing action.
The technical solution of the present application is further described in detail with reference to the drawings and specific embodiments of the specification.
Fig. 1 shows an interaction diagram of a data processing method provided in an embodiment of the present application. Referring to fig. 1, the data processing method in the present embodiment includes:
s101: the first electronic equipment determines first information based on the first identification and the second identification; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment for completing the executing action.
Here, the first identifier may correspond to a Service Instance Identifier (SIID) or an application layer Service identifier. The service instance is used for realizing corresponding service, and the application layer service is used for providing corresponding service, and the service comprises at least one of OTA upgrading, security authentication and key negotiation.
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 related to the service corresponding to the first identifier. In practical applications, examples may include at least one of: OTA upgrade instance, Security authentication instance, and Negotiation Key instance.
It should be noted that one first identifier corresponds to at least one second identifier. Different second identifiers corresponding to the same first identifier characterize different execution actions related to the service corresponding to the first identifier.
Under the condition that the service requested by the first identifier representation corresponds to OTA upgrade, when the first electronic device is a device requesting 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 program 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) or an Electrically Erasable Programmable Read-only Memory (EEPROM) of an electronic device. When the first electronic equipment provides the OTA with the server of the upgrading service, the first information comprises a corresponding upgrading packet, and the upgrading packet is determined based on the identification and the version number of the object to be upgraded.
And under the condition that the service requested by the first identifier representation corresponds to security authentication, the first information comprises related data which are required to be sent to the second electronic equipment by the first electronic equipment for security authentication.
S102: the first electronic equipment transmits the first information to 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. The message is used for carrying part or all of data in the first information. The first electronic device may continuously transmit 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 of 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 messages included in the first information are sent in at least two batches, the first electronic equipment continuously sends all messages in the at least two messages in the first batch to the second electronic equipment, and when receiving a confirmation message sent by the second electronic equipment for the messages in the first batch, at least one message corresponding to the first information is sent to the second electronic equipment. The confirmation message represents that the second electronic device receives at least one message corresponding to the first information.
It should be noted that, in the process that the first electronic device performs message interaction with the second electronic device and transmits the first information to the second electronic device, when the first electronic device receives any message representation sent by the second electronic device and does not completely receive 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 identifier of the received data represented by the message sent by the second electronic device, and retransmits the determined packet loss data to the second electronic device.
In the solution provided in this embodiment, the requested service is represented by the first identifier, the second identifier represents an execution action related to the service, and 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 performing message interaction with the second electronic device. After the first electronic device sends one message, the first electronic device can send the next message without waiting for the response message corresponding to the message, and therefore data interaction efficiency and data processing efficiency can be improved.
In an embodiment, the interactive message of the first electronic device and the second electronic device is packaged according to a set message format; wherein the content of the first and second substances,
the set message format comprises: 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 sequence number is a use sequence number, is used for identifying data carried in the corresponding message, and is used for tracking whether the message is delivered; the second field is used for writing a second sequence number; the second sequence number is a confirmation sequence number, and is used for identifying that all valid messages with sequence numbers smaller than or equal to the second sequence number have been received by the electronic equipment and informing the opposite side that all messages before the sequence number represented by the Ack have been received; the third field is a window field and is used for representing the number of valid 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 a plurality of messages to the own party; the effective message represents a message carrying data; the fourth field is used for carrying data.
In practical application, the first field is corresponding to Seq and is used for identifying an effective message, and the effective message represents a message carrying data 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 alive messages is consecutive and incremented; the second sequence number written in the second field cannot overwrite the first sequence number in the first field of a valid message that was not received. For example, the first electronic device continuously sends 5 pieces of valid information to the second electronic device, where first fields of the 5 pieces of valid information are 1, 2, 3, 4, and 5, respectively, and when the second electronic device receives a valid message with a first sequence number of 4 in a first field of a valid message sent by the first electronic device and the first sequence number of the first field corresponds to 1, 2, 3, and 5, the second electronic device does not receive the valid message with the first sequence number of 4 in the first field, and therefore when the second electronic device responds to the valid message sent by the first electronic device, the second sequence number written in the second field of the corresponding message is 3, which indicates that the second electronic device has received all valid messages with the first sequence number less than or equal to 3 sent by the first electronic device.
In practical applications, Seq may be incremented from 0 by an increment of 1, and up to (2) at Seq32-1), the Seq of the next valid message corresponds to 0. Here, Seq may be incremented by an increment value of 1, starting with 1 and incrementing to 2 at Seq32The Seq of the next valid message corresponds to 1.
And 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 is characterized that the message is not a valid message, and the electronic device does not need to reply to the message, that is, does not need to send an acknowledgement message for the message to identify that the message has been received. That is, after receiving the message, the electronic device does not separately send a confirmation message for identifying that the message has been received without sending 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 sending the message, the sequence number represented by the second field in the first valid message sent by the electronic device after receiving the message is the same as the sequence number represented by the second field in the last message sent before receiving the message.
In practical application, the third field represents that the number of valid messages cacheable by the electronic device is greater than or equal to 2, so that the electronic device sending the valid messages can continuously send at least two valid messages to the electronic device, and the electronic device receiving the valid messages can respond when receiving the at least two valid messages without responding to each valid message, thereby improving the message transmission efficiency.
It should be noted that, the third field may indicate the number of valid messages that can be cached by the electronic device, and may be determined based on the corresponding cache space and the maximum number of bits occupied by one valid message. The number of valid messages currently cacheable as characterized by the third field is dynamically updated as the progress of the processing of the valid messages. For example, the first electronic device updates the number of valid messages that can be cached currently by the first electronic device in real time when the first electronic device finishes processing at least one cached valid message.
The first electronic device and the second electronic device initialize the following parameters in an initialization process:
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 LocalWin represents the number of valid messages which can be cached currently by the first electronic equipment and is used for identifying the total message amount of the valid messages which can be continuously sent to the first electronic equipment by the second electronic equipment; RemoteWin characterizes the number of valid messages currently cacheable by the second electronic device, for identifying the total number of messages that the first electronic device can continuously send to the second electronic device. For example, when RemoteWin is 14, it is characterized that the first electronic device may currently continuously send 14 valid messages 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 represents the number of valid messages which can be cached currently by the second electronic equipment and is used for identifying the total message amount of the valid messages which can be continuously sent to the second electronic equipment by the first electronic equipment; RemoteWin characterizes the number of valid messages currently cacheable by the first electronic device, identifying the total number of messages that the second electronic device can continuously send to the first electronic device.
It should be noted that, during the initialization process, the third field indicates 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 this embodiment, whether a message has been delivered is tracked by using a sequence number written in a first field, so that the message can be guaranteed to be delivered in order, and a confirmation sequence number written in a second field is used to notify an opposite party that all messages before a sequence number represented by an Ack have been received, so that reliable transmission of the message can be guaranteed, the electronic device can finally receive all messages, and the opposite party is prompted by a third field, so that the opposite party can send how many messages to my party before any Ack message is not received, the electronic device does not need to respond to each message received, and the electronic device can continuously send at least two messages, thereby improving the transmission efficiency of the message.
In an embodiment, fig. 2 shows a schematic flow chart of implementing transmission of first information by a first electronic device in a data processing method provided in the embodiment of the present application. As shown in fig. 2, the transmitting, by the first electronic device, the first information to the second electronic device in a process of performing message interaction with a receiving end 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 data in the first information.
And the first electronic equipment encapsulates the first information into at least one second message according to the set message format. Here, when the bit number occupied by the first information is greater than the maximum bit number corresponding to the 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 message, and the bit number occupied by the data carried by the fourth field of each second message is less than or equal to the maximum bit number corresponding to the data which can be carried by the fourth field of the set message format. The second message may be marked as an ActionMessage.
And all the fourth fields in the second message carry data, so that all the second messages are valid messages.
And determining a second sequence number written in a second field in each second message based on the sequence number represented by the first field in the valid message which is received by the first electronic device and sent by the second electronic device for the last time. The third field in each second message is used for identifying the number of valid messages which can be cached by the first electronic device currently, so that the second electronic device can determine the total number of valid messages which can be continuously sent to the first electronic device.
S202: and sending the at least one second message to the second electronic equipment.
Here, for a specific implementation process of sending at least one second message to the second electronic device, please refer to the related description of transmitting the first message to the second electronic device in S102, which is not described herein again.
In the scheme provided in this embodiment, the first information is encapsulated into at least one second message according to a set message format, and when at least two second messages corresponding to the first information are provided, because the number of valid messages initially cacheable by the second electronic device is greater than or equal to 2, the first electronic device may continuously send at least two second messages carrying data of the first information to the second electronic device, that is, after one second message is sent, it is not necessary to send the next second message after receiving a response message corresponding to the second message, so that the interaction efficiency and the transmission efficiency of the messages may be improved. After receiving the valid message sent by the second electronic device, the first electronic device may carry data of the first information in the message sent to the second electronic device, and may also represent a sequence number corresponding to the received valid message, which may improve data processing efficiency.
In one embodiment, the sending the at least one second message to the second electronic device includes: and continuously sending 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 last time by the first electronic device.
Here, the first electronic device determines the number of valid messages currently cacheable by the second electronic device based on the third field in the message received last time, and continuously sends at least one of the at least one second message to the second electronic device based on the number of valid messages currently cacheable by the second electronic device, so as to transmit all second messages corresponding to the first information to the second electronic device.
In the scheme provided in this embodiment, because the third field in the message that is received by the first electronic device last time represents the number of valid messages that can be cached by the second electronic device currently, the number of valid messages that can be cached by the second electronic device initially is greater than or equal to 2, the first electronic device may continuously send at least two second messages carrying data of the first information to the second electronic device, and the efficiency of the second messages may be improved.
In an embodiment, in a case that a third field in a message that is received last time 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 sending at least one of the at least one second message to the second electronic device includes: and continuously transmitting all the second messages in the at least one second message to the second electronic equipment.
Here, in the case where the first electronic device determines the number of valid messages currently cacheable by the second electronic device based on the third field in the message received last time, when 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 generated based on the first information, all of the at least one second message are continuously transmitted to the second electronic device.
In practical application, when the number of valid messages currently cacheable by the second electronic device is 14 and the total number of messages of the second message 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 messages that can be cached by the second electronic device currently is less than the total number of messages of the at least one second message generated based on the first information, the first electronic device continuously sends the first number of 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 valid messages which can be cached currently by the second electronic equipment under the condition that the second electronic equipment receives the at least one second message and finishes processing the at least one second message.
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 a second sequence number represented by a second field in the third message. The third message is used for identifying that the second electronic equipment has received at least one second message sent by the first electronic equipment.
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 numerical value corresponding to the first field in the first number of first messages, it is represented whether the second electronic device has received all the second messages in the first number of second messages. And the first electronic equipment continuously sends a second number of second messages to the second electronic equipment based on the third field in the third message for representing the number of valid messages which can be cached by the second electronic equipment currently. The second messages of the second quantity are all the 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 numerical value corresponding to the first field of the first messages of the first quantity, representing that the second electronic equipment receives part of the second messages in the second messages of the first quantity. 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 transmits a third number of second messages to the second electronic device based on a second field in the third message. The third number of second messages include 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 device represents the second message of which the first sequence number of the first field is greater than the second sequence number corresponding to the second field in the third message.
In the scheme provided in this embodiment, when the third field in the message that is received by the first electronic device last time indicates that the number of valid messages that can be cached by the second electronic device currently is greater than or equal to the total message amount of the at least one second message, it indicates that the second electronic device can cache all second messages corresponding to the first message, and therefore, the first electronic device continuously sends all second messages corresponding to the first message to the second electronic device, and the transmission efficiency of the second messages can be improved.
In an embodiment, fig. 3 is a schematic diagram illustrating an implementation flow of a first electronic device transmitting first information in a 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: under the condition that a third sequence number is different from a fourth sequence number, retransmitting at least one second message in the at least one second message to the second electronic equipment based on the first sequence number and the second sequence number; the third sequence number represents a sequence number represented by a second field in a message sent by the second electronic device and received last time; and the fourth sequence number represents the sequence number represented by the first field in the second message sent by the first electronic equipment for the last time.
Here, in a case where the third sequence number and the fourth sequence number are different, it is characterized that the second electronic device has not successfully received all the second messages that have been transmitted by the first electronic device.
And 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 to obtain 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 solution provided in this embodiment, when the third sequence number is different from the fourth sequence number, it is characterized that the second electronic device does not receive all the second messages sent by the first electronic device, and the first electronic device may determine, based on the third sequence number and the fourth sequence number, a second message that is not received by the second electronic device from among the second messages sent by the first electronic device, so as to retransmit the determined second message to the second electronic device, so as to ensure that the second electronic device may finally receive all the second messages corresponding to the first message, and ensure reliability of message transmission.
In an embodiment, the first electronic device corresponds to a service requester, and fig. 4 shows an interaction diagram of a data processing method provided in another embodiment of the present application. Referring to fig. 4, the data processing method in the present embodiment includes:
s401: and the first electronic equipment sends the first identification and the second identification to the second electronic equipment.
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 a corresponding 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 may determine all execution actions related to the service based on the setting implementation procedure corresponding to the service requested by the user, and determine a current execution action based on the setting execution sequence corresponding to the execution actions related to the service, so as to obtain the corresponding second identifiers.
In practical applications, in the case that the first electronic device establishes a communication connection with the second electronic device, the first electronic device may send an initiation message, for example, an ActionStart, to the second electronic device. The start message includes a first field, a second field, a third field and a fourth field, where the first field Seq is 1, the second field Ack is 0, the third field Win is used to identify the number of valid messages that can be currently cached by the first electronic device, and the fourth field is used to carry the first identifier and the second identifier.
S402: the first electronic equipment determines first information based on the first identification and the second identification; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment for completing the executing action.
In S402 of this embodiment, please refer to the first electronic device in the foregoing embodiment to determine the relevant description of the first information based on the first identifier and the second identifier, which is not described herein again.
Here, the first electronic device may first execute S401 and then execute S402, may first execute S402 and then execute S401, and may also simultaneously execute S401 and S402.
S403: the second electronic equipment sends a first message to the first electronic equipment; the first message characterizes that the second electronic device receives the first identifier and the second identifier.
The second electronic device sends a first message to the first electronic device to inform the first electronic device that the second electronic device has received the first identifier and the second identifier when receiving the first identifier and the second identifier sent by the first electronic device.
In practical application, the second electronic device, when receiving the ActionStart bearing the first identifier and the second identifier, stores data of a third field in the ActionStart, and sends an ActionMessage to the first electronic device. The ActionMessage is used to respond to ActionStart, indicating that ActionStart has been 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 in the third field of the ActionMessage characterizes the number of valid messages currently cacheable by the second electronic device.
Here, the fourth field in the ActionMessage may be null, and at this time, the ActionMessage is only used as an acknowledgement message to respond 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 are currently received by the second electronic device. 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 bear 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 represents data that needs to be sent to the first electronic device to complete an 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 the first electronic equipment performs message interaction with the second electronic equipment under the condition of receiving the first message sent by the second electronic equipment, and transmits the first message to the second electronic equipment.
Here, the first electronic device transmits the first information determined in S402 to the second electronic device, upon receiving the first message transmitted by the second electronic device. For a specific implementation process, reference is made to the related description in the foregoing embodiments, which is not repeated herein.
In practical application, when the first electronic device receives an ActionMessage sent by the second electronic device based on ActionStart, the first electronic device saves data of a third field in the ActionMessage, so that the first information is transmitted to the second electronic device based on the data of the third field in the ActionMessage.
In practical application, data corresponding to the first information is carried in a fourth field in the 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 time period, it is characterized that the second electronic device does not receive the first identifier and the second identifier, here, 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 has finished executing the execution action related to the service corresponding to the first identifier, the first electronic device may send an end request to the second electronic device to release the related resource, where the end request may correspond to TransactionEndReq.
And the second electronic device sends a message for identifying the end of confirmation to the first electronic device based on the parsing results of all the received ActionMessages when receiving the end request sent by the first electronic device, for example, GenericEndResp, and marks the execution action corresponding to the second identification as completed. Here, when the analysis result indicates that all the actionmessages are analyzed normally, the GenericEndResp indicates that the execution is normal, and the second electronic device may splice data carried in fourth fields of all the actionmessages to obtain first information based on serial numbers of first field representations in all the received actionmessages; when the resolution result characterizes any ActionMessage resolution exception, GenericEndResp characterizes the execution exception.
The first electronic device may report a processing result to the application layer based on GenericEndResp when receiving GenericEndResp sent by the second electronic device. Here, when the GenericEndResp represents an execution exception, reporting a notification message for identifying a processing failure to an application layer; and when the GenericEndResp representation is normally executed, reporting a notification message for identifying successful processing to an application layer. The notification message carries a first identifier and a second identifier.
In the scheme provided by this embodiment, after sending the first identifier and the second identifier to the second electronic device, the first electronic device performs message interaction with the second electronic device when receiving a first message sent by the second electronic device and used for representing that the first identifier and the second identifier are received, and transmits first information determined based on the first identifier and the second identifier to the second electronic device, so that it is ensured that the second device can receive the first identifier and the second identifier, and thus, an execution action related to a service requested by the first electronic device is 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 provided in another embodiment of the present application. Referring to fig. 5, the data processing method in the present embodiment includes:
s501: and the second electronic equipment sends the first identification and the second identification to the first electronic equipment.
In practical applications, the second electronic device may send a start message to the first electronic device in case that the second electronic device establishes a communication connection with the first electronic device. Such as ActionStart. The start message comprises a first field, a second field, a third field and a fourth field, wherein the first field Seq is 1, the second field Ack is 0, the third field Window is used for identifying the number of valid messages currently cacheable by the second electronic device, and the fourth field carries the first identifier and the second identifier.
S502: and the first electronic equipment receives the first identification and the second identification sent by the second electronic equipment.
S503: and the first electronic equipment performs message interaction with the second electronic equipment under the condition that the first identification and the second identification are both confirmed to be valid, and transmits the first information to the second electronic equipment.
And the first electronic equipment checks the first identification and the second identification sent by the second electronic equipment based on the set first identification and the set second identification under the condition of receiving the first identification and the second identification sent by the second electronic equipment, so as to obtain a checking result. When the first electronic device finds that the first identifier is the same as or matched with the first identifier sent by the second electronic device from the set first identifiers, the first identifier sent by the second electronic device is represented to be valid; when the first electronic equipment finds that the first identification sent by the second electronic equipment is different from or not matched with the first identification sent by the second electronic equipment from the set first identification, the first identification sent by the second electronic equipment is represented to be invalid. When the first electronic equipment finds that the first identification is the same as or matched with the second identification sent by the second electronic equipment from the set second identification, the second identification sent by the second electronic equipment is represented to be valid; and when the first electronic equipment finds that the first identification is different from or not matched with the second identification sent by the second electronic equipment from the set second identification, the second identification sent by the second electronic equipment is represented to be invalid.
And under the condition that the verification result represents that the first identifier and the second identifier sent by the second electronic equipment are both effective, the first information is transmitted to the second electronic equipment by performing message interaction with the second electronic equipment. The first electronic device may determine, based on a third field in the start message sent by the second electronic device, the number of valid messages currently cacheable by the second electronic device, so that the first information is transmitted to the second electronic device based on the number of valid messages currently cacheable by the second electronic device. For a specific implementation, please refer to the related description of the above embodiments, which is not repeated herein.
And under the condition that the verification result represents that any one of the first identifier and the second identifier sent by the second electronic equipment is invalid, ending the data processing flow.
In the solution provided in this embodiment, the first electronic device determines, based on the first identifier and the second identifier, the first information when it is determined that the received first identifier and the received second identifier are both valid, so that the first information is transmitted to the second electronic device in a process of performing data interaction with the second electronic device, and ends a data processing flow when the received first identifier or the received second identifier is invalid, thereby ensuring that the first information returned to the second electronic device is data corresponding to a service requested by the first electronic device, ensuring correctness of the data, and thus providing a corresponding service for the first electronic device.
Fig. 6 shows an interaction diagram of a data processing method provided in an application embodiment of the present application as an application embodiment of the present application. As shown in fig. 6, in an application scenario of performing OTA upgrade on a terminal, the data processing method includes:
s601: and the terminal sends the first identifier and the second identifier to the server. The first identity characterizes a requested service; the second identifier characterizes a service-related execution action.
The first identifier may correspond to an OTA service instance identifier, and the service requested by the first identifier may correspond to an OTA upgrade service. The second identity characterizes an OTA service related performed action, e.g. an OTA upgrade.
In actual application, the terminal sends ActionStart to the server. The first field Seq in the ActionStart is 1, the second field Ack in the ActionStart is 0, the third field Window in the ActionStart is 16, which is used for identifying the number of 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 both valid; the first message represents that the server receives the first identifier and the second identifier.
The first field Seq of the first message is 0, the second field Ack of the first message is 1, the third field of the first message represents the number of valid messages currently cacheable by the server, and the fourth field of the first message is empty.
S603: the terminal determines first information based on the first identification and the second identification; the first information represents data which is required to be sent to the server to complete the execution action.
Here, the first information may include information such as an identifier and a version number of the object to be upgraded; the object to be upgraded includes an application program in the terminal, firmware in the terminal, and the like.
It should be noted that S601 and S603 may be executed simultaneously.
S604: and the terminal performs message interaction with the server and transmits the first information to the server under the condition of receiving the first information sent by the server.
The terminal encapsulates the first information into at least one ActionMessage; the data carried by all the ActionMessages in the at least one ActionMessage form all the data of the first information. The fourth field in the ActionMessage is used to carry data of the first information.
In practical application, because the total number of bits occupied by the identifier and the version number of the object to be upgraded is small, the first information may be encapsulated into an ActionMessage.
S605: the server determines second information based on the first identification, the second identification and the first information; the second information represents data which is required to be sent to the terminal to finish the executing 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 data carried in a fourth field of all the actionmessages in the at least two actionmessages constitutes all data of the second information.
And when the total quantity of the at least two ActionMessages is less than or equal to the quantity of valid messages which can be cached currently by the terminal 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 the ActionStart corresponds to 16, in the case that the total amount of the at least two actionmessages is less than or equal to 16, all of the at least two actionmessages are continuously sent to the terminal.
And when the total amount of the at least two ActionMessages is greater than the number of valid messages which can be cached by the terminal and are characterized by a third field in the ActionStart, continuously sending the first number of the at least two ActionMessages to the terminal. The first number is smaller than or equal to the number of valid messages currently cacheable by the terminal.
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 message sent by the server. And the sequence number representation written in the second field in the third message represents all ActionMessages of which the sequence number represented by the first field in the ActionMessages sent by the server is less than or equal to the sequence number represented by the second field in the third message.
It should be noted that, when receiving at least two actionmessages corresponding to the second information sent by the server, the terminal may determine whether the serial numbers of the first field representations of the received actionmessages are continuous based on the received serial numbers of the first field representations of each of the at least two actionmessages sent by the server, and send a third message to the server when the determination result indicates that the serial numbers of the first field representations of the received actionmessages are discontinuous. The terminal may also send the third message to the server when the determination result represents that the sequence numbers of the first field representations of the received actionmessages are consecutive and the maximum sequence number of the first field representation of the ActionMessage is equal to the number of valid messages currently cacheable by the terminal.
For example, the sequence numbers represented by the first fields 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, where the sequence number of the first field representation of the ActionMessage received by the terminal is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, and the second field Ack in the third message sent by the terminal is 10, which represents that the terminal has received the ActionMessage with the sequence number of 1 to 10 represented by the first field.
When the fourth field in the third message represents that the number of valid messages currently cacheable by the terminal is 10, since the sequence number of the second field in the third message is 10, the sequence number of the first field in the ActionMessage sent by the server last time is 14, and the two sequence numbers are different, the server continuously sends the actionmessages of Seq 11, 12, 13, and 14 to the terminal based on the sequence number of the second field in the third message. Here, after the server transmits 14 actionmessages in S607, there are also unsent actionmessages corresponding to the second information, and the server may continuously transmit, to the terminal, the actionmessages Seq 11, 12, 13, and 14 and at least one unsent ActionMessage corresponding to the second information, based on the number of valid messages that the fourth field in the third message indicates that the terminal can currently buffer.
Here, when the fourth field in the third message is empty, the sequence number represented by the first field of the third message is the same as the sequence number represented by the first field 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 representation terminal has received all 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 send a message for identifying that the third message has been received separately for the third message.
S608: and the terminal sends an ending request message to the server.
The terminal sends an end request message, for example, TransactionEndReq, to the server in the case of receiving all actionmessages for carrying data of the upgrade package. The sequence number of the first field representation in the ending request message is the same as the sequence number of the first field representation in the valid message sent by the terminal to the server for the last time. The sequence number of the second field representation in the ending message is the same as the sequence number of the first field representation in the ActionMessage which is sent by the server for the last time and is used for bearing the data of the second information.
S609: and the server sends a confirmation end message to the terminal under the condition of receiving the end request message.
And the server sends a confirmation end message to the server and marks the execution action represented by the second identifier as completed under the condition that the server receives the end request message sent by the terminal and the received third message representation sent by the terminal receives all messages for bearing the data of the upgrade package.
S610: and the terminal reports the corresponding execution result to the application layer under the condition of receiving the confirmation end message.
Here, when all the actionmessages corresponding to the second information have been received, the terminal analyzes all the actionmessages corresponding to the second information to obtain an analysis result. The analysis result comprises the sequence number represented by the first field corresponding to each ActionMessage and the data carried by the corresponding fourth field. When the terminal can successfully analyze all data borne by the ActionMessage, reporting a message for identifying normal execution to an application layer; and the terminal sorts the data loaded by the corresponding fourth field based on the sequence number of the first field corresponding to each ActionMessage in the analysis result to obtain the sorted data, and reports the sorted data to the application layer. The sorted data form corresponding second information (i.e., an upgrade package) for the OTA upgrade service corresponding to the first identifier to perform OTA upgrade on the corresponding application program or firmware by using the upgrade package.
And when the terminal analyzes any ActionMessage corresponding to the second information and has an error, ending the OTA upgrading, reporting a processing result for identifying upgrading failure to the application layer, and ending the data processing flow.
In the scheme provided by this embodiment, the server may continuously send at least two actionmessages 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 increased.
In order to implement the method of the embodiment of the present application, an embodiment of the present application further provides a data processing apparatus, which is disposed on an electronic device. As shown in fig. 7, the data processing apparatus includes:
a determination unit 71 configured to determine the first information based on the first identifier and the second identifier; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed;
the message interaction unit 72 is configured to transmit the first information to a second electronic device in a process of performing message interaction with the second electronic device.
In one embodiment, as shown in fig. 8, the data processing apparatus further includes:
a sending unit 73, configured to send the first identifier and the second identifier to the second electronic device;
the message interaction unit 72 is configured to: under the condition of receiving a first message sent by the second electronic equipment, performing message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes that the second electronic device receives the first identifier and the second identifier.
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 identification and the second identification are both valid, performing message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
In an embodiment, the interactive message of the first electronic device and the second electronic device is packaged according to a set message format; wherein the set message format comprises: 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 sequence number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second sequence number is used for identifying that the electronic equipment has received all effective messages with sequence numbers smaller than or equal to the second sequence number; the third field represents the number of valid messages which can be cached by the electronic equipment; the effective message represents a message carrying data; the fourth field is used for carrying data.
In one 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 bears all or part of data in the first information;
and sending the at least one second message to the second electronic equipment.
In one embodiment, the message interaction unit 72 is configured to: and continuously sending 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 last time by the first electronic device.
In an embodiment, in a case that a third field in a message received last time 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 message interacting unit 72 is configured to: and continuously transmitting all the 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:
under the condition that a third sequence number is different from a fourth sequence number, retransmitting at least one second message in the at least one second message to the second electronic equipment based on the first sequence number and the second sequence number; wherein the content of the first and second substances,
the third sequence number represents a sequence number represented by a second field in a message sent by the second electronic device and received last time; and the fourth sequence number represents the sequence number represented by the first field in the second message sent by the first electronic equipment for the last time.
In an embodiment, in a case that a fourth field of a third message that is sent by the first electronic device last time is empty, a sequence number represented by the first field in the third message is the same as a sequence number represented by the first field in a valid message that is sent by the first electronic device last time.
In practical applications, each unit included in the data processing apparatus may be implemented by a processor in the data processing apparatus. The processor needs to run the program stored in the memory to implement the functions of the above-described program modules.
It should be noted that: in the data processing apparatus provided in the above embodiment, when performing data processing, only the division of each program module is exemplified, and in practical applications, the processing may be distributed to different program modules according to needs, that is, the internal structure of the data processing apparatus may be 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 provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Based on the hardware implementation of the program module, and in order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides an electronic device, where the electronic device is the first electronic device or the second electronic device in any of the embodiments. Fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application, and 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 equipment, and is used for executing the data processing method provided by one or more technical schemes when running a computer program. And the computer program is stored on the memory 3.
In practice, of course, the various components in the electronic device are coupled together by the bus system 4. It will be appreciated that the bus system 4 is used to enable connection communication 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. For clarity of illustration, however, 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. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced Synchronous Dynamic Random Access Memory), Synchronous linked Dynamic Random Access Memory (DRAM, Synchronous Link Dynamic Random Access Memory), Direct Memory (DRmb 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 above embodiment 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 having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 2. The processor 2 described above may be a general purpose processor, a 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. A 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 implemented by 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 located in the memory 3, and the processor 2 reads the program in the memory 3 and in combination with its hardware performs the steps of the aforementioned method.
When the processor 2 executes the program, the corresponding processes in the methods according to the embodiments of the present application are realized, and for brevity, are not described herein again.
In an exemplary embodiment, the present application further provides a storage medium, i.e. a computer storage medium, specifically a computer readable storage medium, for example, including a memory 3 storing a computer program, which can be executed by a processor 2 to implement the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
The above description is only for the 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 conceive of the changes or substitutions within the technical scope of the present application, and shall 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 is applied to a first electronic device, and the method comprises the following steps:
determining first information based on the first identifier and the second identifier; the first identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed;
and transmitting the first information to a second electronic device in a message interaction process with the second electronic device.
2. The data processing method of claim 1, further comprising:
sending 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 includes:
under the condition of receiving a first message sent by the second electronic equipment, performing message interaction with the second electronic equipment, and transmitting the first message to the second electronic equipment; the first message characterizes that the second electronic device receives the first identifier and the second identifier.
3. The data processing method of claim 1, 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 includes:
and under the condition that the first identification and the second identification are both valid, performing message interaction with second electronic equipment, and transmitting the first information to the second electronic equipment.
4. The data processing method according to any one of claims 1 to 3, wherein the message interacted between the first electronic device and the second electronic device is encapsulated according to a set message format; wherein the content of the first and second substances,
the set message format comprises: 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 sequence number is used for identifying data carried in the corresponding message; the second field is used for writing a second sequence number; the second sequence number is used for identifying that the electronic equipment has received all effective messages with sequence numbers smaller than or equal to the second sequence number; the third field represents the number of valid messages which can be cached by the electronic equipment; the effective message represents a message carrying data; the fourth field is used for carrying data.
5. The data processing method of claim 4, wherein transmitting the first information to the second electronic device during the message interaction with the receiving end comprises:
generating at least one second message based on the first information; each second message in the at least one second message correspondingly bears all or part of data in the first information;
and sending the at least one second message to the second electronic equipment.
6. The data processing method of claim 5, wherein sending the at least one second message to the second electronic device comprises:
and continuously sending 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 last time by the first electronic device.
7. The data processing method according to claim 6, wherein, in a case where a third field in the message last received 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 in the at least one second message, the continuously sending at least one of the at least one second message to the second electronic device comprises:
and continuously transmitting all the second messages in the at least one second message to the second electronic equipment.
8. The data processing method of claim 7, further comprising:
under the condition that a third sequence number is different from a fourth sequence number, retransmitting at least one second message in the at least one second message to the second electronic equipment based on the first sequence number and the second sequence number; wherein the content of the first and second substances,
the third sequence number represents a sequence number represented by a second field in a message sent by the second electronic device and received last time; and the fourth sequence number represents the sequence number represented by the first field in the second message sent by the first electronic equipment for the last time.
9. The data processing method according to claim 4, wherein, in a case where a fourth field of a third message last sent by the first electronic device 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 valid message last sent by the first electronic device.
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 identity characterizes a requested service; the second identification characterizes a service-related execution action; the first information represents data which are required to be sent to the second electronic equipment when the execution action is completed;
and the message interaction unit is used for transmitting the first information to the second electronic equipment in the process of message interaction with the second electronic equipment.
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 perform the steps of the data processing method of any of claims 1 to 9 when running the computer program.
12. A storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the data processing method of any one 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 true CN111970102A (en) 2020-11-20
CN111970102B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022042236A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data exchange method and apparatus, electronic device, and storage medium
WO2022042140A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium
WO2022116015A1 (en) * 2020-12-01 2022-06-09 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103313229A (en) * 2013-05-27 2013-09-18 华为终端有限公司 Method and device for upgrading aerial downloading technology
CN106303919A (en) * 2015-06-26 2017-01-04 三星电子株式会社 Use service providing method and the electronic equipment thereof of beacon
CN106302343A (en) * 2015-05-26 2017-01-04 中兴通讯股份有限公司 The exchange method of session and server, user terminal in a kind of equipment management system
US20170163386A1 (en) * 2014-06-06 2017-06-08 Bull Sas Method and system for flow control
CN106912037A (en) * 2017-03-30 2017-06-30 珠海全志科技股份有限公司 A kind of OTA upgrade methods and device
WO2019141008A1 (en) * 2018-01-22 2019-07-25 中兴通讯股份有限公司 Network communication-based identity authentication method and computer device
CN110858791A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Distributed parallel transmission method, device, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2539362A (en) * 2014-03-05 2016-12-21 Nec Corp Communication system
CN108289111B (en) * 2017-01-09 2021-10-08 斑马智行网络(香港)有限公司 Service providing method, device, terminal equipment and operating system
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
CN111970102B (en) * 2020-08-31 2023-06-23 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103313229A (en) * 2013-05-27 2013-09-18 华为终端有限公司 Method and device for upgrading aerial downloading technology
US20170163386A1 (en) * 2014-06-06 2017-06-08 Bull Sas Method and system for flow control
CN106302343A (en) * 2015-05-26 2017-01-04 中兴通讯股份有限公司 The exchange method of session and server, user terminal in a kind of equipment management system
CN106303919A (en) * 2015-06-26 2017-01-04 三星电子株式会社 Use service providing method and the electronic equipment thereof of beacon
CN106912037A (en) * 2017-03-30 2017-06-30 珠海全志科技股份有限公司 A kind of OTA upgrade methods and device
WO2019141008A1 (en) * 2018-01-22 2019-07-25 中兴通讯股份有限公司 Network communication-based identity authentication method and computer device
CN110858791A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Distributed parallel transmission method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022042236A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data exchange method and apparatus, electronic device, and storage medium
WO2022042140A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium
US11736597B2 (en) 2020-08-31 2023-08-22 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Data exchange method, electronic device, and non-transitory storage medium
WO2022116015A1 (en) * 2020-12-01 2022-06-09 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN111970102B (en) 2023-06-23
WO2022042140A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
CN111970102A (en) Data processing method and device, electronic equipment and storage medium
KR20190030367A (en) Electronic device for processing a message and operating method thereof
CN104866290A (en) Method and device for data transmission
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
US20140273973A1 (en) Method and system for replacing key deployed in se of mobile terminal
CN112181677A (en) Service processing method and device, storage medium and electronic device
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
KR20160023873A (en) Hardware management communication protocol
EP4087206A1 (en) Internet-of-things device registration method and apparatus, device and storage medium
CN112882743A (en) Software upgrading method
CN113852610B (en) Message processing method, device, computer equipment and storage medium
CN115934378A (en) Service data processing method and device, electronic equipment and storage medium
CN112181930B (en) File management method and device for virtual switching matrix
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
CN109600722B (en) Short message receiving verification method and device, electronic equipment and storage medium
CN110309191B (en) Method, device and system for storing business data
CN108880994B (en) Method and device for retransmitting mails
CN116648871A (en) Data processing method, device, electronic equipment and storage medium
CN111338642A (en) Method, device, terminal and storage medium for determining application downloading path
CN113806069B (en) Nuclear power station system interaction method and device, peripheral system and storage medium
CN116366650B (en) Cloud service system, cloud terminal and physical identity binding method
CN111083665B (en) Method and equipment for double-master control interactive communication
CN110912987B (en) Information processing method and related equipment
CN113765935B (en) Communication method and device, readable storage medium, application processor and terminal
CN116996508A (en) Cloud resource creation method, device, equipment and 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