Data transmission method, device, system, and computer equipment between multiple activities

Through shared memory mapping and message delivery objects, the view and big data transmission between activity activities is realized in Android applications, solving the problem of data size limitation and view transmission during Intent transmission.

CN114090300BActive Publication Date: 2024-12-13SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111432742.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2024-12-13
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

In existing Android applications, views cannot be carried when data is transmitted through Intent, and there is a data size limitation, so large data cannot be transmitted.

Method used

Use shared memory mapping to generate jump identifiers between multiple activities carried by message delivery objects. Use shared memory mapping to map files storing transmitted data to memory. Use jump identifiers and stored file names to obtain transmitted data to realize the transmission of view and the transmission of big data.

Benefits of technology

It solves the problem of data size limitation during Intent transmission and realizes the ability to transfer view data between multiple activities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090300B_ABST
    Figure CN114090300B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, system, and computer equipment for data transmission between multiple activities. The method comprises: using shared memory mapping to generate jump identifiers between multiple activities carried by a message passing object, wherein the multiple activities include a source activity and a target activity; using the shared memory mapping to map a storage file storing transmission data into a memory, wherein the name of the storage file is determined according to the jump identifier and the transmission data; starting the target activity according to the jump identifier carried by the message passing object, so that the target activity obtains the transmission data in the storage file according to the jump identifier and the name of the storage file. This method can be used to transmit views between multiple activities without limiting the size of the transmission data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data transmission, and in particular to a method, device, system, and computer equipment for data transmission between multiple activities. Background Art

[0002] With the development of Android application technology, there are four major components in Android, namely Activity, Service, Content Provider, and BroadcastReceiver.

[0003] Activity is an important part of Android. It is an Android application component that provides screen interaction. Each Activity will get a window for drawing its user interface. The window can fill the screen or be smaller than the screen and float on other windows. When an Activity is started, an Intent is needed. The Intent carries the data that needs to be transmitted between each Activity. When there is a need for interaction or data transmission between Activities, it needs to be transmitted through Intent.

[0004] However, in the current method of transmitting data between activities through Intent, Intent cannot carry views for transmission, and the size of the data transmitted is limited when transmitting through Intent, so large data cannot be transmitted. Summary of the invention

[0005] Based on this, it is necessary to provide a data transmission method, device, system, and computer equipment between multiple activities that can transmit views between multiple activities without limiting the size of the transmitted data in order to address the above technical problems.

[0006] In a first aspect, the present disclosure provides a method for data transmission between multiple activities, the method comprising:

[0007] Generate jump identifiers between multiple activities carried by a message passing object using a shared memory mapping, wherein the multiple activities include a source activity and a target activity;

[0008] Mapping a storage file storing the transmission data into the memory by using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data;

[0009] The target activity is started according to the message transmission object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transmission object and the name of the storage file.

[0010] In one embodiment, the method of generating the jump identifiers of multiple activities carried by the message passing object by using the shared memory mapping includes:

[0011] The shared memory mapping is used to encrypt at least one attribute information data through an information digest algorithm to generate a jump identifier of multiple activities carried by the message passing object, and the attribute information data includes: the corresponding class name and timestamp of the source activity and the target activity, and the characteristic value of the view corresponding to the transmission data.

[0012] In one embodiment, the method of storing the file storage transmission data includes:

[0013] The transmission data is stored in the storage file according to the type of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of the view to be transmitted, and picture data.

[0014] In one embodiment, the name of the storage file is determined by:

[0015] Determine a category name according to the jump identifier and the category corresponding to the transmission data;

[0016] The name of the storage file corresponding to the transmission data of each category is determined according to the category name.

[0017] In one embodiment, the method further comprises:

[0018] In a case where the source activity and the target activity belong to the same process, obtaining the view to be transmitted by using the pointer value of the view to be transmitted;

[0019] Move the view that needs to be transferred from the source activity to the target activity;

[0020] The transmission data is mapped to the view that needs to be transmitted in the target activity.

[0021] In one embodiment, the method further comprises:

[0022] In a case where the source activity and the target activity do not belong to the same process, creating a view of the same type as the view to be transferred in the target activity;

[0023] The transmission data is mapped to the created view.

[0024] In a second aspect, the present disclosure further provides a method for data transmission between multiple activities, the method comprising:

