WO2020216166A1 - 一种寄宿应用间的数据传递方法 - Google Patents

一种寄宿应用间的数据传递方法 Download PDF

Info

Publication number
WO2020216166A1
WO2020216166A1 PCT/CN2020/085548 CN2020085548W WO2020216166A1 WO 2020216166 A1 WO2020216166 A1 WO 2020216166A1 CN 2020085548 W CN2020085548 W CN 2020085548W WO 2020216166 A1 WO2020216166 A1 WO 2020216166A1
Authority
WO
WIPO (PCT)
Prior art keywords
host application
application
storage area
shared storage
host
Prior art date
Application number
PCT/CN2020/085548
Other languages
English (en)
French (fr)
Inventor
崔英林
Original Assignee
上海连尚网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海连尚网络科技有限公司 filed Critical 上海连尚网络科技有限公司
Publication of WO2020216166A1 publication Critical patent/WO2020216166A1/zh
Priority to US17/452,389 priority Critical patent/US20220043901A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1652Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
    • G06F13/1663Access to shared memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0637Permissions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Definitions

  • This application relates to the field of Internet applications, and in particular to a data transfer method between boarding applications.
  • a boarding application is provided.
  • the boarding application does not need to be installed or uninstalled, and can be easily acquired and delivered in the host application, and has an excellent user experience.
  • Boarding applications can provide convenient and rich services, such as reservations, product purchases, and games.
  • due to the independence of the boarding application only one boarding application can be run at the same time, and real-time data sharing between different boarding applications cannot be realized. Even non-real-time data sharing is very difficult.
  • Various aspects of the present application provide a data transfer method between hosting applications, which is used to solve the problem of data interaction between different hosting applications.
  • One aspect of the present application provides a data transfer method between host applications, which is applied to host applications, including establishing a shared storage area for a first host application; locking access permissions on the shared storage area; and receiving a second host application
  • the sent data access request to the shared storage area of the first host application authenticates the authority of the second host application; if the authentication is passed, the access request is released; if the authentication fails, the access request is rejected The access request.
  • a data transfer method between host applications, applied to a first host application including sending a call instruction, the call instruction is used to instruct a second host application to read the first host application Data in the shared storage area; receiving the execution result returned by the second host application forwarded by the host application after accessing the shared storage area of the first host application.
  • Another aspect of the present application provides a data transfer method between host applications, applied to a second host application, including receiving a call instruction sent by the first host application forwarded by the host application, and the call instruction is used to instruct the second host application.
  • the host application reads the data in the shared storage area of the first host application; sends an access request to the data in the shared storage area of the first host application to the host application; so that the host application can The authorization of the second boarding application is authenticated.
  • a device in another aspect of the present application, includes: one or more processors; a storage device for storing one or more programs.
  • the one or more programs are used by the one or more Execution by two processors, so that the one or more processors implement any of the above-mentioned methods.
  • a computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, any of the above methods is implemented.
  • FIG. 1 is a schematic flowchart of a data transfer method between host applications applied to a host application according to some embodiments of this application;
  • FIG. 2 is a schematic flowchart of a method for transferring data between host applications applied to a first host application according to some embodiments of this application;
  • FIG. 3 is a schematic flowchart of a method for transferring data between host applications applied to a second host application according to some embodiments of this application;
  • Figure 4 is a block diagram of an exemplary computer system/server suitable for implementing some embodiments of the present invention.
  • Figure 1 is a schematic flow chart of a method for data transfer between host applications provided by some embodiments of this application. The method is applied to a host application and includes the following steps:
  • Step S11 Establish a shared storage area of the first hosting application; lock the access authority of the shared storage area;
  • Step S12 Receive the data access request to the shared storage area of the first host application sent by the second host application, and authenticate the authority of the second host application; if the authentication is passed, release the access request ; If the authentication fails, the access request is rejected.
  • the host application is an application (APP) client installed on the wireless device, such as WeChat, or the operating system of the wireless device; the host application is an application that depends on the operation of the host application, such as an applet in WeChat, etc. .
  • APP application
  • the host application is an application that depends on the operation of the host application, such as an applet in WeChat, etc. .
  • the wireless device is the host, including but not limited to any kind of smart terminal device that can interact with the user and realize the wireless communication function, such as smart phone, tablet computer, notebook computer, etc., of course, it can also be Other devices with similar functions are not limited in this embodiment.
  • the smart terminal device can adopt any operating system, such as Android operating system, iOS operating system, Windows operating system, and so on.
  • step S11 In a preferred embodiment of step S11,
  • the host application starts the first host application in response to the user triggering the first host application.
  • the host application starts the default running stack, and runs the first host application on it. Before, at the same time or after the host application starts the first hosted application, establish a shared storage area for the first hosted application.
  • the shared storage area is located in the storage space of the host.
  • the shared storage area can be set in the host's run memory area (RAM, Random Access Memory), can be set in the host's body memory area (ROM, Read Only Memory), or can be set in the run memory area and the body
  • RAM random Access Memory
  • ROM Read Only Memory
  • the shared storage area is set with a shared storage area.
  • each boarding application has its own corresponding sandbox, and each sandbox is independent of each other and cannot access each other; therefore, the shared storage area can be allocated
  • the data directory in the memory area of the host's fuselage prevents it from being cracked.
  • the size of the shared storage area needs to be configured in advance to avoid affecting the normal operation of the host operating system.
  • the host application divides the storage area in the storage space of the host, and each host application is allocated the start and end addresses of its shared storage area in the divided storage area.
  • permission control is performed on the shared storage area, for example, the shared storage area is locked using the authorization ID of the first hosting application.
  • the shared storage area is locked using the authorization ID of the first hosting application.
  • the host application receives the authority information set by the first host application and stores the authority information locally; or, the host application receives the authority information set by the user, and stores the authority information locally.
  • the authority information includes authority separately set for different boarding applications, and the different boarding applications are identified by their AppID.
  • the host application can forward messages through the host application to achieve interaction, but some data of the host application itself, such as pictures, video, audio and other data, can not be simply forwarded through the host application, so it can be set up Shared storage area to achieve the above data transfer.
  • step S12 In a preferred implementation of step S12,
  • the host application receives the access request of the second host application to the shared storage area of the first host application, and authenticates the authority of the second host application.
  • the second host application generates an access request to the shared storage area of the first host application according to the data part in the call instruction.
  • the data part of the call instruction may be a read instruction that instructs the second host application to read data in the data shared area of the first host application, so as to realize the first host application and the second host application Data transfer between.
  • the host application authenticates the access authority of the second host application; if the authentication is passed, the access request is released; if the authentication fails, the access request is rejected and the second The host application returns messages such as authentication failure.
  • the host application verifies the access request based on the identity information (such as APPID, access public key) included in the access request sent by the second host application through pre-stored authority information.
  • identity information such as APPID, access public key
  • the host application intercepts the message sent by the second host application and determines whether it is an access request, if it is an access request, then authenticates the access authority of the second host application; if it is not an access request, then Proceed to normal processing.
  • the host application receives the access request sent by the second host application through a preset API interface, and authenticates the access authority of the second host application, so that the second host application can pass the The API interface realizes the access to the shared storage area of the first host application.
  • the second host application reads the data in the data sharing area of the first host application.
  • the second hosting application returns an execution result of executing the calling instruction to the first hosting application.
  • the host application receives the execution result returned after the second host application accesses the shared storage area of the first host application; and returns the execution result to the first host application.
  • the method before the receiving the data access request to the shared storage area of the first hosting application sent by the second hosting application, the method further includes the following steps:
  • the call instruction is used to instruct the second host application to read the data in the shared storage area of the first host application ;
  • the second host application run the second host application on the auxiliary running stack, and forward the call instruction to the second host application;
  • the host application receives a call instruction sent by the first host application, the call instruction includes identification information of the second host application, and the call instruction is used to instruct the second host application to read the share of the first host application Data in the storage area.
  • the call instruction structure is as follows: instruction header, separator, data;
  • the command header part is used to mark the second host application so that the host application can run the second host application; preferably, the command header is the AppID of the second host application, and different host applications pass Its AppID for identification;
  • the data part of the call instruction may be a read instruction that instructs to read data in the data sharing area of the first host application, so as to realize the communication between the first host application and the second host application. Data transfer.
  • the read instruction includes the AppID of the first hosted application and the address of the data to be read.
  • the host application starts the auxiliary running stack according to the call instruction; the auxiliary running stack is used to run the second hosting application on the auxiliary running stack while the first hosting application is running on the default running stack.
  • the auxiliary running stack is used to run the second hosting application on the auxiliary running stack while the first hosting application is running on the default running stack.
  • the second host application marked by the call instruction is run on the auxiliary running stack.
  • the host application After the host application receives the call instruction, according to the AppID included in the call instruction, checks whether there is a corresponding second host application running on the auxiliary running stack;
  • the call instruction may be forwarded to the second host application, so that the second host application executes the call instruction;
  • the auxiliary run stack is started, the second host application is run in the auxiliary run stack, and the call instruction is forwarded to the second host application so that all The second host application executes the call instruction.
  • the host application stops the hosting application, and the auxiliary running stack is cleared instead of destroying, so that the required hosting application can be quickly run on the auxiliary running stack.
  • the second hosted application is not started, it is determined whether there is an activated and emptied auxiliary running stack; if it exists, the second hosted application is directly run on the auxiliary running stack; if it does not exist, the auxiliary running is started Stack, running the second hosting application on the auxiliary running stack.
  • the host application calls the second host application in the background, that is, the interface of the first host application remains unchanged.
  • the host application forwards the call instruction to the second host application so that the second host application executes the call instruction.
  • the host application is a shared storage area established by the first host application, and only opens read and write permissions to its owner, that is, the corresponding host application; for the second host application, only reads permissions are opened to it. Therefore, since the second host application can only read the data of the first host application, but cannot modify the data of the first host application, although the data security of the first host application is guaranteed, the second host application cannot be combined with the first host application. Interaction between boarding applications.
  • the first homestay application and the second homestay application need to respectively access the shared storage area of each other.
  • the host application establishes the shared storage area of the second host application before, at the same time or after running the second host application on the auxiliary running stack according to the call instruction sent by the first host application.
  • the second host application accesses the data in the shared storage area of the first host application through the access request; writes the read data into the shared storage area of the second host application; the second host application Process the data written in the shared storage area of the second host application and save the processing result.
  • the second host application sends a feedback message to the first host application, so that the first host application sends to the host application the information about the shared storage area of the second host application according to the feedback message.
  • the first host application reads the corresponding processed data stored in the shared storage area of the second host application; stores the processed data in the first host application The application's own shared storage area.
  • the data access of the second host application to the first host application is realized, and the two-way data interaction between the first host application and the second host application is further realized.
  • Fig. 2 is a schematic flow chart of a method for data transfer between boarding applications provided by some embodiments of this application. The method is applied to a first boarding application and includes the following steps:
  • Step S21 Send a call instruction, where the call instruction is used to instruct the second host application to read the data in the shared storage area of the first host application;
  • Step S22 Receive an execution result returned by the second hosting application forwarded by the host application after accessing the shared storage area of the first hosting application.
  • step S21 In a preferred implementation of step S21,
  • the first host application is started by a host application; the host application starts a default running stack, and runs the first host application on it. Before, at the same time or after the host application starts the first hosted application, establish a shared storage area for the first hosted application.
  • permission control is performed on the shared storage area, for example, the shared storage area is locked using the authorization ID of the first hosting application.
  • the shared storage area is locked using the authorization ID of the first hosting application.
  • the host application receives the authority information set by the first host application and stores the authority information locally; or, the host application receives the authority information set by the user, and stores the authority information locally.
  • the authority information includes authority separately set for different boarding applications, and the different boarding applications are identified by their AppID.
  • the first host application sends a call instruction, and the call instruction is used to instruct the second host application to read data in the shared storage area of the first host application.
  • the host application runs the second host application on the auxiliary running stack according to the call instruction sent by the first host application, and forwards the call instruction to the second host application;
  • step S22 In a preferred implementation of step S22,
  • the host application receives an access request from the second host application to the shared storage area of the first host application.
  • the host application authenticates the access authority of the second host application; if the authentication is passed, the access request is released; if the authentication fails, the access request is rejected and the second The host application returns messages such as authentication failure.
  • the second host application reads the data in the data sharing area of the first host application.
  • the second hosting application returns an execution result of executing the read instruction to the first hosting application.
  • the host application receives the execution result returned after the second host application accesses the shared storage area of the first host application; and returns the execution result to the first host application.
  • the first hosting application receives the execution result returned after the second hosting application forwarded by the host application accesses the shared storage area of the first hosting application.
  • the first homestay application and the second homestay application need to respectively access the shared storage area of each other.
  • the host application establishes the shared storage area of the second host application before, at the same time or after running the second host application on the auxiliary running stack according to the call instruction sent by the first host application.
  • the second host application accesses the data in the shared storage area of the first host application through the access request; writes the read data into the shared storage area of the second host application; the second host application Process the data written in the shared storage area of the second host application and save the processing result.
  • the second host application issues a second call instruction to the first host application, and the second call instruction is used to instruct the first host application to read the data in the shared storage area of the second host application ;
  • the host application forwards the second call instruction to the first host application; the first host application receives the second call instruction, and sends a response to the host application according to the second call instruction
  • the access request for the shared storage area of the second host application so that the host application can authenticate the access request, and after the authentication is passed, access the data in the shared storage area of the second host application.
  • the first host application After the authentication is passed, the first host application reads the corresponding processed data stored in the shared storage area of the second host application; and stores the processed data in the shared storage area of the first host application itself.
  • the first host application returns an execution result of executing the read instruction to the second host application.
  • the execution result is received by the host application and returned to the second host application.
  • the data access of the second host application to the first host application is realized, and the two-way data interaction between the first host application and the second host application is further realized.
  • FIG. 3 is a schematic flow chart of a method for data transfer between hosting applications according to some embodiments of this application. The method is applied to a second hosting application and includes the following steps:
  • Step 31 Receive a call instruction sent by the first host application forwarded by the host application, where the call instruction is used to instruct the second host application to read data in the shared storage area of the first host application;
  • Step S32 Send an access request to the data in the shared storage area of the first host application to the host application; so that the host application can authenticate the authority of the second host application; after the authentication is passed, Access the data in the shared storage area of the first hosting application.
  • step S31 In a preferred implementation of step S31,
  • the host application receives the call instruction sent by the first host application, and the call instruction is used to instruct the second host application to read the data in the shared storage area of the first host application.
  • the host application starts the auxiliary running stack according to the call instruction; the auxiliary running stack is used to run the second hosting application on the auxiliary running stack while the first hosting application is running on the default running stack.
  • the host application forwards the call instruction to the second host application so that the second host application executes the call instruction.
  • step S32 In a preferred implementation of step S32,
  • the second host application generates an access request to the shared storage area of the first host application according to the call instruction.
  • the host application authenticates the access authority of the second host application; if the authentication is passed, the access request is released; if the authentication fails, the access request is rejected and the second The host application returns messages such as authentication failure.
  • the second host application reads the data in the data sharing area of the first host application.
  • the second hosting application returns an execution result of executing the read instruction to the first hosting application.
  • the execution result is received by the host application and returned to the first host application.
  • the first homestay application and the second homestay application need to respectively access the shared storage area of each other.
  • the second host application accesses the data in the shared storage area of the first host application through the access request; writes the read data into the shared storage area of the second host application; the second host application Process the data written in the shared storage area of the second host application and save the processing result.
  • the second host application sends a second call instruction to the first host application, and the second call instruction is used to instruct the first host application to read data in the shared storage area of the second host application .
  • the host application forwards the second call instruction to the first host application; the first host application receives the second call instruction, and sends a response to the host application according to the second call instruction
  • the access request of the shared storage area of the second host application so that the host application can authenticate the access request.
  • the first host application reads the corresponding processed data stored in the shared storage area of the second host application; and stores the processed data in the shared storage area of the first host application itself.
  • the first host application returns an execution result of executing the read instruction to the second host application.
  • the execution result is received by the host application and returned to the second host application.
  • the second host application receives the execution result forwarded by the host application.
  • the data access of the second host application to the first host application is realized, and the two-way data interaction between the first host application and the second host application is further realized.
  • FIG. 4 shows a block diagram of an exemplary computer system/server 012 suitable for implementing embodiments of the present invention.
  • the computer system/server 012 shown in FIG. 4 is only an example, and should not bring any limitation to the function and application scope of the embodiment of the present invention.
  • the computer system/server 012 is represented in the form of a general-purpose computing device.
  • the components of the computer system/server 012 may include, but are not limited to: one or more processors or processing units 016, a system memory 028, and a bus 018 connecting different system components (including the system memory 028 and the processing unit 016).
  • the bus 018 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
  • these architectures include but are not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and peripheral component interconnection ( PCI) bus.
  • ISA industry standard architecture
  • MAC microchannel architecture
  • VESA Video Electronics Standards Association
  • PCI peripheral component interconnection
  • the computer system/server 012 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer system/server 012, including volatile and nonvolatile media, removable and non-removable media.
  • the system memory 028 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 030 and/or cache memory 032.
  • the computer system/server 012 may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • the storage system 034 can be used to read and write non-removable, non-volatile magnetic media (not shown in Figure 4, and generally referred to as a "hard drive").
  • a disk drive for reading and writing to removable non-volatile disks such as "floppy disks”
  • a removable non-volatile optical disk such as CD-ROM, DVD-ROM
  • other optical media read and write optical disc drives.
  • each drive can be connected to the bus 018 through one or more data media interfaces.
  • the memory 028 may include at least one program product, and the program product has a set (for example, at least one) program modules, which are configured to perform the functions of the embodiments of the present invention.
  • a program/utility tool 040 with a set of (at least one) program module 042 can be stored in, for example, the memory 028.
  • Such program module 042 includes, but is not limited to, an operating system, one or more host applications, and other programs Modules and program data, each of these examples or some combination may include the realization of a network environment.
  • the program module 042 generally executes the functions and/or methods in the described embodiments of the present invention.
  • the computer system/server 012 can also communicate with one or more external devices 014 (such as a keyboard, pointing device, display 024, etc.).
  • the computer system/server 012 communicates with an external radar device, and can also communicate with one or Multiple devices that enable users to interact with the computer system/server 012, and/or communicate with any devices that enable the computer system/server 012 to communicate with one or more other computing devices (such as network cards, modems, etc.) Communication. This communication can be performed through an input/output (I/O) interface 022.
  • I/O input/output
  • the computer system/server 012 can also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 020.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 020 communicates with other modules of the computer system/server 012 through the bus 018.
  • other hardware and/or software modules can be used in conjunction with the computer system/server 012, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems , Tape drives and data backup storage systems.
  • the processing unit 016 executes the functions and/or methods in the described embodiments of the present invention by running a program stored in the system memory 028.
  • the above-mentioned computer program may be set in a computer storage medium, that is, the computer storage medium is encoded with a computer program.
  • the program is executed by one or more computers, one or more computers can execute the above-mentioned embodiments of the present invention.
  • the method flow and/or device operation.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
  • computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory Erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
  • the computer program code used to perform the operations of the present invention can be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connection).
  • LAN local area network
  • WAN wide area network

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种寄宿应用间的数据传递方法,包括建立第一寄宿应用的共享存储区;对所述共享存储区进行访问权限加锁(S11);接收所述第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求并进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求(S12)。所述方法实现了不同寄宿应用间的数据访问。

