CN116483379A - Application program synchronization method and electronic device - Google Patents

Application program synchronization method and electronic device Download PDF

Info

Publication number
CN116483379A
CN116483379A CN202310403282.9A CN202310403282A CN116483379A CN 116483379 A CN116483379 A CN 116483379A CN 202310403282 A CN202310403282 A CN 202310403282A CN 116483379 A CN116483379 A CN 116483379A
Authority
CN
China
Prior art keywords
program
encapsulation
field
package
data
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.)
Pending
Application number
CN202310403282.9A
Other languages
Chinese (zh)
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.)
Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd
Original Assignee
Chengdu Seres Technology Co 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 Chengdu Seres Technology Co Ltd filed Critical Chengdu Seres Technology Co Ltd
Priority to CN202310403282.9A priority Critical patent/CN116483379A/en
Publication of CN116483379A publication Critical patent/CN116483379A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application program synchronization method and the electronic device are characterized in that identification information of a current application program to be synchronized is obtained, then a program data packet of the application program is obtained according to the identification information, data length information of the program data packet is determined, packaging processing is carried out on the basis of the data length information and the program data packet to obtain a program resource packet to be synchronized, the program resource packet is sent to another electronic device connected with the current electronic device, so that the other electronic device can complete installation of the application program according to the program resource packet, synchronization of the application program between the two electronic devices is achieved, a user does not need to manually download the application program on the side of the other electronic device, user operation is simplified, and user experience is improved.

Description