[0025] Receiving a message passing object, obtaining jump identifiers between multiple activities carried by the message passing object, wherein the jump identifiers are generated by using a shared memory mapping;

[0026] Match the storage file according to the jump identifier carried by the message transmission object, and obtain the transmission data in the storage file;

[0027] The transmission data is mapped to a view corresponding to a source activity, wherein the view corresponding to the source activity includes at least one of a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

[0028] In one embodiment, matching the storage file according to the jump identifier carried by the message transmission object and obtaining the transmission data in the storage file includes:

[0029] Determine the name of the storage file according to the jump identifier and the name of the data to be mapped in the view corresponding to the source activity;

[0030] matching the storage file corresponding to the name of the storage file in a shared memory map;

[0031] The transmission data in the storage file is obtained.

[0032] In a third aspect, the present disclosure further provides a device for data transmission between multiple activities, the device comprising:

[0033] A jump identifier generation module, used to generate jump identifiers between multiple activities carried by a message passing object by using a shared memory mapping, wherein the multiple activities include a source activity and a target activity;

[0034] A transmission data storage module, used for storing the transmission data in a storage file mapped by the shared memory, wherein the name of the storage file is determined according to the jump identifier and the transmission data;

[0035] The target activity starting module is used to start the target activity according to the message transmission object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transmission object and the name of the storage file.

[0036] In a fourth aspect, the present disclosure further provides a data transmission device between multiple activities, the device comprising:

[0037] A jump identifier receiving module, used for receiving a message transmission object, and obtaining jump identifiers between multiple activities carried by the message transmission object, wherein the jump identifiers are generated by using a shared memory mapping;

[0038] A transmission data acquisition module, used to match the storage file according to the jump identifier carried by the message transmission object, and obtain the transmission data in the storage file;

[0039] A transmission data mapping module is used to map the transmission data to a view corresponding to a source activity, wherein the view corresponding to the source activity includes at least one of a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

[0040] In a fifth aspect, the present disclosure further provides a data transmission system between multiple activities, the system comprising:

[0041] A source activity, used to generate jump identifiers between multiple activities carried by a message passing object using a shared memory mapping, wherein the multiple activities include a source activity and a target activity, and to map a storage file storing transmission data into a memory using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data, and to start the target activity according to the message passing object;

[0042] A target activity is used to receive a message passing object, obtain jump identifiers between multiple activities carried in the message passing object, wherein the jump identifier is generated by using a shared memory mapping, match a storage file according to the jump identifier carried by the message passing object, and obtain transmission data in the storage file; map the transmission data to a view corresponding to a source activity, wherein the view corresponding to the source activity includes a view created with the same type of view that needs to be transmitted in the source activity, or a view moved from the source activity to the target activity.

[0043] In a sixth aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0044] In a seventh aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0045] In an eighth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0046] The above-mentioned data transmission method, device, system, and computer equipment between multiple activities use shared memory mapping to map the storage file storing the transmission data to the memory, and only the jump identifier is transmitted through Intent during transmission, so there is no problem that the Intent cannot be transmitted when the data is large. Because the name of the storage file is determined based on the jump identifier and the data to be transmitted, when the required transmission data is subsequently obtained in the memory, the required transmission data in the memory can be directly obtained based on the jump identifier and the name of the storage file, and the transmission data is mapped in the memory by using shared memory, so when the transmission data is obtained, the corresponding transmission data can be obtained from the memory, which solves the problem of limiting the size of the transmission data when transmitting through Intent. Because the transmission data can include data corresponding to the view, the view can be transmitted between multiple activities. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of an application environment of a method for transmitting data between multiple activities in one embodiment;

[0048] Figure 2 A schematic diagram of a flow chart of a method for transmitting data between multiple activities in one embodiment;

[0049] Figure 3 A schematic diagram of a flow chart of a step of determining a storage file name in one embodiment;

[0050] Figure 4 It is a flowchart of a case where multiple activities belong to the same process in one embodiment;

[0051] Figure 5 It is a flowchart diagram of a case where multiple activities do not belong to the same process in one embodiment;

[0052] Figure 6 is a flow chart of a method for data transmission between multiple activities in another embodiment;

[0053] Figure 7 This is a schematic diagram of the process of step S602 in another embodiment;

[0054] Figure 8 It is a schematic block diagram of the structure of a data transmission device between multiple activities in one embodiment;

