Data transmission method and device
By judging the type of data to be connected and the existence of applications on the device, data connection and transmission between devices are realized, the success rate of data transmission is improved, and the problem of failure of data transmission between devices in the prior art is solved.
Patent Information
- Application Number
- CN202310766521.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, the success rate of data transmission between two devices is low, especially between mobile applications and other types of electronic devices, resulting in data failure and transmission failure.
By determining whether the to-going data belongs to the encrypted type data, and when it does not belong to the encrypted type, check whether the first device is equipped with the same local similar application as the target application. If it exists, it returns the connection indication information, instructing the second device to send the to-going data. , and use local similar applications to load data to avoid transmission failures caused by inconsistency in applications.
It improves the success rate of data transmission between two devices, ensures that data can be successfully connected and transmitted, and solves the transmission failure problem caused by inconsistent application between devices.
Smart Images

Figure CN119211252A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method and device. Background Art
[0002] Application continuation is the seamless flow of tasks between multiple devices under the same account. For example, when a user is editing a certain content on device A and needs to switch devices, the user only needs to respond to the continuation request on the device to be switched to (such as device B) to continue editing the above content on device B. However, mobile applications are often more than other types of electronic devices. When other types of electronic devices do not have the applications on the mobile phone, data cannot be continued, causing data transmission failure.
[0003] That is, the success rate of data transmission between two devices in the prior art is low. Summary of the invention
[0004] The embodiments of the present application provide a data transmission method and apparatus, which can improve the success rate of data transmission between two devices.
[0005] In a first aspect, the data transmission method provided by the present application is applied to a first device, including:
[0006] In the case of receiving a connection request based on the data to be connected by the target application from the second device, determining whether the data to be connected is encrypted data;
[0007] If the data to be continued is not encrypted data, determining whether a local application of the same type as the target application is installed on the first device;
[0008] If a local application of the same type as the target application is installed on the first device, return connection indication information to the second device, where the connection indication information is used to instruct the second device to send the to-be-connected data to the first device;
[0009] When the data to be continued is received from the second device, the data to be continued is loaded by using the local application of the same type.
[0010] In an optional embodiment, if a local application of the same type as the target application is installed on the first device, returning connection indication information to the second device includes:
[0011] If no local application of the same type as the target application is installed on the first device, determining whether the local application of the same type has permission to load the data to be continued;
[0012] If the local application of the same type has the permission to load the data to be continued, the connection indication information is returned to the second device.
[0013] In an optional embodiment, when receiving a connection request from a target application based on the data to be connected sent by the second device, determining whether the data to be connected is encrypted data includes:
[0014] In case of receiving a connection request of the target application based on the to-be-connected data sent by the second device, determining whether a local application with the same application name as the target application is installed on the first device;
[0015] If no local application with the same application name as the target application is installed on the first device, it is determined whether a local application of the same type as the target application is installed on the first device.
[0016] In an optional embodiment, the data transmission method includes:
[0017] If a local application with the same application name as the target application is installed on the first device, determining whether the local application with the same application name is compatible with the target application;
[0018] If the local application with the same name is compatible with the target application, a connection indication message is returned to the second device.
[0019] In a second aspect, the data transmission method provided by the present application is applied to a second device, including:
[0020] When a click operation on a target application is detected, obtaining the to-be-connected data of the target application;
[0021] Sending a connection request based on the to-be-connected data to the first device by the target application;
[0022] In case of obtaining the connection indication information returned by the first device, the data to be continued is sent to the first device, wherein the first device determines whether the data to be continued is encrypted type data when obtaining the connection request of the target application based on the data to be continued issued by the second device; if the data to be continued is not encrypted type data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, the connection indication information is returned to the second device.
[0023] In an optional embodiment, when the connection indication information returned by the first device is obtained, sending the to-be-connected data to the first device includes:
[0024] When the connection indication information returned by the first device is obtained, a connection pop-up window is issued;
[0025] When an operation of clicking on the continue pop-up window is detected, the to-be-continued data is sent to the first device.
[0026] In an optional embodiment, the sending of a connection request of the target application based on the data to be connected to the first device includes:
[0027] If the target application is running for the first time, a connection request of the target application based on the data to be connected is sent to the first device.
[0028] In an optional embodiment, the data transmission method includes:
[0029] If the target application is not being run for the first time, determining whether the target application is a registered succession application based on preset registration information, wherein the preset registration information includes whether each application on the second device is a registered succession application that supports succession with the first device;
[0030] If the target application does not belong to the registered continuation application, a continuation request of the target application based on the data to be continued is sent to the first device.
[0031] In an optional embodiment, the data transmission method includes:
[0032] If the target application is a registered succession application, the to-be-continued data is sent to the first device.
[0033] In a third aspect, the data transmission device provided by the present application includes:
[0034] A first judgment module is used to judge whether the data to be connected is encrypted data when receiving a connection request based on the data to be connected from the target application sent by the second device;
[0035] A second judgment module is used to judge whether a local application of the same type as the target application is installed on the first device if the data to be continued is not encrypted data;
[0036] a return module, configured to return connection indication information to the second device if a local application of the same type as the target application is installed on the first device, wherein the connection indication information is used to instruct the second device to send the to-be-connected data to the first device;
[0037] A loading module is used to load the data to be continued by using the local similar application when receiving the data to be continued returned by the second device.
[0038] In an optional embodiment, the return module is used to:
[0039] If no local application of the same type as the target application is installed on the first device, determining whether the local application of the same type has permission to load the data to be continued;
[0040] If the local application of the same type has the permission to load the data to be continued, the connection indication information is returned to the second device.
[0041] In an optional embodiment, the first determination module is used to:
[0042] In case of receiving a connection request of the target application based on the to-be-connected data sent by the second device, determining whether a local application with the same application name as the target application is installed on the first device;
[0043] If no local application with the same application name as the target application is installed on the first device, it is determined whether a local application of the same type as the target application is installed on the first device.
[0044] In an optional embodiment, the return module is used to:
[0045] If a local application with the same application name as the target application is installed on the first device, determining whether the local application with the same application name is compatible with the target application;
[0046] If the local application with the same name is compatible with the target application, a connection indication message is returned to the second device.
[0047] In a fourth aspect, the data transmission device provided by the present application includes:
[0048] An acquisition module, configured to acquire the to-be-connected data of the target application when an operation of clicking on the target application is detected;
[0049] A request sending module, used for sending a connection request of a target application based on the data to be connected to the first device;
[0050] A data sending module is used to send the data to be continued to the first device when the connection indication information returned by the first device is obtained, wherein the first device determines whether the data to be continued is encrypted type data when the connection request based on the data to be continued by the target application issued by the second device is obtained; if the data to be continued is not encrypted type data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, the connection indication information is returned to the second device.
[0051] In an optional embodiment, the data sending module is used to:
[0052] When the connection indication information returned by the first device is obtained, a connection pop-up window is issued;
[0053] When an operation of clicking on the continue pop-up window is detected, the to-be-continued data is sent to the first device.
[0054] In an optional embodiment, the request sending module is used to:
[0055] If the target application is running for the first time, a connection request of the target application based on the data to be connected is sent to the first device.
[0056] In an optional embodiment, the request sending module is used to:
[0057] If the target application is not being run for the first time, determining whether the target application is a registered succession application based on preset registration information, wherein the preset registration information includes whether each application on the second device is a registered succession application that supports succession with the first device;
[0058] If the target application does not belong to the registered continuation application, a continuation request of the target application based on the data to be continued is sent to the first device.
[0059] In an optional embodiment, the request sending module is used to:
[0060] If the target application is a registered succession application, the to-be-continued data is sent to the first device.
[0061] In a fifth aspect, the electronic device provided in the present application includes a memory and a processor, the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the data transmission method of the first aspect or the steps in the data transmission method of the second aspect provided in the present application.
[0062] In a sixth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the data transmission method of the first aspect or the steps in the data transmission method of the second aspect provided in the present application.
[0063] In the seventh aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implement the steps in the data transmission method of the first aspect or the steps in the data transmission method of the second aspect provided in the present application.
[0064] In the present application, compared with the related art, when a continuation request issued by the second device is detected, it is first determined whether the data to be continued corresponding to the continuation request is encrypted type data. When the data to be continued corresponding to the continuation request is encrypted type data, it indicates that the data to be continued of the target application can be loaded using a similar application. Then, it is determined whether a local similar application of the same application type as the target application is installed on the first device. When a local similar application of the same application type as the target application is installed on the first device, the second device is instructed to send the data to be continued and load it using the local similar application, so as to avoid the situation where the data cannot be transmitted due to inconsistency of the applications installed on the two devices, thereby improving the success rate of data transmission between the two devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 is a scenario diagram of a data transmission system provided in an embodiment of the present application;
[0067] Figure 2 It is a flowchart of a first embodiment of a data transmission method provided in an embodiment of the present application;
[0068] Figure 3 It is a flowchart of a second embodiment of the data transmission method provided in the embodiment of the present application;
[0069] Figure 4 It is a flowchart of a third embodiment of the data transmission method provided in the embodiments of the present application;
[0070] Figure 5 4 is a flowchart of a fourth embodiment of a data transmission method provided in an embodiment of the present application;
[0071] Figure 6is a schematic diagram of the structure of an embodiment of a data transmission device provided in an embodiment of the present application;
[0072] Figure 7 is a schematic diagram of the structure of another embodiment of the data transmission device provided in the embodiment of the present application;
[0073] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.
[0075] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0076] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0078] In order to improve the success rate of data transmission, the embodiments of the present application provide a data transmission method, a data transmission device, an electronic device, a computer-readable storage medium, and a computer program product. The data transmission method can be executed by the data transmission device, or by an electronic device integrated with the data transmission device; the data transmission method can be executed by the data transmission device, or by an electronic device integrated with the data transmission device.
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0080] Please refer to Figure 1 , the present application also provides a data transmission system, such as Figure 1 As shown, the data transmission system includes a first electronic device 100 and a second electronic device 200. The first electronic device 100 is integrated with the data transmission device provided by the present application, and the second electronic device 200 is integrated with the data transmission device provided by the present application.
[0081] Among them, the first electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.
[0082] Among them, the second electronic device 200 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.
[0083] In a specific embodiment, the first electronic device 100 is a vehicle-mounted terminal, and the second electronic device 200 is a mobile terminal. In another specific embodiment, the first electronic device 100 is a desktop computer, and the second electronic device 200 is a mobile terminal. In yet another specific embodiment, the first electronic device 100 is a television, and the second electronic device 200 is a mobile terminal.
[0084] In addition, the data transmission system may further include a memory for storing original data, intermediate data and result data.
[0085] In the embodiment of the present application, the memory may be a cloud memory. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0086] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
[0087] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
[0088] It should be noted that Figure 1 The scenario diagram of the data transmission system shown is merely an example. The data transmission system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the data transmission system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0089] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0090] Please refer to Figure 2 , Figure 2 is a flow chart of a first embodiment of a data transmission method provided in an embodiment of the present application, such as Figure 2 As shown, the process of the data transmission method provided by this application is as follows:
[0091] 201. When receiving a connection request from a target application based on data to be connected sent by a second device, determine whether the data to be connected is encrypted data.
[0092] Among them, the application type of the target application can be music radio applications, video playback applications, social communication applications, news reading applications, game applications, online shopping applications, travel applications, financial management applications, conference applications, utility applications, office software applications, education and learning applications, medical and health applications, system optimization applications, life and entertainment applications and other application types. The data to be continued is the data that the target application needs to continue to the first device. For example, the target application is a video playback application A of the video playback type, and the data to be continued includes the playback information of the currently playing video. The video playback information includes: video number, video title, video network address, video playback progress, video introduction information, video cover, etc.
[0093] The connection request of the target application based on the data to be connected includes data attribute information of the data to be connected and application attribute information of the target application.
[0094] The data attribute information of the data to be continued includes the encryption attribute, data format and data type of the data to be continued. The encryption attribute of the data to be continued is represented by the encryption attribute field, for example, the encryption attribute field is boolencrypted. If the value of bool encrypted is 1, it means that the encryption attribute of the data to be continued is encrypted type data, and if the value of bool encrypted is 0, it means that the encryption attribute of the data to be continued is unencrypted type data. The data type of the data to be continued can be JSON string, Protobuf, FlatBuffers, bit array, etc.
[0095] The application attribute information of the target application includes the application name, application package name, application string version number, application digital version number, application type, etc. of the target application.
[0096] In a specific embodiment, the format of the connection request for the data to be connected is as follows:
[0097]
[0098]
[0099] In the embodiment of the present application, after the user clicks the target application on the second device, the second device obtains the data attribute information of the data to be continued and the application attribute information of the target application. A connection request is generated according to the data attribute information of the data to be continued and the application attribute information of the target application, and the first device obtains the connection request.
[0100] 202. If the data to be continued is not encrypted data, determine whether a local application of the same type as the target application is installed on the first device.
[0101] In the embodiment of the present application, if the data to be continued is not encrypted data, the application type of the target application is obtained, and it is determined whether a local application of the same application type as the target application is installed on the first device.
[0102] For example, if the target application is video playback application A, and video playback application B is installed on the first device, and video playback application A and video playback application B belong to the same video playback application category, then it is determined that a local application of the same type as the target application is installed on the first device.
[0103] 203. If a local application of the same type as the target application is installed on the first device, a connection indication message is returned to the second device.
[0104] The connection indication information is used to instruct the second device to send the data to be connected to the first device.
[0105] In an embodiment of the present application, if a local similar application of the same application type as the target application is installed on the first device, indicating that the target application can be continued through the local similar application on the first device based on the data to be continued, then a connection indication information is returned to the second device, and the connection indication information is used to instruct the second device to send the data to be continued to the first device.
[0106] 204. When receiving the data to be continued returned by the second device to the first device, use a local application of the same type to load the data to be continued.
[0107] In a specific embodiment, when the to-be-connected data returned by the second device to the first device is received, a local application of the same type is run in the foreground and the to-be-connected data is loaded.
[0108] Please refer to Figure 3 , Figure 3 is a flow chart of a second embodiment of a data transmission method provided in an embodiment of the present application. The data transmission method provided in the present application is applied to a first device, such as Figure 3 As shown, the process of the data transmission method provided by this application is as follows:
[0109] 301. Detect whether a connection request of a target application based on data to be connected, sent by a second device, is obtained.
[0110] In the embodiment of the present application, a preset detection period is used to detect whether a connection request based on the data to be connected issued by the second device is obtained by the target application, wherein the preset detection period can be 1s, 2s, etc., depending on the specific setting.
[0111] 302. Determine whether a local application with the same application name as the target application is installed on the first device.
[0112] In the embodiment of the present application, when a connection request based on the to-be-connected data of the target application sent by the second device is received, it is determined whether a local application with the same application name as the target application is installed on the first device. Specifically, the application names of each local application on the first device are obtained, and the application names of each local application on the first device are matched with the application name of the target application respectively, to determine whether a local application with the same application name as the target application is installed on the first device.
[0113] In the embodiment of the present application, if the first device does not have a local application with the same name as the target application installed, it is necessary to determine whether the data to be continued can be loaded by a local application of the same type on the first device, and then execute 303: determine whether the data to be continued is encrypted data. If the first device has a local application with the same name as the target application installed, it is necessary to further determine whether the local application with the same name is compatible with the target application, and then execute 306: determine whether the local application with the same name is compatible with the target application.
[0114] 303. Determine whether the data to be continued is encrypted data.
[0115] If no local application with the same application name as the target application is installed on the first device, it is determined whether the data to be continued is encrypted data.
[0116] 304. Determine whether a local application of the same type as the target application is installed on the first device.
[0117] If the data to be continued is not encrypted data, it is determined whether the local application of the same type has the authority to load the data to be continued. If the data to be continued is encrypted data, it ends and returns end indication information to the second device, wherein the end indication information is used to instruct the second device to end the connection.
[0118] 305. Determine whether a local application of the same type has permission to load the data to be continued.
[0119] In a specific embodiment, the data to be continued is video playback information. The video number of the data to be continued is obtained, and it is determined whether the media resource library of the local similar application contains the video number of the data to be continued. If the media resource library of the local similar application contains the video number of the data to be continued, it means that the local similar application has the authority to load the data to be continued. If the local similar application has the authority to load the data to be continued, the local similar application is used to load the data to be continued. If the local similar application does not have the authority to load the data to be continued, the process ends and an end indication message is returned to the second device, wherein the end indication message is used to instruct the second device to end the connection.
[0120] 306. Determine whether the local application with the same name is compatible with the target application.
[0121] In an embodiment of the present application, if a local application with the same application name as the target application is not installed on the first device, the local application of the same type has the permission to load the data to be continued, and the compatible version number range of the local application with the same name and the version number of the target application are obtained. If the version number of the target application belongs to the compatible version number range of the local application with the same name, it is determined that the local application with the same name is compatible with the target application.
[0122] Further, if the local application with the same name is compatible with the target application, the to-be-connected number is loaded using the local application with the same name; if the local application with the same name is not compatible with the target application, S304 is executed: determining whether a local application of the same type as the target application is installed on the first device.
[0123] 307. Return connection indication information to the second device.
[0124] In the embodiment of the present application, if the local application with the same name is not compatible with the target application, the connection indication information is returned to the second device; if the local application with the same name is compatible with the target application, the data to be continued is loaded using the local application with the same name. If the local application of the same type has the authority to load the data to be continued, the connection indication information is returned to the second device; if the local application of the same type does not have the authority to load the data to be continued, the connection is terminated and the termination indication information is returned to the second device, wherein the termination indication information is used to instruct the second device to terminate the connection.
[0125] Please refer to Figure 4 , Figure 4 is a flow chart of a third embodiment of the data transmission method provided in the embodiment of the present application. The data transmission method provided in the present application is applied to a second device, such as Figure 4 As shown, the process of the data transmission method provided by this application is as follows:
[0126] 401. When an operation of clicking on a target application is detected, obtain the pending data of the target application.
[0127] In the embodiment of the present application, the operation of clicking the target application may be input by the user through finger pressing, etc. When the operation of clicking the target application is detected, a connection request of the target application based on the data to be connected is obtained.
[0128] The data to be continued is data that the target application needs to continue to the first device. For example, if the target application is a video player application A of the video player class, the data to be continued includes the currently playing video playback information. The video playback information includes: video number, video title, video network address, video playback progress, video introduction information, video cover, etc.
[0129] 402. Send a connection request of the target application based on the data to be connected to the first device.
[0130] In an embodiment of the present application, the data to be continued of the target application is obtained, data attribute information of the data to be continued and application attribute information of the target application are obtained, a connection request is generated based on the data attribute information of the data to be continued and the application attribute information of the target application, a connection request for the target application based on the data to be continued is sent to the first device, and the first device obtains the connection request.
[0131] 403. When the connection indication information returned by the first device is obtained, send the data to be connected to the first device.
[0132] Among them, when the first device obtains the continuation request of the target application based on the data to be connected issued by the second device, it determines whether the data to be connected is of encrypted type data; if the data to be connected is not of encrypted type data, it determines whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, it returns a connection indication information to the second device.
[0133] When the connection indication information returned by the first device is obtained, indicating that the target application can be connected to the first device, the data to be connected is sent to the first device.
[0134] Furthermore, when the connection indication information returned by the first device is obtained, the data to be continued is sent to the first device, including: when the connection indication information returned by the first device is obtained, a connection pop-up window is issued; when an operation of clicking the connection pop-up window is detected, the data to be continued is sent to the first device.
[0135] Further, sending a connection request of the target application based on the data to be continued to the first device includes: if the target application is running for the first time, sending a connection request of the target application based on the data to be continued to the first device.
[0136] Further, a connection request based on the data to be continued of the target application is sent to the first device, including: if the target application is not running for the first time, indicating that the target application may have been registered and does not need to interact with the first device this time, then obtaining preset registration information, the preset registration information including whether each application on the second device belongs to a registered connection application that supports connection with the first device. If it is determined based on the preset registration information that the target application does not belong to a registered connection application, a connection request based on the data to be continued of the target application is sent to the first device.
[0137] Further, if it is determined based on the preset registration information that the target application is a registered succession application, the data to be continued is sent to the first device.
[0138] Please refer to Figure 5 , Figure 5 1 is a flow chart of the fourth embodiment of the data transmission method provided in the present application. Figure 5 As shown, in an embodiment of the present application, a mobile-side car-linking application and a mobile-side system are installed on the second device; and a car-linking application and a car-linking system are installed on the first device. The mobile-side car-linking application and the car-linking application are used to establish a connection between the second device and the first device. For example, the mobile-side car-linking application and the car-linking application are both carlink applications. Of course, in other embodiments, the mobile-side car-linking application and the car-linking application can also be CarPlay applications, HiCar applications, etc. The process of the data transmission method provided in this application is as follows:
[0139] 601. Establish connection.
[0140] Specifically, the mobile-side car-link application of the second device and the car-link application of the first device establish a connection through the carlink protocol.
[0141] 602. Send preset registration information.
[0142] Specifically, after the second device and the first device establish a connection through the carlink protocol, the carlink application on the carlink side sends the preset registration information to the mobile side carlink application. During initialization, the preset registration information is empty.
[0143] 603. Inject the registration service and update the preset registration information.
[0144] Specifically, after the car-link application on the car-link side establishes a connection with the second device and the first device through the carlink protocol, the car-link application on the mobile side injects a registration service into the mobile side system, and the registration service is used to update the preset registration information.
[0145] 604. Start the registration service and update the preset registration information.
[0146] Specifically, the mobile side system starts a registration service, and the registration service is used to update the preset registration information.
[0147] 605. Determine whether the target application is running for the first time.
[0148] When the operation of clicking the target application is detected, it is determined whether the target application is running for the first time. In the embodiment of the present application, the operation of clicking the target application can be input by the user through finger pressing or the like. When the operation of clicking the target application is detected, it is determined whether the target application is running for the first time.
[0149] 606. Determine whether the target application is a registered succession application based on the preset registration information.
[0150] In the embodiment of the present application, if the target application is not running for the first time, it indicates that the registration information may be stored locally, and then it is determined whether the target application is a registered continuation application based on the preset registration information. If the target application is running for the first time, it indicates that the registration information is not stored locally and a query needs to be initiated to the first device, and then a continuation request of the target application based on the data to be continued is sent to the first device.
[0151] The preset registration information includes whether each application on the second device is a registered connection application that supports connection with the first device. If the target application is not a registered connection application, the process ends. If the target application is a registered connection application, a continuous pop-up window is issued.
[0152] In a specific embodiment, the mobile-side vehicle connection application initiates a registration query request to the vehicle-mounted vehicle connection application. After the vehicle-mounted vehicle connection application obtains the registration query request, it returns a registration query response, and the registration query response includes whether the target application belongs to a registered succession application.
[0153] In a specific embodiment, the registration query request sent by the vehicle-mounted vehicle connection application is as follows: enumAppCategory{
[0154] MAP=0; / / Map navigation application
[0155] MEDIA=1; / / Music radio application
[0156] VIDEO=2; / / Video playback application
[0157] IM=3; / / Social communication applications
[0158] NEWS = 4; / / News reading application
[0159] GAME=5; / / Game application
[0160] SHOPPING = 6; / / Online shopping applications
[0161] TRAVEL=7; / / Travel and travel applications
[0162] FINANCIAL=8; / / Financial management application
[0163] MEETING = 9; / / Meeting application
[0164] TOOL = 10; / / utility application
[0165] OFFICE=11; / / Office software applications
[0166] EDUCATION = 12; / / Education and learning applications
[0167] HEALTHY=13; / / Medical and health applications
[0168] SYSTEM = 14; / / System optimization application
[0169] LIFE=15; / / Life and entertainment applications
[0170] SMART_SERVICE = 16; / / Smart service
[0171] OTHER=17; / / Other
[0172] }
[0173] / / Query whether the application supports the continuation request message
[0174] message CheckAppSupportContinueReqeust{
[0175] string name=1; / / application name
[0176] string packageName=2; / / application package name
[0177] string versionName=3; / / Application string version number
[0178] uint32 versionCode = 4; / / Application digital version number
[0179] AppCategory category=5; / / Application type
[0180] }
[0181] In a specific embodiment, the registration query response sent by the vehicle-side vehicle connection application is as follows:
[0182] / / Query whether the application supports the continuation response message
[0183] message CheckAppSupportContinueResponse{
[0184] string name=1; / / Application name that supports connection
[0185] string packageName=2; / / Application package name that supports continuation
[0186] string versionName=3; / / support the application string version number of the continuation
[0187] uint32 versionCode=4; / / support the digital version number of the application
[0188] AppCategory category=5; / / Application types supported for continuation
[0189] bool support=6; / / Whether to support continuation.
[0190] 607. Send a follow-up pop-up window.
[0191] If the target application is determined to be a registration-succession application based on the preset registration information, a continuation pop-up window is issued. If the target application is determined not to be a registration-succession application based on the preset registration information, the process ends.
[0192] 608. Send the pending data to the first device.
[0193] Specifically, after the pop-up window is issued, when the connection indication information returned by the first device is obtained, the connection pop-up window is issued; when the operation of clicking on the connection pop-up window is detected, the data to be connected is sent to the first device.
[0194] Specifically, when an operation of clicking on the pop-up window to continue is detected, the mobile-side system sends the data to be continued to the mobile-side vehicle connection application, and the vehicle connection application assembles the data to be continued according to a predetermined format and sends it to the first device.
[0195] 609. Load the data to be continued.
[0196] Specifically, the vehicle connection application on the vehicle connection side obtains the data to be connected, and transfers the data to be connected to the application of the first device for loading.
[0197] 610. Send a connection request of the target application based on the data to be connected to the first device.
[0198] In an embodiment of the present application, if the target application is running for the first time, indicating that no registration information is stored locally, and a query needs to be initiated to the first device, a connection request of the target application based on the data to be connected is sent to the first device.
[0199] 611. Determine whether a local application with the same application name as the target application is installed on the first device.
[0200] In an embodiment of the present application, after the vehicle-mounted vehicle connection application receives the connection request of the target application based on the data to be connected, it sends the connection request of the data to be connected to the vehicle-mounted system, and the vehicle-mounted system determines whether a local application with the same application name as the target application is installed on the first device.
[0201] 612. Determine whether the data to be continued is encrypted data.
[0202] In the embodiment of the present application, if the first device does not have a local application with the same name as the target application installed, it is determined whether the data to be continued is encrypted data. If the data to be continued is not encrypted data, it is determined whether the first device has a local application of the same type as the target application installed. If the data to be continued is encrypted data, the connection is terminated and an end indication message is returned to the second device, wherein the end indication message is used to instruct the second device to terminate the connection.
[0203] 613. Determine whether a local application of the same type as the target application is installed on the first device.
[0204] In the embodiment of the present application, if the data to be continued is not encrypted data, it is determined whether a local application of the same application type as the target application is installed on the first device. If a local application of the same application type as the target application is installed on the first device, it is determined whether the local application has permission to load the data to be continued. If a local application of the same application type as the target application is not installed on the first device, the process ends and an end indication is returned to the second device.
[0205] 614. Determine whether a local application of the same type has permission to load the data to be continued.
[0206] 615. Return connection indication information to the second device.
[0207] In an embodiment of the present application, if the local similar application has the permission to load the data to be continued, the connection indication information is returned to the second device; if the local similar application does not have the permission to load the data to be continued, the connection is terminated and the end indication information is returned to the second device, wherein the end indication information is used to instruct the second device to end the connection.
[0208] 616. Obtain connection indication information.
[0209] In an embodiment of the present application, the mobile-side vehicle connection application obtains connection indication information and issues a connection pop-up window.
[0210] 617. Send preset registration information.
[0211] In an embodiment of the present application, if the vehicle-mounted system determines that the local similar application has the permission to load the data to be continued, the target application is determined to be a registered succession application, the preset registration information is updated, and the preset registration information is sent through the vehicle-mounted vehicle connection application.
[0212] In order to better implement the data transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a data transmission device based on the above data transmission method. The meanings of the terms are the same as those in the above data transmission method. For specific implementation details, please refer to the description in the above method embodiment.
[0213] Please refer to Figure 6 , Figure 6 The structural diagram of the data transmission device provided in the embodiment of the present application, the data transmission device may include a first judgment module 701, a second judgment module 702, a return module 703, and a loading module 704, wherein:
[0214] A first judgment module is used to judge whether the data to be connected is encrypted data when receiving a connection request based on the data to be connected by the target application from the second device;
[0215] A second judgment module is used to judge whether a local application of the same type as the target application is installed on the first device if the data to be connected is not encrypted data;
[0216] A return module, configured to return connection indication information to the second device if a local application of the same type as the target application is installed on the first device, wherein the connection indication information is used to instruct the second device to send data to be connected to the first device;
[0217] The loading module is used to load the data to be continued by using a local application of the same type when receiving the data to be continued returned by the second device.
[0218] In an optional embodiment, the return module is used to:
[0219] If no local application of the same type as the target application is installed on the first device, determining whether the local application of the same type has permission to load the data to be continued;
[0220] If the local application of the same type has the permission to load the data to be continued, the connection indication information is returned to the second device.
[0221] In an optional embodiment, the first determination module is used to:
[0222] In case of receiving a connection request of the target application based on the to-be-connected data sent by the second device, determining whether a local application with the same application name as the target application is installed on the first device;
[0223] If no local application with the same application name as the target application is installed on the first device, it is determined whether a local application of the same type as the target application is installed on the first device.
[0224] In an optional embodiment, the return module is used to:
[0225] If a local application with the same application name as the target application is installed on the first device, determining whether the local application with the same application name is compatible with the target application;
[0226] If the local application with the same name is compatible with the target application, a connection indication message is returned to the second device.
[0227] In order to better implement the data transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a data transmission device based on the above data transmission method. The meanings of the terms are the same as those in the above data transmission method. For specific implementation details, please refer to the description in the above method embodiment.
[0228] Please refer to Figure 7 , Figure 7 The schematic diagram of the structure of the data transmission device provided in the embodiment of the present application is as follows. The data transmission device may include an acquisition module 801, a request sending module 802, and a data sending module 803, wherein:
[0229] An acquisition module, used for acquiring the pending data of the target application when a click operation of the target application is detected;
[0230] A request sending module, used for sending a connection request of a target application based on the data to be connected to the first device;
[0231] A data sending module is used to send the data to be continued to the first device when the connection indication information returned by the first device is obtained, wherein the first device determines whether the data to be continued is encrypted type data when the connection request based on the data to be continued by the target application issued by the second device is obtained; if the data to be continued is not encrypted type data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, the connection indication information is returned to the second device.
[0232] In an optional embodiment, the data sending module is used to:
[0233] When the connection indication information returned by the first device is obtained, a connection pop-up window is issued;
[0234] When an operation of clicking on the pop-up window to continue is detected, the data to be continued is sent to the first device.
[0235] In an optional embodiment, the request sending module is used to:
[0236] If the target application is running for the first time, a connection request of the target application based on the data to be connected is sent to the first device.
[0237] In an optional embodiment, the request sending module is used to:
[0238] If the target application is not being run for the first time, determining whether the target application is a registered succession application based on preset registration information, wherein the preset registration information includes whether each application on the second device is a registered succession application that supports succession with the first device;
[0239] If the target application does not belong to the registered continuation application, a continuation request of the target application based on the data to be continued is sent to the first device.
[0240] In an optional embodiment, the request sending module is used to:
[0241] If the target application is a registered succession application, the data to be continued is sent to the first device.
[0242] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the steps in the data transmission method provided in this embodiment by calling a computer program stored in the memory.
[0243] Please refer to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 The electronic device may be a first device or a second device.
[0244] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0245] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.
[0246] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.
[0247] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0248] The electronic device may further include an input unit 104, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0249] Although not shown, the electronic device may also include a display unit, an image acquisition component, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the data transmission method provided in this application, such as:
[0250] In the case of receiving a connection request based on the data to be connected by the target application from the second device, determining whether the data to be connected is encrypted data;
[0251] If the data to be continued is not encrypted data, determining whether a local application of the same type as the target application is installed on the first device;
[0252] If a local application of the same type as the target application is installed on the first device, return connection indication information to the second device, where the connection indication information is used to instruct the second device to send the to-be-connected data to the first device;
[0253] When receiving the data to be continued returned by the second device, using the local application of the same type to load the data to be continued;
[0254] Alternatively, when an operation of clicking on a target application is detected, obtaining the to-be-connected data of the target application;
[0255] Sending a connection request based on the to-be-connected data to the first device by the target application;
[0256] In case of obtaining the connection indication information returned by the first device, the data to be continued is sent to the first device, wherein the first device determines whether the data to be continued is encrypted type data when obtaining the connection request of the target application based on the data to be continued issued by the second device; if the data to be continued is not encrypted type data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, the connection indication information is returned to the second device.
[0257] It should be noted that the electronic device provided in the embodiment of the present application and the data transmission method in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.
[0258] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on a processor of an electronic device provided in an embodiment of the present application, the processor of the electronic device executes the steps in the data transmission method provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0259] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the above-mentioned data transmission method.
[0260] The above is a detailed introduction to a data transmission method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0261] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A data transmission method, characterized in that: Applied to a first device, comprising: In the case of receiving a connection request based on the data to be connected by the target application from the second device, determining whether the data to be connected is encrypted data; If the data to be continued is not encrypted data, determining whether a local application of the same type as the target application is installed on the first device; If a local application of the same type as the target application is installed on the first device, return connection indication information to the second device, where the connection indication information is used to instruct the second device to send the to-be-connected data to the first device; When the data to be continued is received from the second device, the data to be continued is loaded by using the local application of the same type.
2. The data transmission method according to claim 1, characterized in that: If a local application of the same type as the target application is installed on the first device, returning connection indication information to the second device includes: If no local application of the same type as the target application is installed on the first device, determining whether the local application of the same type has permission to load the data to be continued; If the local application of the same type has the permission to load the data to be continued, the connection indication information is returned to the second device.
3. The data transmission method according to claim 1, characterized in that: The step of, upon receiving a connection request from the target application based on the data to be connected sent by the second device, determining whether the data to be connected is encrypted data, comprises: In case of receiving a connection request of the target application based on the to-be-connected data sent by the second device, determining whether a local application with the same application name as the target application is installed on the first device; If no local application with the same application name as the target application is installed on the first device, it is determined whether a local application of the same type as the target application is installed on the first device.
4. The data transmission method according to claim 3, characterized in that: The data transmission method comprises: If a local application with the same application name as the target application is installed on the first device, determining whether the local application with the same application name is compatible with the target application; If the local application with the same name is compatible with the target application, a connection indication message is returned to the second device.
5. A data transmission method, characterized in that: Applied to the second device, comprising: When a click operation on a target application is detected, obtaining the to-be-connected data of the target application; Sending a connection request based on the to-be-connected data to the first device by the target application; In case of obtaining the connection indication information returned by the first device, the data to be continued is sent to the first device, wherein the first device determines whether the data to be continued is encrypted type data when obtaining the connection request of the target application based on the data to be continued issued by the second device; if the data to be continued is not encrypted type data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, the connection indication information is returned to the second device.
6. The data transmission method according to claim 5, characterized in that: The step of sending the to-be-connected data to the first device when the connection indication information returned by the first device is obtained includes: When the connection indication information returned by the first device is obtained, a connection pop-up window is issued; When an operation of clicking on the continue pop-up window is detected, the to-be-continued data is sent to the first device.
7. The data transmission method according to claim 5, characterized in that: The sending of a connection request based on the to-be-connected data by the target application to the first device includes: If the target application is running for the first time, a connection request of the target application based on the data to be connected is sent to the first device.
8. The data transmission method according to claim 7, characterized in that: The data transmission method comprises: If the target application is not being run for the first time, determining whether the target application is a registered succession application based on preset registration information, wherein the preset registration information includes whether each application on the second device is a registered succession application that supports succession with the first device; If the target application does not belong to the registered continuation application, a continuation request of the target application based on the data to be continued is sent to the first device.
9. The data transmission method according to claim 8, characterized in that: The data transmission method comprises: If the target application is a registered succession application, the to-be-continued data is sent to the first device.
10. A data transmission device, characterized in that: include: A first judgment module is used to judge whether the data to be connected is encrypted data when receiving a connection request based on the data to be connected from the target application sent by the second device; A second judgment module is used to judge whether a local application of the same type as the target application is installed on the first device if the data to be continued is not encrypted data; a return module, configured to return connection indication information to the second device if a local application of the same type as the target application is installed on the first device, wherein the connection indication information is used to instruct the second device to send the to-be-connected data to the first device; A loading module is used to load the data to be continued by using the local similar application when receiving the data to be continued returned by the second device.
11. A data transmission device, characterized in that: include: An acquisition module, configured to acquire the to-be-connected data of the target application when an operation of clicking on the target application is detected; A request sending module, used for sending a connection request of a target application based on the data to be connected to the first device; a data sending module, configured to send the data to be connected to the first device when the connection indication information returned by the first device is obtained, wherein the first device determines whether the data to be connected is encrypted data when the connection request based on the data to be connected by the target application sent by the second device is obtained; If the data to be continued is not encrypted data, it is determined whether a local application of the same application type as the target application is installed on the first device; if a local application of the same application type as the target application is installed on the first device, a connection indication message is returned to the second device.
12. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the data transmission method according to any one of claims 1 to 4 or the steps in the data transmission method according to any one of claims 5 to 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the data transmission method according to any one of claims 1 to 4 or the steps in the data transmission method according to any one of claims 5 to 9.
14. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 4 or the steps of the data transmission method according to any one of claims 5 to 9 are implemented.