Description

一种寄宿应用间的数据传递方法 【技术领域】
本申请涉及互联网应用领域,尤其涉及一种寄宿应用间的数据传递方法。
【背景技术】
目前在一些APP(Application,应用)中,提供了寄宿应用,寄宿应用无需安装卸载,可以在宿主应用内被便捷地获取和传递,同时具有出色的使用体验。寄宿应用可以提供便捷、丰富的服务,如预定、商品购买、游戏等。但是,由于寄宿应用的独立性,在同一时间仅能运行一个寄宿应用,不同寄宿应用间无法实现实时数据共享,即使是非实时数据共享也是非常困难的。
【发明内容】
本申请的多个方面提供一种寄宿应用间的数据传递方法,用于解决不同寄宿应用之间无法实现数据交互的问题。
本申请的一方面,提供一种寄宿应用间的数据传递方法,应用于宿主应用,包括建立第一寄宿应用的共享存储区;对所述共享存储区进行访问权限加锁;接收第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求,对所述第二寄宿应用的权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求。
本申请的另一方面,提供一种寄宿应用间的数据传递方法,应用于第一寄宿应用,包括发送调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;接收由所述宿主应用转发的所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果。
本申请的另一方面,提供一种寄宿应用间的数据传递方法,应用于第二寄宿应用,包括接收宿主应用转发的由第一寄宿应用发送的调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;向所述宿主应用发送对所述第一寄宿应用的共享存储区中的数据的访问请求;以便所述宿主应用对所述第二寄宿应用的权限进行鉴权。
本申请的另一方面,提供一种设备,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现任一上述的方法。
本申请的另一方面,提供一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现任一上述的方法。
由所述技术方案可知,本申请的上述实施例中,可以实现寄宿应用间的数据访问。
【附图说明】
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一些实施例提供的一种应用于宿主应用的寄宿应用间的数据传递方法的流程示意图;
图2为本申请一些实施例提供的一种应用于第一寄宿应用的寄宿应用间的数据传递方法的流程示意图;
图3为本申请一些实施例提供的一种应用于第二寄宿应用的寄宿应用间的数据传递方法的流程示意图;
图4为适于用来实现本发明的一些实施例的示例性计算机系统/服务器的框图。
【具体实施方式】
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的一些实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的全部其他实施例,都属于本申请保护的范围。
另外,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和 B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
图1为本申请一些实施例提供的一种寄宿应用间的数据传递方法的流程示意图,所述方法应用于宿主应用,包括以下步骤:
步骤S11、建立第一寄宿应用的共享存储区;对所述共享存储区进行访问权限加锁;
步骤S12、接收第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求,对所述第二寄宿应用的权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求。
在一些实施例中,宿主应用为安装在无线设备上的应用(APP)客户端,例如微信,或无线设备的操作系统;寄宿应用为依赖于宿主应用运行的应用,例如微信中的小程序等。
其中,所述无线设备为宿主,包括但不限于任何一种可与用户进行人机交互并能够实现无线通信功能的智能终端设备,如智能手机、平板电脑、笔记本电脑等,当然,还可以为其他具有类似功能的设备,本实施例对此不加以限制。所述智能终端设备可以采用任意操作系统,如Android操作系统、iOS操作系统、Windows操作系统等。
在步骤S11的一种优选实施例中,
所述宿主应用响应于用户对第一寄宿应用的触发,启动第一寄宿应用。
优选地,所述宿主应用启动默认运行栈,在其上运行第一寄宿应用。所述宿主应用启动所述第一寄宿应用之前、同时或之后,为所述第一寄宿应用建立共享存储区。
优选地,所述共享存储区位于宿主的存储空间中。优选地,所述共享存储区可以设置在宿主的运行内存区(RAM,Random Access Memory),可以设置在宿主的机身内存区(ROM,Read Only Memory),也可以在运行内存区和机身内存区都设置有共享存储区。
优选地,由于宿主操作系统的沙盒机制,每个寄宿应用都有自己对应的沙盒,每个沙盒之间都是相互独立的,互相不能访问;因此,可以将所述共享存储区分配在宿主的机身内存区的data数据目录,防止被破解。
优选地,由于宿主的内存容量限制,尤其是运行内存的容量限制,需要事先配置所述共享存储区的大小,避免影响宿主操作系统的正常运行。
优选地,宿主应用在宿主的存储空间中划分存储区,在所划分的存储区中为每一个寄宿应用分别分配其共享存储区的起始和结束地址。
优选地,对所述共享存储区进行权限控制,例如,使用第一寄宿应用的授权ID,对所述共享存储区进行加锁。通过对所述共享存储区进行加锁,可以做到对第一寄宿应用对所述共享存储区的读写操作不做任何限制;而对其他寄宿应用对所述共享存储区的读写操作则需要进行鉴权。
优选地,所述宿主应用接收第一寄宿应用设置的权限信息,将所述权限信息存储在本地;或者,所述宿主应用接收用户设置的权限信息,将所述权限信息存储在本地。
优选地,所述权限信息包括对不同寄宿应用单独设置的权限,所述不同寄宿应用通过其AppID进行标识。
在实际应用当中,寄宿应用之间可以通过宿主应用转发消息实现交互,但是,对于寄宿应用自身的某些数据,例如图片、视频、音频等数据,无法简单的通过宿主应用转发,因此可以通过设立共享存储区以实现上述数据的传递。
在步骤S12的一种优选实现方式中,
所述宿主应用接收所述第二寄宿应用对所述第一寄宿应用的共享存储区的访问请求,对所述第二寄宿应用的权限进行鉴权。
优选地,所述第二寄宿应用根据所述调用指令中的数据部分,生成对所述第一寄宿应用的共享存储区的访问请求。所述调用指令的数据部分可以是指示所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据的读取指令,以实现所述第一寄宿应用与所述第二寄宿应用之间的数据传递。
优选地,所述宿主应用对所述第二寄宿应用的访问权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求,向所述第二寄宿应用返回诸如鉴权失败的消息。
优选地,所述宿主应用根据所述第二寄宿应用发出的访问请求中包括的身份信息(如APPID、访问公钥),通过预先存储的权限信息对所述访问请求进行校验。
优选地,所述宿主应用拦截所述第二寄宿应用发出的消息,判断其是否为访问请求,若为访问请求,则对所述第二寄宿应用的访问权限进行鉴权;若非访问请求,则进行正常处理。
优选地,所述宿主应用通过预设的API接口,接收所述第二寄宿应用发出的访问请求,对所述第二寄宿应用的访问权限进行鉴权,以便所述第二寄宿应用通过所述API接口实现对所述第一寄宿应用的共享存储区的访问。
优选地,鉴权成功后,所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据。所述第二寄宿应用向所述第一寄宿应用返回执行所述调用指令的执行结果。
优选地,所述宿主应用接收所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果;将所述执行结果返回给所述第一寄宿应用。
优选地,所述接收第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求之前,还包括以下步骤:
接收第一寄宿应用发送的调用指令,将所述调用指令转发给所述第二寄宿应用;所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;
优选地,根据第一寄宿应用发送的调用指令,在辅助运行栈上运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用;
优选地,所述宿主应用接收第一寄宿应用发送的调用指令,所述调用指令包括第二寄宿应用标识信息,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据。
所述调用指令结构如下:指令头、分隔符、数据;
优选地,所述指令头部分用于标记所述第二寄宿应用,以便宿主应用运行所述第二寄宿应用;优选地,所述指令头为所述第二寄宿应用的AppID,不同寄宿应用通过其AppID进行标识;
优选地,所述调用指令的数据部分可以是指示读取所述第一寄宿应用的数据共享区中数据的读取指令,以实现所述第一寄宿应用与所述第二寄宿应用之间的数据传递。
优选地,所述读取指令包括所述第一寄宿应用的AppID及待读取数据的地 址。
优选地,所述宿主应用根据所述调用指令,启动辅助运行栈;所述辅助运行栈用于在默认运行栈运行第一寄宿应用的同时,在所述辅助运行栈运行第二寄宿应用。优选地,所述宿主应用所能启动的辅助运行栈为一个或多个,以便在所述一个或多个辅助运行栈分别运行不同的寄宿应用;即可以实现多个寄宿应用之间的即时通讯。
优选地,在所述辅助运行栈启动之后,将所述调用指令标记的第二寄宿应用运行在所述辅助运行栈上。
优选地,所述宿主应用接收到所述调用指令后,根据所述调用指令中包括的AppID,检查是否在辅助运行栈上运行有对应的第二寄宿应用;
若已在辅助运行栈中运行对应的第二寄宿应用,则可以将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令;
若未在辅助运行栈上运行对应的第二寄宿应用,则启动辅助运行栈,在所述辅助运行栈中运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。
在本申请的一个优选实施例中,调用结束后,所述宿主应用停止寄宿应用,清空而非销毁辅助运行栈,可以在所述辅助运行栈上迅速运行所需的寄宿应用。
优选地,若未启动第二寄宿应用,判断是否存在已启动的且清空的辅助运行栈;如果存在,则直接在所述辅助运行栈上运行第二寄宿应用;如果不存在,则启动辅助运行栈,在所述辅助运行栈上运行第二寄宿应用。
优选地,所述宿主应用在后台调用所述第二寄宿应用,即所述第一寄宿应用的界面不变。
所述宿主应用将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。
优选地,在本申请的一个优选实施例中;
所述宿主应用为第一寄宿应用建立的共享存储区,仅对其所有者,即对应的寄宿应用开放读写权限;对于第二寄宿应用,仅对其开放读权限。因此,由于第二寄宿应用仅能读取第一寄宿应用的数据,而无法修改第一寄宿应用的数据,虽然保证了第一寄宿应用的数据安全性,但是无法实现第二寄宿应用与第 一寄宿应用之间的交互。
对于第一寄宿应用与第二寄宿应用间的双向通讯,需要第一寄宿应用于第二寄宿应用分别访问对方的共享存储区。
优选地,所述寄宿应用根据第一寄宿应用发送的调用指令,在辅助运行栈上运行第二寄宿应用之前、同时或之后,建立第二寄宿应用的共享存储区。
所述第二寄宿应用通过所述访问请求访问所述第一寄宿应用的共享存储区中的数据;将所读取的数据写入第二寄宿应用的共享存储区中;所述第二寄宿应用对写入第二寄宿应用的共享存储区中的数据进行处理并保存处理结果。
优选地,所述第二寄宿应用向所述第一寄宿应用发出反馈消息,以便所述第一寄宿应用根据所述反馈消息向所述宿主应用发送对所述第二寄宿应用的共享存储区的访问请求,所述宿主应用鉴权通过后,所述第一寄宿应用读取存储于第二寄宿应用的共享存储区中对应的处理后的数据;将所述处理后的数据存储于第一寄宿应用自身的共享存储区。
通过本实施例所述方法,实现了第二寄宿应用对第一寄宿应用的数据访问,并进一步实现了第一寄宿应用与第二寄宿应用之间的双向数据交互。
图2为本申请一些实施例提供的一种寄宿应用间的数据传递方法的流程示意图,所述方法应用于第一寄宿应用,包括以下步骤:
步骤S21、发送调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;
步骤S22、接收由所述宿主应用转发的所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果。
在步骤S21的一种优选实现方式中,
优选地,所述第一寄宿应用是由宿主应用启动的;所述宿主应用启动默认运行栈,在其上运行第一寄宿应用。所述宿主应用启动所述第一寄宿应用之前、同时或之后,为所述第一寄宿应用建立共享存储区。
优选地,对所述共享存储区进行权限控制,例如,使用第一寄宿应用的授权ID,对所述共享存储区进行加锁。通过对所述共享存储区进行加锁,可以做到对第一寄宿应用对所述共享存储区的读写操作不做任何限制;而对其他寄宿 应用对所述共享存储区的读写操作则需要进行鉴权。
优选地,所述宿主应用接收第一寄宿应用设置的权限信息,将所述权限信息存储在本地;或者,所述宿主应用接收用户设置的权限信息,将所述权限信息存储在本地。
优选地,所述权限信息包括对不同寄宿应用单独设置的权限,所述不同寄宿应用通过其AppID进行标识。
优选地,所述第一寄宿应用发送调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据。
所述宿主应用根据第一寄宿应用发送的调用指令,在辅助运行栈上运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用;
具体步骤可参照前述实施例的对应部分,在此不再赘述。
在步骤S22的一种优选实现方式中,
所述宿主应用接收所述第二寄宿应用对所述第一寄宿应用的共享存储区的访问请求。
优选地,所述宿主应用对所述第二寄宿应用的访问权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求,向所述第二寄宿应用返回诸如鉴权失败的消息。
优选地,鉴权成功后,所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据。
优选地,所述第二寄宿应用向所述第一寄宿应用返回执行所述读取指令的执行结果。
优选地,所述宿主应用接收所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果;将所述执行结果返回给所述第一寄宿应用。
所述第一寄宿应用接收由所述宿主应用转发的所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果。
具体步骤可参照前述实施例的对应部分,在此不再赘述。
在本实施例的一种优选实现方式中,
对于第一寄宿应用与第二寄宿应用间的双向通讯,需要第一寄宿应用于第二寄宿应用分别访问对方的共享存储区。
优选地,所述寄宿应用根据第一寄宿应用发送的调用指令,在辅助运行栈上运行第二寄宿应用之前、同时或之后,建立第二寄宿应用的共享存储区。
所述第二寄宿应用通过所述访问请求访问所述第一寄宿应用的共享存储区中的数据;将所读取的数据写入第二寄宿应用的共享存储区中;所述第二寄宿应用对写入第二寄宿应用的共享存储区中的数据进行处理并保存处理结果。
优选地,所述第二寄宿应用向所述第一寄宿应用发出第二调用指令,所述第二调用指令用于指示第一寄宿应用读取所述第二寄宿应用的共享存储区中的数据;
优选地,所述宿主应用向所述第一寄宿应用转发所述第二调用指令;所述第一寄宿应用接收所述第二调用指令,根据所述第二调用指令向所述宿主应用发送对所述第二寄宿应用的共享存储区的访问请求,以便所述宿主应用对所述访问请求进行鉴权,鉴权通过后,访问所述第二寄宿应用的共享存储区中的数据。
鉴权通过后,所述第一寄宿应用读取存储于第二寄宿应用的共享存储区中对应的处理后的数据;将所述处理后的数据存储于第一寄宿应用自身的共享存储区。
优选地,所述第一寄宿应用向所述第二寄宿应用返回执行所述读取指令的执行结果。所述执行结果由所述宿主应用接收并返回给所述第二寄宿应用。
通过本实施例所述方法,实现了第二寄宿应用对第一寄宿应用的数据访问,并进一步实现了第一寄宿应用与第二寄宿应用之间的双向数据交互。
图3为本申请一些实施例提供的一种寄宿应用间的数据传递方法的流程示意图,所述方法应用于第二寄宿应用,包括以下步骤:
步骤31、接收宿主应用转发的由第一寄宿应用发送的调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;
步骤S32、向所述宿主应用发送对所述第一寄宿应用的共享存储区中的数据的访问请求;以便所述宿主应用对所述第二寄宿应用的权限进行鉴权;鉴权通过后,访问所述第一寄宿应用的共享存储区中的数据。
在步骤S31的一种优选实现方式中,
所述宿主应用接收第一寄宿应用发送的调用指令,所述调用指令用于指示 第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据。
优选地,所述宿主应用根据所述调用指令,启动辅助运行栈;所述辅助运行栈用于在默认运行栈运行第一寄宿应用的同时,在所述辅助运行栈运行第二寄宿应用。
所述宿主应用将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。
具体步骤可参照前述实施例的对应部分,在此不再赘述。
在步骤S32的一种优选实现方式中,
优选地,所述第二寄宿应用根据所述调用指令中,生成对所述第一寄宿应用的共享存储区的访问请求。
优选地,所述宿主应用对所述第二寄宿应用的访问权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求,向所述第二寄宿应用返回诸如鉴权失败的消息。
优选地,鉴权成功后,所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据。
优选地,所述第二寄宿应用向所述第一寄宿应用返回执行所述读取指令的执行结果。
优选地,所述执行结果由所述宿主应用接收并返回给所述第一寄宿应用。
具体步骤可参照前述实施例的对应部分,在此不再赘述。
在本实施例的一种优选实现方式中,
对于第一寄宿应用与第二寄宿应用间的双向通讯,需要第一寄宿应用于第二寄宿应用分别访问对方的共享存储区。
所述第二寄宿应用通过所述访问请求访问所述第一寄宿应用的共享存储区中的数据;将所读取的数据写入第二寄宿应用的共享存储区中;所述第二寄宿应用对写入第二寄宿应用的共享存储区中的数据进行处理并保存处理结果。
优选地,所述第二寄宿应用向所述第一寄宿应用发送第二调用指令,所述第二调用指令用于指示第一寄宿应用读取所述第二寄宿应用的共享存储区中的数据。
优选地,所述宿主应用向所述第一寄宿应用转发所述第二调用指令;所述 第一寄宿应用接收所述第二调用指令,根据所述第二调用指令向所述宿主应用发送对所述第二寄宿应用的共享存储区的访问请求,以便所述宿主应用对所述访问请求进行鉴权。鉴权通过后,所述第一寄宿应用读取存储于第二寄宿应用的共享存储区中对应的处理后的数据;将所述处理后的数据存储于第一寄宿应用自身的共享存储区。
优选地,所述第一寄宿应用向所述第二寄宿应用返回执行所述读取指令的执行结果。所述执行结果由所述宿主应用接收并返回给所述第二寄宿应用。
优选地,所述第二寄宿应用接收由所述宿主应用转发的所述执行结果。
通过本实施例所述方法,实现了第二寄宿应用对第一寄宿应用的数据访问,并进一步实现了第一寄宿应用与第二寄宿应用之间的双向数据交互。
图4示出了适于用来实现本发明实施方式的示例性计算机系统/服务器012的框图。图4显示的计算机系统/服务器012仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图4所示,计算机系统/服务器012以通用计算设备的形式表现。计算机系统/服务器012的组件可以包括但不限于:一个或者多个处理器或者处理单元016,系统存储器028,连接不同系统组件(包括系统存储器028和处理单元016)的总线018。
总线018表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。
计算机系统/服务器012典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机系统/服务器012访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器028可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)030和/或高速缓存存储器032。计算机系统/服务器012可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统034可以用于读写不可移动的、非易失性磁介质(图 4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线018相连。存储器028可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。
具有一组(至少一个)程序模块042的程序/实用工具040,可以存储在例如存储器028中,这样的程序模块042包括——但不限于——操作系统、一个或者多个寄宿应用、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块042通常执行本发明所描述的实施例中的功能和/或方法。
计算机系统/服务器012也可以与一个或多个外部设备014(例如键盘、指向设备、显示器024等)通信,在本发明中,计算机系统/服务器012与外部雷达设备进行通信,还可与一个或者多个使得用户能与该计算机系统/服务器012交互的设备通信,和/或与使得该计算机系统/服务器012能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口022进行。并且,计算机系统/服务器012还可以通过网络适配器020与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图4所示,网络适配器020通过总线018与计算机系统/服务器012的其它模块通信。应当明白,尽管图4中未示出,可以结合计算机系统/服务器012使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元016通过运行存储在系统存储器028中的程序,从而执行本发明所描述的实施例中的功能和/或方法。
上述的计算机程序可以设置于计算机存储介质中,即该计算机存储介质被编码有计算机程序,该程序在被一个或多个计算机执行时,使得一个或多个计算机执行本发明上述实施例中所示的方法流程和/或装置操作。
随着时间、技术的发展,介质含义越来越广泛,计算机程序的传播途径不 再受限于有形介质,还可以直接从网络下载等。可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员 应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (16)

  1. 一种寄宿应用间的数据传递方法,应用于宿主应用,其特征在于,包括:
    建立第一寄宿应用的共享存储区;对所述共享存储区进行访问权限加锁;
    接收第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求,对所述第二寄宿应用的权限进行鉴权;
    若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求。
  2. 根据权利要求1所述的方法,其特征在于,所述建立第一寄宿应用的共享存储区包括:
    启动默认运行栈,在其上运行第一寄宿应用;
    运行所述第一寄宿应用之前、同时或之后,建立第一寄宿应用的共享存储区。
  3. 根据权利要求2所述的方法,其特征在于,所述对所述共享存储区进行访问权限加锁包括:
    预先存储具有对所述共享存储区的访问权限的寄宿应用的身份信息。
  4. 根据权利要求3所述的方法,其特征在于,所述对所述共享存储区进行访问权限加锁还包括:对所述第一寄宿应用开放读写权限,对第二寄宿应用开放读权限。
  5. 根据权利要求1所述的方法,其特征在于,所述接收第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求之前,还包括:
    接收第一寄宿应用发送的调用指令,将所述调用指令转发给所述第二寄宿应用;所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据。
  6. 根据权利要求5所述的方法,其特征在于,所述根据第一寄宿应用发送的调用指令,将所述调用指令转发给所述第二寄宿应用包括:
    在辅助运行栈上运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用。
  7. 根据权利要求3或4所述的方法,其特征在于,所述接收所述第二寄宿应用发送的对所述第一寄宿应用的共享存储区的数据访问请求并进行鉴权包括:
    根据所述数据访问请求中包括的身份信息,通过预先存储的权限信息对所述 访问请求进行校验。
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果;将所述执行结果返回给所述第一寄宿应用。
  9. 根据权利要求6所述的方法,其特征在于,所述在辅助运行栈上运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用还包括:
    运行所述第二寄宿应用之前、同时或之后,建立第二寄宿应用的共享存储区。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    接收所述第一寄宿应用发送的对所述第二寄宿应用的共享存储区的数据访问请求,对所述第一寄宿应用的权限进行鉴权;若鉴权通过,则放行所述访问请求;若鉴权失败,则拒绝所述访问请求。
  11. 一种寄宿应用间的数据传递方法,应用于第一寄宿应用,其特征在于,包括:
    发送调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;
    接收由所述宿主应用转发的所述第二寄宿应用对所述第一寄宿应用的共享存储区进行访问后返回的执行结果。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    接收由所述宿主应用转发的所述第二寄宿应用发送的第二调用指令,所述第二调用指令用于指示第一寄宿应用读取所述第二寄宿应用的共享存储区中的数据;
    向所述宿主应用发送对所述第二寄宿应用的共享存储区的访问请求,以便所述宿主应用对所述第一寄宿应用的权限进行鉴权。
  13. 一种寄宿应用间的数据传递方法,应用于第二寄宿应用,其特征在于,包括:
    接收宿主应用转发的由第一寄宿应用发送的调用指令,所述调用指令用于指示第二寄宿应用读取所述第一寄宿应用的共享存储区中的数据;
    向所述宿主应用发送对所述第一寄宿应用的共享存储区中的数据的访问请求;以便所述宿主应用对所述第二寄宿应用的权限进行鉴权。
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:
    发送第二调用指令,所述第二调用指令用于指示第一寄宿应用读取所述第二寄宿应用的共享存储区中的数据。
  15. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-14中任一所述的方法。
  16. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-14中任一所述的方法。
PCT/CN2020/085548 2019-04-26 2020-04-20 一种寄宿应用间的数据传递方法 WO2020216166A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/452,389 US20220043901A1 (en) 2019-04-26 2021-10-26 Method of data transfer between hosted applications

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910345874.3 2019-04-26
CN201910345874.3A CN110083465B (zh) 2019-04-26 2019-04-26 一种寄宿应用间的数据传递方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/452,389 Continuation US20220043901A1 (en) 2019-04-26 2021-10-26 Method of data transfer between hosted applications

Publications (1)

Publication Number Publication Date
WO2020216166A1 true WO2020216166A1 (zh) 2020-10-29

Family

ID=67417132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/085548 WO2020216166A1 (zh) 2019-04-26 2020-04-20 一种寄宿应用间的数据传递方法

Country Status (3)

Country Link
US (1) US20220043901A1 (zh)
CN (1) CN110083465B (zh)
WO (1) WO2020216166A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712478B (zh) * 2018-04-28 2019-10-22 上海掌门科技有限公司 一种分享寄宿应用的方法及设备
CN109933444A (zh) * 2019-03-07 2019-06-25 上海连尚网络科技有限公司 一种寄宿应用间的即时通讯方法
CN110083465B (zh) * 2019-04-26 2021-08-17 上海连尚网络科技有限公司 一种寄宿应用间的数据传递方法
CN111885152B (zh) * 2020-07-21 2022-08-19 上海连尚网络科技有限公司 推广信息的处理方法、电子设备及计算机可读存储介质
CN112000880B (zh) * 2020-07-31 2024-01-23 北京百度网讯科技有限公司 推送消息的处理方法、装置、电子设备及可读存储介质
CN112565466B (zh) * 2021-02-20 2021-04-27 支付宝(杭州)信息技术有限公司 跨应用关联用户的方法及装置
CN113407259B (zh) * 2021-07-13 2022-09-16 北京百度网讯科技有限公司 加载场景的方法、装置、设备以及存储介质
CN113687891A (zh) * 2021-07-19 2021-11-23 阿里巴巴新加坡控股有限公司 数据管理方法、装置及设备
CN117093377A (zh) * 2022-05-12 2023-11-21 北京图森智途科技有限公司 用于在多个模块之间传输数据的系统和方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718322A (zh) * 2014-11-30 2016-06-29 中国科学院沈阳自动化研究所 同一进程下多应用模块客户端的异常处理方法
US20170031697A1 (en) * 2015-07-27 2017-02-02 Samsung Electronics Co., Ltd. Method for managing operating system and electronic device supporting the same
CN108665946A (zh) * 2018-05-08 2018-10-16 阿里巴巴集团控股有限公司 一种业务数据的访问方法和装置
CN108763881A (zh) * 2018-05-18 2018-11-06 上海掌门科技有限公司 用于控制用户权限的方法和设备
CN110083465A (zh) * 2019-04-26 2019-08-02 上海连尚网络科技有限公司 一种寄宿应用间的数据传递方法

Family Cites Families (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145006A (en) * 1997-06-25 2000-11-07 Emc Corporation Method and apparatus for coordinating locking operations of heterogeneous host computers accessing a storage subsystem
US20020116186A1 (en) * 2000-09-09 2002-08-22 Adam Strauss Voice activity detector for integrated telecommunications processing
US8521966B2 (en) * 2007-11-16 2013-08-27 Vmware, Inc. VM inter-process communications
CN101661381B (zh) * 2009-09-08 2012-05-30 华南理工大学 一种基于Xen的数据共享与访问控制方法
US20120304283A1 (en) * 2011-05-27 2012-11-29 Microsoft Corporation Brokered item access for isolated applications
CN102880897B (zh) * 2011-07-14 2016-01-27 中国移动通信集团公司 一种智能卡的应用数据共享方法和智能卡
KR101751936B1 (ko) * 2011-12-15 2017-07-12 한국전자통신연구원 호스트 기반 단말 가상화 환경에서 공유 메모리를 이용한 입출력 디바이스 가상화 장치 및 방법
US9521551B2 (en) * 2012-03-22 2016-12-13 The 41St Parameter, Inc. Methods and systems for persistent cross-application mobile device identification
US9117087B2 (en) * 2012-09-06 2015-08-25 Box, Inc. System and method for creating a secure channel for inter-application communication based on intents
EP2936733B1 (en) * 2012-12-21 2018-08-22 Mobile Iron, Inc. Secure mobile app connection bus
US9197408B2 (en) * 2013-05-10 2015-11-24 Sap Se Systems and methods for providing a secure data exchange
US9473562B2 (en) * 2013-09-12 2016-10-18 Apple Inc. Mediated data exchange for sandboxed applications
EP3058500A4 (en) * 2013-10-18 2018-01-17 Nokia Technologies Oy Method and system for operating and monitoring permissions for applications in an electronic device
US9740606B1 (en) * 2013-11-01 2017-08-22 Amazon Technologies, Inc. Reliable distributed messaging using non-volatile system memory
CN104836715B (zh) * 2014-02-08 2018-08-03 国际商业机器公司 在移动设备上运行的多个应用之间共享数据的方法和装置
US9811393B2 (en) * 2014-05-29 2017-11-07 Apple Inc. Consistent extension points to allow an extension to extend functionality of an application to another application
US9400663B2 (en) * 2014-09-03 2016-07-26 International Business Machines Corporation Managing middleware using an application manager
CN105049412B (zh) * 2015-06-02 2018-04-03 深圳市联软科技股份有限公司 一种不同网络间数据安全交换方法、装置及设备
US10069629B2 (en) * 2015-06-17 2018-09-04 Airwatch Llc Controlled access to data in a sandboxed environment
US10284532B2 (en) * 2015-07-31 2019-05-07 Blackberry Limited Managing access to resources
CN106487637B (zh) * 2015-08-25 2020-04-03 腾讯科技(深圳)有限公司 一种应用消息的处理系统、方法及应用设备
EP3232609B1 (en) * 2015-12-30 2019-09-04 Huawei Technologies Co., Ltd. Locking request processing method and server
US10255203B2 (en) * 2016-06-30 2019-04-09 Intel Corporation Technologies for zero-copy inter-virtual-machine data movement
CN107943596A (zh) * 2016-10-12 2018-04-20 阿里巴巴集团控股有限公司 进程通信方法、装置及系统
CN106650427B (zh) * 2016-12-28 2019-10-22 北京奇虎测腾科技有限公司 沙箱运行环境的检测方法及检测装置
US10275169B2 (en) * 2017-01-18 2019-04-30 Microsoft Technology Licensing, Llc Shared memory in memory isolated partitions
US11687451B2 (en) * 2017-03-23 2023-06-27 Telefonaktiebolaget Lm Ericsson (Publ) Memory allocation manager and method performed thereby for managing memory allocation
US10540523B2 (en) * 2017-04-26 2020-01-21 International Business Machines Corporation Comprehensive system wide cross-reference mechanism using runtime data collection
US10353798B1 (en) * 2017-07-05 2019-07-16 Amazon Technologies, Inc. Rapid development environment
CN109587103B (zh) * 2017-09-29 2021-07-02 西门子公司 用于执行云端系统中的应用的方法、装置及云端系统
US11068607B2 (en) * 2018-03-10 2021-07-20 International Business Machines Corporation Protecting cognitive code and client data in a public cloud via deployment of data and executables into a secure partition with persistent data
DE112018007104T5 (de) * 2018-03-20 2020-10-29 Mitsubishi Electric Corporation Informationsverarbeitungsgerät, Verfahren und Programm
CN108694092B (zh) * 2018-05-11 2021-01-15 华中科技大学 一种面向并行应用的容器通信方法和系统
US11017109B1 (en) * 2018-06-02 2021-05-25 Apple Inc. Dynamic sandboxing of user data
CN108829528B (zh) * 2018-06-11 2021-06-25 腾讯科技(深圳)有限公司 内容分享方法和装置、消息处理方法和装置
US11520611B2 (en) * 2018-08-20 2022-12-06 Intel Corporation Secure public cloud using extended paging and memory integrity
US11030203B2 (en) * 2018-09-25 2021-06-08 Sap Se Machine learning detection of database injection attacks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718322A (zh) * 2014-11-30 2016-06-29 中国科学院沈阳自动化研究所 同一进程下多应用模块客户端的异常处理方法
US20170031697A1 (en) * 2015-07-27 2017-02-02 Samsung Electronics Co., Ltd. Method for managing operating system and electronic device supporting the same
CN108665946A (zh) * 2018-05-08 2018-10-16 阿里巴巴集团控股有限公司 一种业务数据的访问方法和装置
CN108763881A (zh) * 2018-05-18 2018-11-06 上海掌门科技有限公司 用于控制用户权限的方法和设备
CN110083465A (zh) * 2019-04-26 2019-08-02 上海连尚网络科技有限公司 一种寄宿应用间的数据传递方法

Also Published As

Publication number Publication date
CN110083465A (zh) 2019-08-02
CN110083465B (zh) 2021-08-17
US20220043901A1 (en) 2022-02-10

Similar Documents

Publication Publication Date Title
WO2020216166A1 (zh) 一种寄宿应用间的数据传递方法
US10931678B2 (en) Authorized-login implementation method and device, apparatus, system, platform, and storage medium
US9094400B2 (en) Authentication in virtual private networks
RU2541847C2 (ru) Управление доступом к защищенным функциям приложений с использованием уровней доверия клиента
CN1574798B (zh) 受控跨网络边界媒体流中继机
US20100197293A1 (en) Remote computer access authentication using a mobile device
RU2683620C1 (ru) Способ осуществления совместного использования данных между клиентом и виртуальным рабочим столом, клиентом и системой
WO2021036877A1 (zh) 一种信息处理方法、设备和计算机存储介质
WO2018103559A1 (zh) 授权登录方法及装置
US11831650B2 (en) Personalized services based on confirmed proximity of user
US9560122B1 (en) Secure native application messaging with a browser application
US20170264649A1 (en) Employing session level restrictions to limit access to a redirected interface of a composite device
WO2022127118A1 (zh) 文件传输方法、装置、电子设备及存储介质
WO2017156784A1 (zh) 一种通知消息处理方法、装置及终端
WO2022143174A1 (zh) 一种数据传输方法、装置、设备、存储介质及计算机程序产品
WO2020020202A1 (zh) 应用程序的账号管理方法、装置、设备和介质
US20180337922A1 (en) Method and device for controlling smart device, server and storage medium
CN114938288B (zh) 一种数据访问方法、装置、设备以及存储介质
US20130297718A1 (en) Server device, client device, data sharing system and method for sharing data between client device and server device thereof
CN111988292A (zh) 一种内网终端访问互联网的方法、装置及系统
WO2020177731A1 (zh) 一种寄宿应用间的即时通讯方法
CN113032829B (zh) 多通道并发的文件权限管理方法、装置、服务器和介质
US11044285B1 (en) Method of providing secure ad hoc communication and collaboration to multiple parties
US20160285819A1 (en) Sharing and controlling electronic devices located at remote locations using xmpp server
US11316854B2 (en) Reverse authentication in a virtual desktop infrastructure environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20795578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 17/12/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 20795578

Country of ref document: EP

Kind code of ref document: A1