[0055] Fig. 9 It is a schematic block diagram of the structure of a data transmission device between multiple activities in another embodiment;

[0056] Fig.10 A schematic diagram of a processing flow of a data transmission system between multiple activities in one embodiment;

[0057] Fig.11Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0059] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of this document and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or are inherent to these processes, methods, products or equipment.

[0060] Currently, there are several ways for Android activities to interact or transfer data: 1. Use Android Intent to transfer data between activities, which is also an official way of data transfer in Android. 2. Use static variables to transfer data between activities. 3. Use global variables to transfer data. 4. Use the clipboard to transfer data.

[0061] However, the above-mentioned methods of transmitting data cannot carry views for transmission, and the most commonly used and recommended method is to transmit data through Intent. However, there are the following problems when Intent transmits data of different sizes: 1. Data below 512K can be transmitted normally. 2. Data of 512K to 1024K will fail and crash. 3. Data above 1024K will report an error. And considering that Intent also includes information such as the Activity to be started, the actual data that can be transmitted is slightly less than 512K. However, the data corresponding to a general view may contain large files such as pictures, which makes the data to be transmitted exceed 1M, resulting in the inability to transmit data larger than 1M through Intent.

[0062] Therefore, in order to solve the above problems, the present disclosure provides a method for data transmission between multiple activities, which can be applied to Figure 1In the application environment shown. Among them, the terminal includes a source activity unit 102 and a target activity unit 104. The source activity unit 102 generates a jump identifier between multiple activities carried by a message passing object by using a shared memory mapping, and the jump identifier can be stored in the terminal. The multiple activities include a source activity and a target activity, the source activity can be set in the source activity unit 102, and the target activity can be set in the target activity unit 104. The source activity unit 102 can use the shared memory mapping to map a storage file storing transmission data to the memory 106. The name of the storage file is determined according to the jump identifier and the transmission data. The source activity unit 102 starts the target activity in the target activity unit 104 according to the message passing object. The target activity in the target activity unit 104 can obtain the transmission data in the storage file in the memory 106 according to the jump identifier in the message passing object and the name of the storage file. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.

[0063] In one embodiment, Figure 2 As shown, a method for data transmission between multiple activities is provided, and the method is applied to Figure 1 Taking the source activity unit 102 in the example as an example, the method includes the following steps:

[0064] S202, using shared memory mapping to generate jump identifiers between multiple activities carried by a message transfer object, wherein the multiple activities include a source activity and a target activity.

[0065] Among them, shared memory mapping can usually be the mmap method provided in the Linux kernel in the Android system. The mmap method enables processes to share memory by mapping the same ordinary file. After the ordinary file is mapped to the process address space, the process or activity can access the file like accessing ordinary memory. The message passing object can usually be an Intent, which is usually the "medium" or "messenger" for communication between different components or activities. The jump identifier can usually be a jump ID (Identity document), which is unique and can store and obtain transmission data through the jump ID. The source activity can usually refer to the Activity currently started in the Android system. The target activity can usually be the Activity that needs to be started in the Android system.

[0066] Specifically, based on the mmap method, a View transfer management class is created. The transfer management class can be a method for managing views transferred between multiple activities. Because there may be multiple transfer views between multiple activities, the transfer management class can uniformly manage multiple views that need to be transferred between the multiple activities. The transfer management class generates a jump identifier carried by the Intent for transfer between the source activity and the target activity. Both the source activity and the target activity can include one or more Activity activities.

[0067] S204: Map a storage file storing the transmission data into the memory using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data.

[0068] The transferred data may generally be view data that needs to be transferred between the source activity and the target activity.

[0069] Specifically, the transmission data is stored in a storage file, the name of the storage file is determined according to the jump identifier and the transmission data, different transmission data is stored in each storage file with a different name, and the storage file that stores the transmission data and determines the storage file name is mapped to the memory using the mmap method to realize the data reading and storage functions.

[0070] In some embodiments, the name of the storage file determined according to the jump identifier and the transmission data may be a combination of the jump identifier and the transmission data, such as jump identifier + transmission data, jump identifier - transmission data, etc., or a person skilled in the art may assemble the jump identifier and the transmission data according to a preset rule. In this embodiment, the specific determination method of the storage file name is not displayed, as long as the storage file name can be determined by the jump identifier and the transmission data, and the naming method that can identify the jump identifier and the transmission data through the storage file name is acceptable.