Application program synchronization method and electronic device
Technical Field
The present disclosure relates to the field of application program synchronization, and in particular, to an application program synchronization method and an electronic device.
Background
Users typically need to experience applications through smart devices. Currently, a user generally downloads an application program which needs to be used in the user's mobile phone. When a user changes a smart device, if the user wants to use the application again, the application needs to be re-downloaded by the user on a new smart device. For example, when a user needs to experience an application program on a mobile phone on a cabin system, the user needs to manually download the application program in the cabin system, which is complex in operation and poor in user experience.
Disclosure of Invention
An objective of the embodiments of the present application is to provide an application program synchronization method and an electronic device, so as to solve the above technical problems.
In one aspect, an application synchronization method is provided and applied to a first electronic device, and the method includes:
when the current meeting of the application program synchronization conditions is determined, acquiring the identification information of the current application program to be synchronized;
acquiring a program data packet of the application program according to the identification information; the program data package comprises a program installation package;
determining data length information of the program data packet;
packaging the data length information and the program data package according to a preset data packaging processing rule to obtain a program resource package to be synchronized;
and sending the program resource package to a second electronic device which establishes connection with the first electronic device.
In one embodiment, the program data packet further includes a program user data packet, and the determining the data length information of the program data packet includes:
determining first data length information of the program installation package and determining second data length information of the program user data package;
the step of performing encapsulation processing on the data length information and the program data packet according to a preset data encapsulation processing rule to obtain a program resource packet to be synchronized comprises the following steps:
placing the first data length information under a preset first encapsulation field, placing the program installation package under a preset second encapsulation field, placing the second data length information under a preset third encapsulation field, and placing the program user data package under a preset fourth encapsulation field; the second encapsulated field immediately follows the first encapsulated field, and the fourth encapsulated field immediately follows the third encapsulated field;
and carrying out overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
In one embodiment, the overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field, to obtain a program resource packet to be synchronized, includes:
determining a verification identifier corresponding to the data encapsulation processing rule;
placing the verification mark under a preset fifth packaging field; the fifth encapsulation field is a header field;
and carrying out overall encapsulation processing based on the contents in the fifth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
In one embodiment, the determining the data length information of the program data packet includes:
determining the total data length information of the program data packet;
the overall encapsulation processing is performed based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field, so as to obtain a program resource package to be synchronized, including:
placing the total length information of the data under a preset sixth encapsulation field;
and carrying out overall encapsulation processing based on the contents in the sixth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
In one embodiment, the overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field, to obtain a program resource packet to be synchronized, includes:
determining third data length information of the identification information;
placing the third data length information under a preset seventh encapsulation field, and placing the identification information under a preset eighth encapsulation field; the eighth encapsulated field immediately follows the seventh encapsulated field;
and carrying out overall encapsulation processing based on the contents in the seventh encapsulation field, the eighth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
In one embodiment, the overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field, to obtain a program resource packet to be synchronized, includes:
performing overall encapsulation based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program encapsulation package;
and encrypting the program package to obtain a program resource package to be synchronized.
In another aspect, an application synchronization method is provided and applied to a second electronic device, where the method includes:
receiving a program resource packet of an application program to be synchronized, which is sent by first electronic equipment;
obtaining the data length information of the program data packet of the application program according to the program resource packet; the program data package comprises a program installation package;
reading the program data packet based on the data length information;
and installing the application program according to the program data packet.
In one embodiment, the program data packet further includes a program user data packet, and the obtaining, according to the program resource packet, data length information of the program data packet of the application program includes:
decrypting the program resource package to obtain a program package;
reading first data length information of the program installation package from a first packaging field of the program packaging package, and reading second data length information of the program user data package from a third packaging field of the program packaging package;
the reading the program data packet based on the data length information includes:
reading the program installation package from a second encapsulation field in the program encapsulation package according to the first data length information, and reading the program user data package from a fourth encapsulation field in the program encapsulation package according to the second data length information; the second encapsulated field immediately follows the first encapsulated field, and the fourth encapsulated field immediately follows the third encapsulated field;
the application program installation according to the program data package comprises the following steps:
and installing the application program according to the program installation package, and synchronizing the user data of the application program according to the program user data package.
In one embodiment, before the reading the first data length information of the program installation package from the first encapsulation field of the program encapsulation package and the reading the second data length information of the program user data package from the third encapsulation field of the program encapsulation package, the method includes:
reading a verification identifier from the fifth encapsulation field in the program encapsulation packet; the fifth encapsulation field is a header field;
and checking the check mark.
In another aspect, there is also provided an electronic device comprising a processor and a memory, the memory having stored therein a computer program, the processor executing the computer program to implement any of the methods described above.
According to the application program synchronization method and the electronic device, the identification information of the application program to be synchronized currently is obtained, then the program data package of the application program is obtained according to the identification information, the data length information of the program data package is determined, the program resource package to be synchronized is obtained by packaging processing based on the data length information and the program data package, the program resource package is sent to the other electronic device connected with the current electronic device, so that the other electronic device can complete the installation of the application program according to the program resource package, the synchronization of the application program between the two electronic devices is achieved, a user does not need to manually download the application program on the side of the other electronic device, user operation is simplified, and user experience is improved.
Drawings
Fig. 1 is a flowchart of an application synchronization method according to an embodiment of the present application;
fig. 2 is a flow chart illustrating a process of encapsulating data in the application program synchronization method according to the first embodiment of the present application;
FIG. 3 is a schematic diagram of a first data package format according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a second data package format according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of another method for synchronizing applications according to an embodiment of the present disclosure;
fig. 6 is a flow chart of a mobile phone synchronizing application program to a vehicle-mounted terminal according to the first embodiment of the present application;
FIG. 7 is a diagram illustrating a third data package format according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to a second embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Embodiment one:
the embodiment of the application provides an application program synchronization method, which is applied to a first electronic device, wherein the first electronic device can be any electronic device which can communicate with an external device and can carry an application program, for example, a mobile phone, a notebook computer, a wearable device, a vehicle-mounted terminal and the like. Similarly, the second electronic device in the embodiment of the present application may be any electronic device that may communicate with an external device and may carry an application program. The first electronic device may establish a connection communication with the second electronic device, e.g., may communicate via a bluetooth connection, a WIFI connection, etc.
Referring to fig. 1, the application synchronization method provided in the embodiment of the present application may include the following steps:
s11: and when the current meeting of the application program synchronization conditions is determined, acquiring the identification information of the current application program to be synchronized.
S12: acquiring a program data packet of the application program according to the identification information; the program data package includes a program installation package.
S13: data length information of the program data packet is determined.
S14: and carrying out encapsulation processing on the data length information and the program data packet according to a preset data encapsulation processing rule to obtain a program resource packet to be synchronized.
S15: and transmitting the program resource package to a second electronic device which establishes a connection with the first electronic device.
Next, a specific procedure of the above steps will be described in detail.
In this embodiment of the present application, a program synchronization condition may be set in advance on the first electronic device side, and synchronization of the application is performed only when it is determined that the application synchronization condition is currently satisfied, where the program synchronization condition may include at least one of the following conditions:
the method comprises the steps that communication connection is established between a first electronic device and a second electronic device;
the first electronic device has a synchronous service function;
the application program to be synchronized is a program in a preset program list to be synchronized.
The list of the programs to be synchronized can support user definition, and the user can draw the application programs which need to be synchronized to the second electronic equipment in the first electronic equipment into the list.
It should be noted that, in some embodiments, the first electronic device may synchronize all the application programs on itself to the second electronic device, where it is not necessary to set a list of programs to be synchronized in the first electronic device. Illustratively, the first electronic device may query and obtain the application program list installed on the first electronic device through the PackageManager Service service, that is, the PMS service, and synchronize one by traversing the application program list.
The identification information of the application in the embodiment of the present application refers to any information that can distinguish the unique identity of the application, including, but not limited to, the name of the application, the name of the program installation package of the application, and the like.
In step S12, a program data package of the application program may be locally acquired from the first electronic device according to the identification information, the program data package should include at least a program installation package.
The program data packet may further include a program user data packet, and at this time, the program user data packet may be synchronized to the second electronic device, so that an application program of the second electronic device may follow user data of the first electronic device, and user habits may be continued, which may further improve practicality and user experience.
When the program data packet includes a program user data packet, the program installation packet of the application program and the program user data packet of the application program may be acquired by the PMS service according to the identification information of the application program in step S12. For example, when the application program is a map application, a program installation package of the map program can be obtained in the data/app directory according to the program installation package name "com.services.map" of the application program, and a program user data package of the map program can be obtained in the data/data directory according to the program installation package name "com.services.map" of the application program, specifically, the content under the data/data/com.services.map folder can be compressed to obtain the program user data package.
When the program data packet includes a program user data packet, first data length information of the program installation packet may be determined and second data length information of the program user data packet may be determined in step S13. And then, carrying out packaging processing based on the first data length information, the program installation package, the second data length information and the program user data package to obtain a program resource package to be synchronized. That is, as shown in fig. 2, in step S14, the following sub-steps may be included:
s201: the method comprises the steps of placing first data length information under a preset first encapsulation field, placing a program installation package under a preset second encapsulation field, placing second data length information under a preset third encapsulation field, and placing a program user data package under a preset fourth encapsulation field.
S202: and carrying out overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
Wherein the second encapsulated field is immediately after the first encapsulated field and the fourth encapsulated field is immediately after the third encapsulated field. Thus, for the second electronic device receiving the program resource package, the content in the first encapsulation field can be read first, and then the whole content in the second encapsulation field can be read according to the first data length information in the first encapsulation field; similarly, for the second electronic device that receives the program resource package, the content in the third encapsulation field may be read first, and then the entire content in the fourth encapsulation field may be read according to the second data length information in the third encapsulation field.
It may be understood that the number of bytes occupied by the first encapsulation field and the third encapsulation field and the data type in the embodiment of the present application may be preset, for example, may be set to a long data value, occupy 8 bytes, and for decapsulation, at this time, 8 bytes may be sequentially read in the first encapsulation field, the read value is the data length of the program installation packet in the second encapsulation field, and similarly, 8 bytes may be sequentially read in the third encapsulation field, and the read value is the program user packet in the fourth encapsulation field.
In this embodiment of the present application, a check identifier corresponding to a data encapsulation rule may be determined, and the check identifier is placed under a preset fifth encapsulation field, and then, overall encapsulation is performed based on contents in the fifth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field, to obtain a program resource package to be synchronized.
In this example, a corresponding check identifier may be preset for the data encapsulation processing rule, when data encapsulation processing is required to be performed by the data encapsulation processing rule, the check identifier is placed under a preset fifth encapsulation field, so after receiving a program resource packet, the second electronic device may read the check identifier from the fifth encapsulation field, and according to the check identifier, the second electronic device may determine that the program resource packet is obtained by performing encapsulation processing on the data encapsulation processing rule, and then, the second electronic device may perform data decapsulation processing on the received program resource packet according to the data decapsulation processing rule corresponding to the data encapsulation processing rule to obtain contents in each encapsulation field. Optionally, the fifth encapsulated field is the first field, so that the second electronic device can obtain the check identifier preferentially, so that whether the received program resource packet is obtained by encapsulation processing through the data encapsulation processing rule can be judged preferentially, if so, the encapsulated field behind the first field is read sequentially through the data decapsulation processing, and if not, the content in the encapsulated field behind the first field is not read through the data decapsulation processing, so that the program synchronization efficiency can be improved.
It can be understood that, in the embodiment of the present application, the number of bytes in the fifth encapsulation field may be set in advance, for example, may occupy 3 bytes, and in this case, for deblocking, 3 bytes may be sequentially read in the fifth encapsulation field, where the read value is a check identifier.
In this embodiment of the present application, the total data length information of the program data packet may be determined, and the total data length information may be placed in a preset sixth encapsulation field, and the overall encapsulation processing may be performed based on the contents in the sixth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field, to obtain the program resource packet to be synchronized.
It can be understood that the number of bytes occupied by the sixth encapsulation field and the data type in the embodiment of the present application may be preset, for example, may be set to a long type data value, and occupy 8 bytes, and for deblocking, 8 bytes may be sequentially read in the sixth encapsulation field, where the read value is the total length information of the data of the program data packet.
For example, in the embodiment of the present application, third data length information of identification information of an application program to be currently synchronized may also be determined, the third data length information is placed under a preset seventh encapsulation field, and the identification information is placed under a preset eighth encapsulation field; and carrying out overall encapsulation processing based on the contents in the seventh encapsulation field, the eighth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized. Optionally, the eighth encapsulated field is immediately after the seventh encapsulated field, so that, for the second electronic device that receives the program resource package, the content in the seventh encapsulated field may be read first, and then, according to the third data length information in the seventh encapsulated field, the entire content in the eighth encapsulated field may be read.
It should be noted that, in the embodiment of the present application, the number of bytes occupied by the seventh encapsulation field and the eighth encapsulation field and the data type may be set in advance, for example, the seventh encapsulation field may also be set to a long data value, and occupy 8 bytes of length, and the eighth encapsulation field may be a character string type, and for deblocking, 8 bytes may be sequentially read in the seventh encapsulation field, and the read value is the length of identification information in the eighth encapsulation field, for example, when the value read from the seventh encapsulation field is 13, 13 bytes may be sequentially read, and identification information may be parsed according to a protocol.
In the embodiment of the application, the program package may be obtained by integrally packaging the contents in the first package field, the second package field, the third package field and the fourth package field; and encrypting the program package to obtain a program resource package to be synchronized. In the embodiment of the present application, RSA symmetric data encryption may be performed on the program package, and it will be understood that, in other embodiments, other encryption manners may also be used to encrypt the program package.
It can be appreciated that the arrangement of the encapsulation fields in the embodiments of the present application may be flexibly set by a developer as required. For example, in a first alternative embodiment, the data encapsulation format may be as shown in fig. 3, and in fig. 3, the fifth encapsulation field, the sixth encapsulation field, the seventh encapsulation field, the eighth encapsulation field, the third encapsulation field, the fourth encapsulation field, the first encapsulation field, and the second encapsulation field are sequentially arranged. For example, in a second alternative embodiment, the data encapsulation format may be as shown in fig. 4, and in fig. 4, the fifth encapsulation field, the seventh encapsulation field, the eighth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field are sequentially arranged. At this time, for step S14, the corresponding data may be subjected to the encapsulation processing according to the data encapsulation format shown in fig. 3 or fig. 4.
The first electronic device in the embodiment of the application may establish a communication connection with the second electronic device, specifically may establish a wireless communication connection, and the first electronic device may send the program resource package to the second electronic device through bluetooth, 5G, WIFI, radio frequency, and other modes.
The embodiment of the application also provides an application program synchronization method applied to the second electronic device side, referring to fig. 5, including:
s51: and receiving a program resource packet of the application program to be synchronized, which is sent by the first electronic equipment.
S52: obtaining the data length information of the program data package of the application program according to the program resource package; the program data package includes a program installation package.
S53: the program data packet is read based on the data length information.
S54: and installing the application program according to the program data packet.
The program data packet in the embodiment of the present application may further include a program user data packet, where step S52 may include:
decrypting the program resource package to obtain a program package;
reading first data length information of a program installation package from a first packaging field of the program packaging package, and reading second data length information of a program user data package from a third packaging field of the program packaging package;
at this time, for step S53, it may include:
reading a program installation package from a second packaging field in the program packaging package according to the first data length information, and reading a program user data package from a fourth packaging field in the program packaging package according to the second data length information; the second encapsulated field immediately follows the first encapsulated field, and the fourth encapsulated field immediately follows the third encapsulated field;
at this time, for step S54, it may include:
and installing the application program according to the program installation package, and synchronizing the user data of the application program according to the program user data package.
It can be understood that the second electronic device may decrypt the program resource package by using a decryption algorithm corresponding to the encryption algorithm used by the first electronic device to obtain a program package, for example, when the first electronic device encrypts the program package by using an RSA symmetric data encryption algorithm, the second electronic device may decrypt the program resource package by using an RSA symmetric data decryption algorithm to obtain the program package.
For example, before the first data length information of the program installation package is read from the first encapsulation field of the program encapsulation package and the second data length information of the program user data package is read from the third encapsulation field of the program encapsulation package, the check identifier may be further read from the fifth encapsulation field in the program encapsulation package to check the check identifier. Optionally, the fifth encapsulation field is a header field.
Illustratively, the total length information of the data of the program data packet may also be read from under the sixth encapsulation field of the program encapsulation packet.
For example, the third data length information of the identification information of the application program to be synchronized may be read from the seventh encapsulation field of the program encapsulation packet, and then the identification information may be read from the eighth encapsulation field of the program encapsulation packet according to the third data length information.
It should be noted that, the application synchronization method applied to the second electronic device side in the embodiment of the present application substantially includes the reverse process of the application synchronization method applied to the first electronic device side, so reference may be made to the description of the application synchronization method applied to the first electronic device side, and some repeated descriptions are not repeated here.
For a better understanding of the application synchronization method provided in the embodiments of the present application, a specific example is described herein. In this example, the first electronic device is a mobile phone, the second electronic device is a vehicle-mounted terminal, and a flow chart corresponding to a synchronization application program from the mobile phone to the vehicle-mounted terminal can be shown in fig. 6.
Before synchronization, the user has manually paired with the car machine, and the mobile phone end of the user installs the synchronization service, and then the following steps can be executed:
step one: and actively transmitting a synchronous signal to the mobile phone by the vehicle-mounted terminal based on the Bluetooth reconnection signal.
Step two: after receiving the synchronizing signal, the mobile phone inquires and acquires an application program list installed on the mobile phone through the PMS service, and traverses the application program list to synchronize one by one. The following describes in terms of an application program flow, such as a map application.
Step three: the map application package name, such as com.services.map, can be obtained through the PMS service, the program installation package of the map application is obtained in the data/app directory, and the data/data/com.services.map folder, namely the user data directory is compressed through zip to obtain the program data package.
Step four: SAP (SAP) packaging flow: the program installation package and the program data package are packaged by a custom data packaging format, and the specific packaging format can be shown in fig. 7.
Encapsulation protocol annotation: the whole structure comprises a header, a size and a track, wherein the first header is a data protocol check bit fixed as SAP; the second partial size is the subsequent track overall data length; the third portion is made up of 1 or more track DATA bodies, each including len+data, whereby multiple DATA classifications can be identified. In the package format shown in the above figure, a specific data structure can be seen as: "SAP" + "com.service" + "program installation package" + "program user data package"
Step five: and (3) data transmission: and E, carrying out RSA encryption on the whole SAP data packet obtained in the step four, and sending the SAP data packet to a remoteService service process of the Android cabin end through a standard Bluetooth data transmission protocol.
Step six: after the vehicle-mounted RemoteService receives the encrypted data packet, RSA symmetric data decryption is firstly carried out on the encrypted data packet, if decryption fails, the encrypted data packet is discarded, and if decryption succeeds, step seven is carried out.
Step seven: SAP deblocking flow: a. first check the data header "SAP"; b. sequentially reading 8 bytes, and combining the 8 bytes into a long data value according to a big endian, wherein the value is defined as the whole length of the data packet according to a protocol, such as 307229; c. sequentially reading 8 bytes again, and combining the 8 bytes into a long data value with a large endian, wherein the long data value is the length LEN0 of the first track0, such as 13; d. sequentially reading LEN0, namely 13 bytes, and analyzing the LEN0 into a character string 'com.services.map' for standby according to protocol convention; e. sequentially reading 8 bytes, denoted as track1 length LEN1, as 102400; f. sequentially reading LEN1, such as 102400 bytes, and according to protocol convention, storing the program installation package as a file for local standby; g. the program user data packets are stored to local for later use in the same track read step as e-f.
Step eight: and (3) mobile phone installation application: installing the application by passing the program installation package through a PMS standard API; and decompressing the program user data packet to the data/data/com.services.map directory, wherein the newly added application program can be displayed at the terminal of the seat cabin, and the application program is opened for use based on the user data of the mobile phone terminal.
Through the eight steps, the mobile phone end completes transmission of one application program at the cabin end, and the like, transmission of a plurality of applications can be completed, so that the aim of synchronizing all Android application programs of the mobile phone end is fulfilled.
According to the application program synchronization method, the identification information of the application program to be synchronized currently is obtained, then the program data package of the application program is obtained according to the identification information, the data length information of the program data package is determined, the program resource package to be synchronized is obtained through packaging processing based on the data length information and the program data package, the program resource package is sent to another electronic device connected with the current electronic device, and the other electronic device completes installation of the application program according to the program resource package, so that synchronization of the application program between the two electronic devices is achieved, a user does not need to manually download the application program on the side of the other electronic device, user operation is simplified, and user experience is improved.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described above may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with at least a part of the sub-steps or stages of other steps or other steps.
Embodiment two:
the present embodiment provides an electronic device, please refer to fig. 8, which includes a processor 801 and a memory 802, wherein a computer program is stored in the memory 802, the processor 801 and the memory 802 implement communication through a communication bus, and the processor 801 executes the computer program to implement each step of the method in the above embodiment, which is not described herein. It will be appreciated that the configuration shown in fig. 8 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 8, or have a different configuration than shown in fig. 8.
The processor 801 may be an integrated circuit chip with signal processing capabilities. The processor 801 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. Which may implement or perform the various methods, steps, and logical blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 802 may include, but is not limited to, random Access Memory (RAM), read Only Memory (ROM), programmable Read Only Memory (PROM), erasable read only memory (EPROM), electrically erasable read only memory (EEPROM), and the like.
The present embodiment also provides a computer readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a usb disk, an SD card, an MMC card, etc., in which one or more programs for implementing the above steps are stored, and the one or more programs may be executed by the one or more processors 801 to implement the steps of the method in the above embodiments, which is not described herein again.
It should be noted that, the illustrations provided in the present embodiment merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complex. The structures, proportions, sizes, etc. shown in the drawings attached hereto are for illustration purposes only and are not intended to limit the scope of the invention, which is defined by the claims, but rather by the claims. Also, the terms such as "upper," "lower," "left," "right," "middle," and "a" and the like recited in the present specification are merely for descriptive purposes and are not intended to limit the scope of the invention, but are intended to provide relative positional changes or modifications without materially altering the technical context in which the invention may be practiced.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. An application synchronization method, applied to a first electronic device, comprising:
when the current meeting of the application program synchronization conditions is determined, acquiring the identification information of the current application program to be synchronized;
acquiring a program data packet of the application program according to the identification information; the program data package comprises a program installation package;
determining data length information of the program data packet;
packaging the data length information and the program data package according to a preset data packaging processing rule to obtain a program resource package to be synchronized;
and sending the program resource package to a second electronic device which establishes connection with the first electronic device.
2. The application synchronization method of claim 1, wherein the program data packet further comprises a program user data packet, and wherein the determining the data length information of the program data packet comprises:
determining first data length information of the program installation package and determining second data length information of the program user data package;
the step of performing encapsulation processing on the data length information and the program data packet according to a preset data encapsulation processing rule to obtain a program resource packet to be synchronized comprises the following steps:
placing the first data length information under a preset first encapsulation field, placing the program installation package under a preset second encapsulation field, placing the second data length information under a preset third encapsulation field, and placing the program user data package under a preset fourth encapsulation field; the second encapsulated field immediately follows the first encapsulated field, and the fourth encapsulated field immediately follows the third encapsulated field;
and carrying out overall encapsulation processing based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
3. The application program synchronization method as claimed in claim 2, wherein said performing overall encapsulation based on contents in the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field to obtain a program resource package to be synchronized includes:
determining a verification identifier corresponding to the data encapsulation processing rule;
placing the verification mark under a preset fifth packaging field; the fifth encapsulation field is a header field;
and carrying out overall encapsulation processing based on the contents in the fifth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
4. The application synchronization method according to claim 2, wherein the determining the data length information of the program data packet includes:
determining the total data length information of the program data packet;
the overall encapsulation processing is performed based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field, so as to obtain a program resource package to be synchronized, including:
placing the total length information of the data under a preset sixth encapsulation field;
and carrying out overall encapsulation processing based on the contents in the sixth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
5. The application program synchronization method as claimed in claim 2, wherein said performing overall encapsulation based on contents in the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field to obtain a program resource package to be synchronized includes:
determining third data length information of the identification information;
placing the third data length information under a preset seventh encapsulation field, and placing the identification information under a preset eighth encapsulation field; the eighth encapsulated field immediately follows the seventh encapsulated field;
and carrying out overall encapsulation processing based on the contents in the seventh encapsulation field, the eighth encapsulation field, the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program resource package to be synchronized.
6. The application program synchronization method as claimed in claim 2, wherein said performing overall encapsulation based on contents in the first encapsulation field, the second encapsulation field, the third encapsulation field, and the fourth encapsulation field to obtain a program resource package to be synchronized includes:
performing overall encapsulation based on the contents in the first encapsulation field, the second encapsulation field, the third encapsulation field and the fourth encapsulation field to obtain a program encapsulation package;
and encrypting the program package to obtain a program resource package to be synchronized.
7. An application synchronization method, applied to a second electronic device, the method comprising:
receiving a program resource packet of an application program to be synchronized, which is sent by first electronic equipment;
obtaining the data length information of the program data packet of the application program according to the program resource packet; the program data package comprises a program installation package;
reading the program data packet based on the data length information;
and installing the application program according to the program data packet.
8. The application synchronization method according to claim 7, wherein the program data packet further includes a program user data packet, the obtaining data length information of the program data packet of the application according to the program resource packet includes:
decrypting the program resource package to obtain a program package;
reading first data length information of the program installation package from a first packaging field of the program packaging package, and reading second data length information of the program user data package from a third packaging field of the program packaging package;
the reading the program data packet based on the data length information includes:
reading the program installation package from a second encapsulation field in the program encapsulation package according to the first data length information, and reading the program user data package from a fourth encapsulation field in the program encapsulation package according to the second data length information; the second encapsulated field immediately follows the first encapsulated field, and the fourth encapsulated field immediately follows the third encapsulated field;
the application program installation according to the program data package comprises the following steps:
and installing the application program according to the program installation package, and synchronizing the user data of the application program according to the program user data package.
9. The application synchronization method of claim 8 wherein before said reading the first data length information of the program installation package from the first encapsulation field of the program encapsulation package and reading the second data length information of the program user data package from the third encapsulation field of the program encapsulation package, the method comprises:
reading a verification identifier from the fifth encapsulation field in the program encapsulation packet; the fifth encapsulation field is a header field;
and checking the check mark.
10. An electronic device comprising a processor and a memory, the memory having stored therein a computer program, the processor executing the computer program to implement the method of any of claims 1-9.
CN202310403282.9A 2023-04-17 2023-04-17 Application program synchronization method and electronic device Pending CN116483379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310403282.9A CN116483379A (en) 2023-04-17 2023-04-17 Application program synchronization method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310403282.9A CN116483379A (en) 2023-04-17 2023-04-17 Application program synchronization method and electronic device