[0071] S206: Start the target activity according to the message transfer object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transfer object and the name of the storage file.

[0072] Specifically, the source activity can start the target activity according to the Intent. After starting the target activity, the target activity needs to obtain the data that needs to be transmitted in the source activity. Therefore, the target activity can assemble the name of the storage file according to the jump identifier carried by the Intent and the transmission data that needs to be obtained, and then find the corresponding storage file in the memory according to the name of the storage file to obtain the transmission data stored in the storage file.

[0073] In the above-mentioned data transmission method between multiple activities, the storage file storing the transmission data is mapped to the memory by using the shared memory mapping, and during the transmission, only the jump identifier is transmitted through the Intent, so there is no problem that the Intent with large data cannot be transmitted. Because the name of the storage file is determined according to the jump identifier and the data to be transmitted, when the required transmission data is subsequently obtained in the memory, the required transmission data in the memory can be directly obtained according to the jump identifier and the name of the storage file, and the transmission data is mapped in the memory by using the shared memory, so when the transmission data is obtained, the corresponding transmission data can be obtained from the memory, so the problem of limiting the size of the transmission data when transmitting through the Intent is solved, and because the transmission data includes view data, the view can be transmitted between multiple activities through this method.

[0074] In one embodiment, the method of generating the jump identifiers of multiple activities carried by the message passing object by using the shared memory mapping includes:

[0075] The shared memory mapping is used to encrypt at least one attribute information data through an information digest algorithm to generate a jump identifier of multiple activities carried by the message passing object, and the attribute information data includes: the corresponding class name and timestamp of the source activity and the target activity, and the characteristic value of the view corresponding to the transmission data.

[0076] Among them, the information digest algorithm can usually be the MD5 encryption algorithm, which is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission. The corresponding class names of the source activity and the target activity usually refer to the names of the source activity and the target activity defined in JAVA. The timestamp can usually be data generated using digital signature technology. The characteristic value of the view corresponding to the transmitted data is the characteristic value of the view that needs to be transmitted in the transmitted data, such as the length, width, height information of the view, the context information of the view, the business information of the view, etc.

[0077] Specifically, an attribute information data may be encrypted by MD5 algorithm to generate a jump identifier of multiple activities carried by the message transmission object. Each attribute information data in at least one attribute information data may also be spliced ​​together, and the spliced ​​attribute information data may be encrypted by MD5 algorithm to generate a jump identifier of multiple activities carried by the message transmission object. The jump identifier generated by MD5 encryption algorithm may usually be a unique string.

[0078] In this embodiment, by using different attribute information and using the MD5 encryption algorithm to generate a unique character string, it is possible to prevent the jump identifier from being repeated and ensure the uniqueness of the jump identifier.

[0079] In one embodiment, the method of storing the file storage transmission data includes:

[0080] The transmission data is stored in the storage file according to the type of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of the view to be transmitted, and picture data.

[0081] Specifically, the transmission file may include different categories, such as: view length attribute value, view width attribute value, view height attribute value, pointer category, and picture category. Therefore, different types of transmission data are stored in different storage files according to different transmission data categories. The transmission data may include: pointer value of the view to be transmitted; attribute value of the view to be transmitted, such as view length, width, height, custom attribute value, alias, etc.; picture data in the view, etc.

[0082] In this embodiment, the transmission data includes data such as the pointer value of the view to be transmitted, the attribute value of the view to be transmitted, and the corresponding view can be obtained through the data. Different transmission data are stored in different storage files. The corresponding transmission data can be obtained according to different storage files. The problem that Intent cannot transmit the view can be solved by obtaining different types of transmission data.

[0083] In one embodiment, Figure 3 As shown, the name of the storage file is determined by:

[0084] S302: Determine a category name according to the jump identifier and the category corresponding to the transmission data.

[0085] S304: Determine, according to the category name, the name of the storage file corresponding to the transmission data of each category.

[0086] Specifically, in some implementations, if the category corresponding to the transmission data is: the width attribute value of the view, and the fixed name may be width, then the category name may be: jump identifier plus the fixed name width. Then, according to the jump identifier width, the name of the storage file corresponding to the storage width attribute value of the view is determined to be the jump identifier width.

[0087] In this embodiment, determining the name of the storage file by the jump identifier and the category of the transmitted data can facilitate subsequent search and calling. When a certain attribute value needs to be called, assembling the jump identifier and the fixed name can obtain the file name that stores the corresponding attribute value of the View, thereby obtaining the data in the corresponding storage file.

[0088] In one embodiment, Figure 4 As shown, the method also includes:

[0089] S402: When the source activity and the target activity belong to the same process, the view to be transmitted is acquired by using the pointer value of the view to be transmitted.

[0090] The pointer value of the view may generally be the address value of the view, and the corresponding view may be obtained through the address value.

[0091] Specifically, when the source activity and the target activity belong to the same process, various resources in the same process can call each other and share resources, so the view to be transmitted can be directly obtained by using the view pointer to be transmitted in the transmission data.

[0092] S404: Move the view to be transferred from the source activity to the target activity.

[0093] Specifically, because the source activity and the target activity belong to the same process and can share resources, the view to be transferred can be directly moved from the source activity to the target activity.

[0094] S406: Map the transmission data to the view that needs to be transmitted in the target activity.

[0095] Specifically, the attribute values ​​and other values ​​in the transmission data may be mapped to the view that needs to be transmitted in the target activity, thereby completing the view transmission between the source activity and the target activity.

[0096] In this embodiment, when the source activity and the target activity belong to the same process, only the view needs to be transferred, so as to map the data in the storage file in the memory to the view to be transmitted, thereby improving the efficiency of the transmitted view.

[0097] In one embodiment, Figure 5 As shown, the method also includes:

[0098] S502: When the source activity and the target activity do not belong to the same process, create a view of the same type as the view to be transmitted in the target activity.

[0099] S504: Map the transmission data to the created view.

[0100] Specifically, in the case where the source activity and the target activity do not belong to the same process, if a view needs to be transferred to the target activity, a view of the same type as the view to be transferred in the source activity needs to be created in the target activity, so that the data in the transfer data can be mapped to the target activity, thereby realizing the transfer of the view. After creating the same type of view, the transfer data, such as pointers, attribute values ​​and other values, can be mapped to the same type of view created in the target activity, completing the view transfer between the source activity and the target activity.

[0101] In this embodiment, by creating views of the same type as the views to be transferred in the target activity, it is possible to transfer views between multiple activities even when they do not belong to the same process.

[0102] In another embodiment, the present disclosure also provides a method for transmitting data between multiple activities, wherein the method is applied to Figure 1 The target activity unit 104 in FIG. Figure 6 As shown, the method includes:

[0103] S602, receiving a message passing object, and obtaining jump identifiers between multiple activities carried by the message passing object, wherein the jump identifiers are generated by using a shared memory mapping;

[0104] Specifically, when the source activity starts the target activity according to the message passing object, the target activity receives the message passing object and obtains the jump identifier between multiple activities carried by the message passing object. The jump identifier can be generated by the source activity using shared memory mapping.

[0105] S604, matching the storage file according to the jump identifier carried by the message transmission object, and obtaining the transmission data in the storage file.

[0106] Specifically, the storage file in the memory may be matched according to the jump identifier and the view data that needs to be transmitted in the source activity, and the transmission data in the storage file may be obtained after the storage file is matched.

[0107] S606, mapping the transmission data to a view corresponding to the source activity, wherein the view corresponding to the source activity at least includes a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

[0108] Specifically, after acquiring the transmission data in the corresponding storage file, the transmission data is mapped to the view corresponding to the source activity. The view obtained after mapping the transmission data is equivalent to transferring the view data of the source activity to the target activity. The view corresponding to the source activity can be a pre-created view of the same type as the view that needs to be transmitted in the source activity and a view moved from the source activity to the target activity. In the case where the target activity and the source activity belong to the same process, the view corresponding to the source activity can be a view moved from the source activity to the target activity. In the case where the target activity and the source activity do not belong to the same process, the view corresponding to the source activity can be a pre-created view of the same type as the view that needs to be transmitted in the source activity.

[0109] In this embodiment, the target activity can match the storage file that needs to obtain data according to the jump identifier, and map the transmission data in the storage file to the view corresponding to the source activity, thereby realizing data transmission between multiple activities.

[0110] In one embodiment, Figure 7 As shown, the step of matching the storage file according to the jump identifier carried by the message transmission object and obtaining the transmission data in the storage file includes:

[0111] S702: Determine the name of the storage file according to the jump identifier and the name of the data to be mapped in the view corresponding to the source activity.

[0112] S704: Match the storage file corresponding to the name of the storage file in the shared memory mapping.

[0113] S706: Acquire the transmission data in the storage file.

[0114] Specifically, the view corresponding to the source activity may contain transmission data such as the attribute value of the view, the picture to be placed, etc. However, these transmission data are stored in the storage file. Therefore, the name of the storage file can be determined according to the jump identifier and the name of the data to be mapped, and it is determined that the storage file corresponding to the storage file name in the storage file name includes the data to be mapped. Therefore, the storage file corresponding to the name of the storage file can be matched in the shared memory mapping. Then the transmission data in the storage file is obtained.

[0115] In this embodiment, the name of the storage file can be matched through the data to be mapped and the jump identifier, and then the corresponding data can be obtained. When mapping, only the file name needs to be obtained, and there is no need to match and identify one by one, which improves the data transmission efficiency between multiple activities.

[0116] It can be understood that steps S402, S404, S406 and steps S502, S504 in the above embodiment can also be implemented by the target activity unit 104 in this embodiment. The specific implementation method can refer to the above embodiment and will not be repeated here.

[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0118] Based on the same inventive concept, the embodiment of the present disclosure also provides a data transmission device between multiple activities for implementing the data transmission method between multiple activities involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations and implementation methods in the embodiments of one or more data transmission devices between multiple activities provided below can be referred to the embodiments of the data transmission method between multiple activities above, and will not be repeated here.

[0119] In one embodiment, Figure 8 As shown, a data transmission device 800 between multiple activities is provided, comprising: a jump mark generation module 802, a transmission data storage module 804 and a target activity starting module 806, wherein:

[0120] The jump identifier generating module 802 is used to generate jump identifiers between multiple activities carried by the message transfer object by using shared memory mapping, and the multiple activities include a source activity and a target activity.

[0121] The transmission data storage module 804 is used to store the transmission data in a storage file mapped by the shared memory, wherein the name of the storage file is determined according to the jump identifier and the transmission data.

[0122] The target activity starting module 806 is used to start the target activity according to the message transmission object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transmission object and the name of the storage file.

[0123] In one embodiment of the device, the jump identifier generation module 802 includes: an algorithm encryption module, which is used to use the shared memory mapping to encrypt at least one attribute information data through an information digest algorithm to generate a jump identifier for multiple activities carried by the message passing object, and the attribute information data includes: the corresponding class name of the source activity and the target activity, the timestamp, and the characteristic value of the view corresponding to the transmission data.

[0124] In one embodiment of the device, the transmission data storage module 804 includes a category storage module, which is used to store the transmission data in the storage file according to the category of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, and image data.

[0125] In one embodiment of the device, the device further comprises: a first name determination module, configured to determine a category name according to the jump identifier and the category corresponding to the transmission data, and a name of the storage file corresponding to each category of the transmission data determined according to the category name.

[0126] In one embodiment of the device, the device further comprises: a view acquisition module and a view transfer module;

[0127] The view acquisition module is used to acquire the view to be transmitted by using the pointer value of the view to be transmitted when the source activity and the target activity belong to the same process.

[0128] The view transfer module is used to move the view that needs to be transferred from the source activity to the target activity.

[0129] In one embodiment of the device, the device further comprises: a view creation module, a transmission data mapping module;

[0130] The view creation module is used to create a view of the same type as the view to be transmitted in the target activity when the source activity and the target activity do not belong to the same process.

[0131] The transmission data mapping module is used to map the transmission data to the view to be transmitted in the target activity and to map the transmission data to the view obtained after creation.

[0132] In another embodiment, Fig. 9 As shown, a data transmission device 900 between multiple activities is provided, comprising:

[0133] A jump identifier receiving module 902 is used to receive a message transmission object and obtain jump identifiers between multiple activities carried in the message transmission object, wherein the jump identifiers are generated by using a shared memory mapping;

[0134] The transmission data acquisition module 904 is used to match the storage file according to the jump identifier carried by the message transmission object, and obtain the transmission data in the storage file.

[0135] The transmission data mapping module 906 is used to map the transmission data to the view corresponding to the source activity, and the view corresponding to the source activity at least includes a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