Publications (1)

Publication Number Publication Date
CN116483379A true CN116483379A (en) 2023-07-25

Family

ID=87214884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310403282.9A Pending CN116483379A (en) 2023-04-17 2023-04-17 Application program synchronization method and electronic device

Country Status (1)

Country Link
CN (1) CN116483379A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150254067A1 (en) * 2014-03-04 2015-09-10 Adobe Systems Incorporated Method and apparatus for synchronizing application configuration data over a network
CN107645597A (en) * 2017-09-19 2018-01-30 上海闻泰信息技术有限公司 The synchronous method and terminal of application program
CN115185571A (en) * 2021-04-01 2022-10-14 北京小米移动软件有限公司 Application data management method and device, electronic equipment and storage medium
CN115686542A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Application installation method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150254067A1 (en) * 2014-03-04 2015-09-10 Adobe Systems Incorporated Method and apparatus for synchronizing application configuration data over a network
CN107645597A (en) * 2017-09-19 2018-01-30 上海闻泰信息技术有限公司 The synchronous method and terminal of application program
CN115185571A (en) * 2021-04-01 2022-10-14 北京小米移动软件有限公司 Application data management method and device, electronic equipment and storage medium
CN115686542A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Application installation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107005837B (en) Apparatus and method for profile installation in a communication system
CN107612909B (en) Information interaction method, device and equipment about Internet of things equipment
CN111343199B (en) Communication method and system of double-core intelligent electric meter
CN108701017B (en) Method and device for updating operating system
CN109379380A (en) Data transmission method, data receiver method and remote printing system, mobile terminal
CN109428710A (en) Data transmission method, device, storage medium and processor
CN104683422A (en) Method and device for transmitting data
CN109831775B (en) Processor, baseband chip and SIM card information transmission method
CN109743757B (en) Data processing method and device, wireless module and Internet of things equipment
CN110012455B (en) Account information management method and device and electronic equipment
CN112686358A (en) Data transmission method, NFC electronic tag, terminal device and storage medium
CN112883388A (en) File encryption method and device, storage medium and electronic device
CN114363055B (en) Data transmission method and device, computer equipment and storage medium
CN108833500B (en) Service calling method, service providing method, data transmission method and server
CN113556340B (en) Portable VPN terminal, data processing method and storage medium
CN113238789A (en) Electronic equipment, firmware upgrading method and device thereof and computer readable storage medium
CN116483379A (en) Application program synchronization method and electronic device
CN104732166A (en) Data storing and reading method and device and equipment
CN115004634B (en) Information processing method, device, equipment and storage medium
KR20090106103A (en) System and Method for Managing Smart Card Information
CN113709849A (en) Network access method and device of equipment to be accessed to network, storage medium and electronic device
CN111526514A (en) Method and apparatus for multi-band communication
CN105338524A (en) Information transmission method and device
KR102610911B1 (en) Method and apparatus for segmenting data unit
CN114978950B (en) Network algorithm calling method and system based on FPGA and CPU cooperation

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
TA01 Transfer of patent application right

Effective date of registration: 20240116

Address after: No. 13 Xingxiang Road, Zengjia Town, High tech Zone, Jiulongpo District, Chongqing, 400039

Applicant after: Chongqing Selis Phoenix Intelligent Innovation Technology Co.,Ltd.

Address before: 610095 No. 2901, floor 29, unit 1, building 1, No. 151, Tianfu Second Street, high tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan Province

Applicant before: Chengdu Thalys Technology Co.,Ltd.

TA01 Transfer of patent application right