[0136] In one embodiment of the device, the transmission data acquisition module 904 includes: a second name determination module, a view mapping module;

[0137] The second name determination module is used to match the storage file according to the jump identifier carried by the message transmission object, and obtain the transmission data in the storage file.

[0138] A view mapping module is used to map the transmission data to a view corresponding to a source activity, wherein the view corresponding to the source activity includes at least one of a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

[0139] Each module in the above-mentioned data transmission device between multiple activities can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0140] Based on the same inventive concept, the embodiment of the present disclosure also provides a data transmission system between multiple activities for implementing the data transmission method between multiple activities involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations and implementation methods in the embodiments of the data transmission system between one or more multiple activities provided below can be referred to the embodiments of the data transmission method between multiple activities above, and will not be repeated here.

[0141] In one embodiment, Fig.10 As shown, a data transmission system between multiple activities is provided, and the system comprises:

[0142] A source activity, used to generate jump identifiers between multiple activities carried by a message passing object using a shared memory mapping, wherein the multiple activities include a source activity and a target activity, and to map a storage file storing transmission data into a memory using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data, and to start the target activity according to the message passing object;

[0143] A target activity is used to receive a message passing object, obtain jump identifiers between multiple activities carried in the message passing object, wherein the jump identifier is generated by using a shared memory mapping, match a storage file according to the jump identifier carried by the message passing object, and obtain transmission data in the storage file; map the transmission data to a view corresponding to a source activity, wherein the view corresponding to the source activity includes a view created with the same type of view that needs to be transmitted in the source activity, or a view moved from the source activity to the target activity.

[0144] The source activity is also used to use the shared memory mapping to encrypt at least one attribute information data through an information digest algorithm to generate a jump identifier of multiple activities carried by the message passing object, and the attribute information data includes: the corresponding class name and timestamp of the source activity and the target activity, and the characteristic value of the view corresponding to the transmission data.

[0145] The source activity is further used to store the transmission data into the storage file according to the category of the transmission data, wherein the transmission data includes: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, and picture data.

[0146] The source activity is further used to determine a category name according to the jump identifier and the category corresponding to the transmission data; and determine the name of the storage file corresponding to the transmission data of each category according to the category name.

[0147] The source activity or the target activity can also be used to obtain the view that needs to be transmitted by using the pointer value of the view that needs to be transmitted when the source activity and the target activity belong to the same process; move the view that needs to be transmitted from the source activity to the target activity; and map the transmission data to the view that needs to be transmitted in the target activity.

[0148] The source activity or the target activity can also be used to create a view of the same type as the view to be transmitted in the target activity when the source activity and the target activity do not belong to the same process; and map the transmitted data to the view obtained after the creation.

[0149] The target activity is also used to determine the name of the storage file according to the jump identifier and the data name that needs to be mapped in the view corresponding to the source activity; match the storage file corresponding to the name of the storage file in the shared memory mapping; and obtain the transmission data in the storage file.

[0150] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for transmitting data between multiple activities is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0151] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0152] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0154] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A method for data transmission between multiple activities, It is characterized in that The method comprises: Generate jump identifiers between multiple activities carried by a message passing object using a shared memory mapping, wherein the multiple activities include a source activity and a target activity; Mapping a storage file storing the transmission data into the memory by using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data; Starting the target activity according to the message transfer object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transfer object and the name of the storage file; Among them, the storage file stores the transmission data in a manner including: storing the transmission data in the storage file according to the category of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, or image data of a view to be transmitted.

2. The data transmission method between multiple activities according to claim 1, It is characterized in that The method of using shared memory mapping to generate jump identifiers of multiple activities carried by a message passing object includes: The shared memory mapping is used to encrypt at least one attribute information data through an information digest algorithm to generate a jump identifier of multiple activities carried by the message passing object. The attribute information data includes: the corresponding class name, timestamp or characteristic value of the view corresponding to the transmission data of the source activity and the target activity.

3. The data transmission method between multiple activities according to claim 1, It is characterized in that The name of the storage file is determined by: Determine a category name according to the jump identifier and the category corresponding to the transmission data; The name of the storage file corresponding to the transmission data of each category is determined according to the category name.

4. The data transmission method between multiple activities according to claim 1 or 3, It is characterized in that The method further comprises: In a case where the source activity and the target activity belong to the same process, obtaining the view to be transmitted by using the pointer value of the view to be transmitted; Move the view that needs to be transferred from the source activity to the target activity; The transmission data is mapped to the view that needs to be transmitted in the target activity.

5. The data transmission method between multiple activities according to claim 4, It is characterized in that The method further comprises: In a case where the source activity and the target activity do not belong to the same process, creating a view of the same type as the view to be transferred in the target activity; The transmission data is mapped to the created view.

6. A method for data transmission between multiple activities, It is characterized in that The method comprises: Receiving a message passing object, obtaining jump identifiers between multiple activities carried in the message passing object, wherein the jump identifiers are generated by using a shared memory mapping; Matching a storage file according to the jump identifier carried by the message transmission object, and acquiring transmission data in the storage file; wherein the storage file stores the transmission data in a manner including: storing the transmission data in the storage file according to the category of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, or picture data of a view to be transmitted; The transmission data is mapped to a view corresponding to a source activity, wherein the view corresponding to the source activity includes at least one of a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

7. The data transmission method between multiple activities according to claim 6, It is characterized in that The step of matching the storage file according to the jump identifier carried by the message transmission object and obtaining the transmission data in the storage file comprises: Determine the name of the storage file according to the jump identifier and the name of the data to be mapped in the view corresponding to the source activity; matching the storage file corresponding to the name of the storage file in a shared memory map; The transmission data in the storage file is obtained.

8. A data transmission device between multiple activities, It is characterized in that The device comprises: A jump identifier generation module, used to generate jump identifiers between multiple activities carried by a message passing object by using a shared memory mapping, wherein the multiple activities include a source activity and a target activity; A transmission data storage module, used for mapping a storage file storing the transmission data into the memory by using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data; A target activity startup module is used to start the target activity according to the message transmission object, so that the target activity obtains the transmission data in the storage file according to the jump identifier carried by the message transmission object and the name of the storage file; wherein the storage file stores the transmission data in a manner comprising: storing the transmission data in the storage file according to the category of the transmission data, and the transmission data comprises: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, or image data of a view to be transmitted.

9. A data transmission device between multiple activities, It is characterized in that The device comprises: A jump identifier receiving module, used for receiving a message transmission object, and obtaining jump identifiers between multiple activities carried in the message transmission object, wherein the jump identifiers are generated by using a shared memory mapping; a transmission data acquisition module, configured to match a storage file according to a jump identifier carried by the message transmission object, and acquire transmission data in the storage file; wherein the storage file stores the transmission data in a manner that includes: storing the transmission data in the storage file according to the category of the transmission data, and the transmission data includes: a pointer value of a view to be transmitted, an attribute value of a view to be transmitted, or image data of a view to be transmitted; A transmission data mapping module is used to map the transmission data to a view corresponding to a source activity, wherein the view corresponding to the source activity includes at least one of a pre-created view of the same type as the view to be transmitted in the source activity and a view moved from the source activity to the target activity.

10. A data transmission system between multiple activities, It is characterized in that The system comprises: A source activity, used to generate jump identifiers between multiple activities carried by a message passing object using a shared memory mapping, wherein the multiple activities include a source activity and a target activity, and to map a storage file storing transmission data into a memory using the shared memory mapping, wherein the name of the storage file is determined according to the jump identifier and the transmission data, and to start the target activity according to the message passing object; A target activity is used to receive a message passing object, obtain jump identifiers between multiple activities carried in the message passing object, wherein the jump identifier is generated by using a shared memory mapping, and a storage file is matched according to the jump identifier carried by the message passing object to obtain transmission data in the storage file; the transmission data is mapped to a view corresponding to a source activity, wherein the view corresponding to the source activity includes a view created with the same type of view as that required to be transmitted in the source activity, or a view moved from the source activity to the target activity; wherein the storage file stores the transmission data in a manner comprising: storing the transmission data in the storage file according to the category of the transmission data, wherein the transmission data includes: a pointer value of the view required to be transmitted, an attribute value of the view required to be transmitted, or image data of the view required to be transmitted.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 or the steps of the method according to any one of claims 6 to 7 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or the steps of the method according to any one of claims 6 to 7 are implemented.

13. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or the steps of the method according to any one of claims 6 to 7 are implemented.