WO2020216204A1 - 信息获取方法和装置 - Google Patents

信息获取方法和装置 Download PDF

Info

Publication number
WO2020216204A1
WO2020216204A1 PCT/CN2020/085801 CN2020085801W WO2020216204A1 WO 2020216204 A1 WO2020216204 A1 WO 2020216204A1 CN 2020085801 W CN2020085801 W CN 2020085801W WO 2020216204 A1 WO2020216204 A1 WO 2020216204A1
Authority
WO
WIPO (PCT)
Prior art keywords
applet
authorization
authorization status
user
running platform
Prior art date
Application number
PCT/CN2020/085801
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 WO2020216204A1 publication Critical patent/WO2020216204A1/zh
Priority to US17/452,168 priority Critical patent/US20220043898A1/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/31User authentication
    • G06F21/41User authentication where a single sign-on provides access to a plurality of computers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • 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/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow

Definitions

  • the embodiments of the present application relate to the field of computer technology, in particular to the field of Internet technology, and in particular to methods and devices for obtaining information.
  • the applet here may be, for example, an applet developed by Java.
  • the embodiment of the application proposes an information acquisition method and device.
  • an embodiment of the present application provides an information acquisition method, which is applied to a terminal device.
  • the method includes: in response to detecting a start operation of an applet on a first applet running platform integrated with a first host application, determining The authorization status of the applet, where at least one second host application installed on the terminal device is integrated with the second applet running platform, and the authorization status of the applet is based on the second applet running platform integrated by the second host application. If the authorization status is determined, the authorization status includes the user authorized and the user not authorized; if the authorization status of the applet is determined to be the user authorized, in response to the applet on the first applet running platform receiving the authorized status corresponding to the user’s authorization Authorized operation instructions, execute authorized operation instructions.
  • an embodiment of the present application provides an information acquisition device, which is applied to a terminal device, and the device includes: a determining unit configured to respond to detection of a first applet running platform integrated with a first host application.
  • the startup operation of the program determines the authorization status of the applet, where at least one second host application installed on the terminal device is integrated with the second applet running platform, and the authorization status of the applet is based on the second applet integrated by the second host application If the authorization status of the applet on the running platform is determined, the authorization status includes user authorized and user unauthorized; the execution unit is configured to respond to the first applet running platform if the authorization status of the applet is determined to be the user authorized The applet receives the authorized operation instruction corresponding to the user's authorization, and executes the authorized operation instruction.
  • an embodiment of the present application provides an electronic device, including: one or more processors; a storage device, used to store one or more programs, when one or more programs are executed by one or more processors , Enabling one or more processors to implement the method in any embodiment of the information acquisition method.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, a method such as any one of the embodiments of the information acquisition method is implemented.
  • the authorization status of the applet is determined, wherein the terminal device is installed at least A second host application is integrated with a second applet running platform.
  • the authorization status of the applet is determined according to the authorization status of the applet on the second applet running platform integrated by the second host application.
  • the authorization status includes user authorized and user unauthorized. Then, if it is determined that the authorization status of the applet is that the user is authorized, in response to the applet on the first applet running platform receiving an authorized operation instruction corresponding to the user's authorization, the authorized operation instruction is executed.
  • the user starts a certain small program in a host application, and if the user has authorized the small program in other host applications of the terminal device, there is no need to prompt the user for authorization.
  • each host application installed on the terminal device can share the authorization status of the applet. In this way, after the user is authorized, it is possible to avoid repeatedly prompting the user for authorization, and to speed up the startup efficiency of the applet.
  • Figure 1 is an exemplary system architecture diagram to which this application can be applied;
  • Fig. 2 is a flowchart of an embodiment of the information acquisition method according to the present application.
  • Fig. 3 is a schematic diagram of an application scenario of the information acquisition method according to the present application.
  • Fig. 4 is a flowchart of another embodiment of the information acquisition method according to the present application.
  • Fig. 5 is a schematic structural diagram of an embodiment of an information acquisition device according to the present application.
  • Fig. 6 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • FIG. 1 shows an exemplary system architecture 100 that can host an embodiment of the information acquisition method or information acquisition apparatus of the present application.
  • the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
  • the user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and so on.
  • Various communication client host applications may be installed on the terminal devices 101, 102, 103, such as video host applications, live broadcast host applications, instant messaging tools, email clients, social platform software, and so on.
  • the terminal devices 101, 102, and 103 may be hardware or software.
  • the terminal devices 101, 102, and 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, laptop computers, desktop computers, and so on.
  • the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules used to provide distributed services), or as a single software or software module. There is no specific limitation here.
  • the server 105 may be a server that provides various services, for example, a background server that provides support for the terminal devices 101, 102, and 103.
  • the background server can analyze and process the received authorization status query request and other data, and feed back the processing result (for example, authorization status) to the terminal device.
  • the information acquisition method provided in the embodiments of the present application is generally executed by the terminal equipment 101, 102, 103, and accordingly, the information acquisition apparatus may be provided in the terminal equipment 101, 102, 103.
  • terminal devices, networks, and servers in FIG. 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks and servers.
  • the information acquisition method includes the following steps:
  • Step 201 In response to detecting the start operation of the applet on the first applet running platform integrated with the first host application, determine the authorization status of the applet, wherein at least one second host application installed on the terminal device is integrated with the second host application.
  • the applet running platform, the authorization status of the applet is determined according to the authorization status of the applet on the second applet running platform integrated by the second host application, and the authorization status includes user authorized and user unauthorized.
  • the execution subject of the information acquisition method may be installed with at least one host application.
  • the aforementioned at least one host application may include a first host application and at least one second host application.
  • the execution subject may determine the authorization status of the applet in response to detecting the start operation of the applet on the first applet running platform integrated with the first host application.
  • the first applet running platform and the second applet running platform may be the same applet running platform, that is, the identifiers of the applet running platform are the same, and in addition, they may also be different applet running platforms.
  • the start operation is the user's operation and is used to start the aforementioned small program.
  • the above applet can run on the first applet running platform and the second applet running platform, and the authorization status of the applet here can refer to the first applet running platform and the first applet running platform integrated with any host application installed on the terminal device. 2.
  • the authorization status shared by the aforementioned applets on the applet running platform.
  • the first host application may be any host application installed on the terminal device and integrated with the foregoing first applet running platform.
  • the second host application may be any host application installed on the terminal device and integrated with the foregoing second applet running platform.
  • the applet running platform is used to provide an operating environment for the applet in the host application, which is a necessary condition for the applet to be able to start and run in the host application.
  • the applet running platform can provide the applet with templates of the interface to be displayed, browsers, and personalized services for different host applications or different operating systems.
  • Any host application installed on the terminal device can integrate multiple different applet running platforms.
  • a host application refers to an application integrated with a small program running platform. It should be noted that "first" and "second" here do not indicate order.
  • One or more host applications installed on the aforementioned terminal device can all integrate the aforementioned first applet running platform.
  • the authorization status indicates whether the user has authorized the execution of certain operation instructions for the above-mentioned applet of the applet running platform, so that the execution subject can perform the operation corresponding to the above-mentioned operation instruction in the above-mentioned applet.
  • the authorization status of the applet on the second applet running platform may be determined by the execution subject and stored in the execution subject. In addition, it may also be determined by other electronic devices such as a server, and stored in other electronic devices such as a server, and the execution subject may be obtained from other electronic devices such as a server.
  • the above-mentioned execution subject can directly determine the authorization status of the applet on the second applet running platform as the authorized status of the applet, or modify the authorization status of the applet on the second applet running platform.
  • the modification can be the opposite.
  • Status user authorized and user not authorized are opposite to each other
  • use the modified result as the authorized status of the applet.
  • Step 202 If it is determined that the authorization status of the applet is that the user is authorized, in response to the applet on the first applet running platform receiving an authorized operation instruction corresponding to the user's authorization, the authorized operation instruction is executed.
  • the execution subject in response to determining that the authorization status of the applet is that the user is authorized, may not prompt the user to authorize the applet. If an authorized operation instruction is received, the execution subject may directly run the applet on the applet running platform of the first host application to execute the authorized operation instruction.
  • the authorized operation instruction is an operation instruction authorized by the above-mentioned user, that is, corresponds to the above-mentioned user authorized.
  • the authorized operation instruction indicates the operation instruction authorized by the user.
  • the above-mentioned small program is authorized, the above-mentioned execution subject can execute the authorized operation instruction in the above-mentioned small program.
  • the authorized operation instruction may be various operations performed by the terminal device in the aforementioned mini program. For example, the terminal device obtains the user's historical web browsing records in the aforementioned mini program and uploads the record to the server corresponding to the aforementioned mini program.
  • the authorized operation instruction indicates at least one of the following to be performed in the applet: obtaining user personal information, obtaining location information of the terminal device, and invoking a camera.
  • the user's personal information may be the user's attribute information, such as gender and age. In addition, it can also be the user's historical data, such as historical web browsing records, user operation historical records, and so on.
  • the location information of the terminal device can include latitude and longitude coordinates, and can also include the name of a geographic area, such as A road.
  • the location information of the terminal device may be the current location information of the terminal device, or it may be the location information or a collection of location information of the terminal device within a historical preset time period, for example, the location information collection of the terminal device in the past month.
  • the first applet running platform and the second applet running platform are the same applet running platform; or the first applet running platform and the second applet running platform are of the same type Mini program running platforms, similar Mini Program running platforms adopt the same Mini Program platform framework and/or Mini Program platform coding specifications.
  • the first applet running platform and the second applet running platform may be the same applet running platform with the same identifier, or similar applet running platforms with different identifiers. If at least two applet running platforms are the same or similar applet running platforms, then multiple applets can run on these two applet running platforms. For example, in this embodiment, multiple applets may run on the aforementioned first applet running platform or the aforementioned second applet running platform.
  • the same applet can often be installed, while on different or different types of applet running platforms, the installed applets are often very different.
  • These implementations can prevent the same applet from repeatedly requesting authorization on the applet operating platform integrated by each host application when the applet running platform on which the applet runs is the same or is a similar applet running platform.
  • the method further includes:
  • the applet on the first applet running platform displays an authorization request; in response to detecting the user's authorized operation, the first applet running platform and the first applet running platform The authorization status of the applet on the running platform of the similar applet is modified to the user authorized.
  • the execution subject may respond to determining that the authorization status of the applet is that the user is not authorized, and display an authorization request to prompt the user for authorization. If a user authorized operation is detected, the above-mentioned execution subject can modify the authorization status on the first applet running platform and similar applet running platforms to be authorized by the user.
  • the above-mentioned execution subject may execute the authorized operation instruction in response to the above-mentioned small program receiving the authorized operation instruction corresponding to the user's authorization.
  • the small program here may be the first small program running platform integrated with any host application installed on the above-mentioned terminal device Or the same kind of small program on the first small program running platform.
  • the authorization request is the information displayed to the user by the above-mentioned execution subject, and is used to request the user to authorize.
  • User authorization operations are user operations and are used to indicate that the user is authorized.
  • determining the authorization status of the applet in step 201 includes: determining the first applet running platform and/or the applet on the similar applet running platform of the first applet running platform The authorization status of the program.
  • the execution subject can determine the running status of the applet on the first applet running platform, and , Can also determine the running status of the applet on the first applet running platform and its similar applet running platforms.
  • the above-mentioned execution entity can determine the similar applet running platform of the first applet running platform The authorization status of the upper applet.
  • FIG. 3 is a schematic diagram of an application scenario of the information acquisition method according to this embodiment.
  • Zhang San performs an operation 302 to start a game applet of the instant messaging host application W on the mobile phone 301.
  • the game applet generates an instruction that instructs to obtain the location information of the aforementioned mobile phone 301.
  • the aforementioned mobile phone 301 may determine the authorization status 303 of the game applet based on the authorization status of the game applet of another host application H on the mobile phone. If the determined authorization status 303 is that the user has authorized 304, the mobile phone 301 can obtain and use the location information of the mobile phone 301 in the game applet of the instant messaging host application W, that is, execute the authorized operation instruction 305.
  • the user starts a certain applet in a host application, and if the user has authorized the applet in other host applications of the terminal device, there is no need to prompt the user for authorization. Further, in the case where the applet exists in two or more host applications of the terminal device, each host application installed on the terminal device can share the authorization status of the applet. In this way, after the user is authorized, it is possible to avoid repeatedly prompting the user for authorization, and to speed up the startup efficiency of the applet.
  • FIG. 4 shows a process 400 of another embodiment of an information acquisition method.
  • the process 400 of the information acquisition method includes the following steps:
  • Step 401 In response to detecting the start operation of the applet on the first applet running platform integrated with the first host application, send an authorization status query request to the server, where the authorization status query request includes an identifier of the applet.
  • the execution subject (such as the terminal device shown in FIG. 1) on which the information acquisition method runs can send an authorization status query request to the server to obtain the authorization status returned by the server.
  • the server may provide authorization-related services and store the authorization status of the applet.
  • the authorization status query request is to request the server to return the authorization status information.
  • the execution subject may carry the identification of the applet when sending the authorization status query request, so that the server can find the authorization status of the applet corresponding to the identification, and then return it to the execution subject.
  • Step 402 Receive authorization information including the authorization status of the aforementioned applet returned by the server.
  • the execution subject may receive the returned authorization information including the authorization status after the server returns the authorization status of the applet.
  • authorization information may refer to information related to authorization.
  • Step 403 If it is determined that the authorization status of the applet is that the user is authorized, in response to the applet on the first applet running platform receiving an authorized operation instruction corresponding to the user's authorization, the authorized operation instruction is executed.
  • the execution subject in response to determining that the authorization status of the applet is that the user is authorized, may not prompt the user to authorize the applet. If an authorized operation instruction is received, the execution subject may directly run the applet on the applet running platform of the first host application to execute the authorized operation instruction.
  • the above method further includes: in response to detecting a user modification operation indicating to modify the authorization status of the above applet, re-determining the authorization status of the above applet based on the user modification operation; The re-determined authorization status is synchronized to the server.
  • the above-mentioned execution subject may modify the authorization state of the applet to the authorization state indicated by the above-mentioned user modification operation in response to detecting the user modification operation.
  • the authorization status can be generated by the user's selection of "authorized” and "unauthorized” displayed on the interface.
  • the above-mentioned execution subject may upload the re-determined authorization status to the server to achieve synchronization.
  • the user can freely modify the authorization status to ensure the user's flexible control over the authorization status. To a certain extent, it can prevent the applet from using user information on the terminal device against the will of the user, or enabling some functions of the terminal device without the user's knowledge.
  • the foregoing synchronization of the re-determined authorization status to the server includes: synchronizing the re-determined authorization status to the server in response to determining that the authorization status of the applet changes.
  • the above-mentioned execution subject may determine whether the authorization status has changed based on the authorization status determined last time and the authorization status determined again.
  • the above-mentioned execution subject may synchronize the authorization status with the server when it is determined that the authorization status has changed.
  • the authorization status can be synchronized with the server to avoid invalid synchronization.
  • the above method further includes: in response to the second host application detecting a user authorization operation for the applet on the second applet running platform, providing the user with The authorized authorization status and the host application identifier of the second host application are correspondingly synchronized to the server.
  • the above-mentioned execution subject may use the authorization status and the host application identifier of the second host application as corresponding information, and synchronize these information to the server.
  • the host application identifier of the second host application here is synchronized to the server as the host application identifier of the host application on which the aforementioned applet running platform is located.
  • the above-mentioned execution subject may also synchronize the identification of the above-mentioned terminal device to the server. A list of authorized permissions can also be stored on the server.
  • the authorization status query request further includes the identification of the terminal device; and the authorization information returned by the receiving server, including the authorization status of the applet, includes:
  • the authorization information of the applet returned by the receiving server for the terminal device wherein the authorization status between different terminal devices is independent of each other.
  • the authorization status in the authorization information of the applet returned by the server may be specific to the terminal device. There is no influence on the authorization status of the applet corresponding to different terminal devices, so the authorization status is for the above-mentioned terminal device and has nothing to do with other terminal devices.
  • the server can be used to store and query the authorization status.
  • the server is a long-term storage medium with a large storage space, which can avoid the loss of authorization status data and is more conducive to the storage of authorization status.
  • this application provides an embodiment of an information acquisition device.
  • the device embodiment corresponds to the method embodiment shown in Figure 2.
  • the device specifically can Used in various electronic devices.
  • the information acquisition device 500 of this embodiment includes: a determining unit 501 and an executing unit 502.
  • the determining unit 501 is configured to determine the authorization status of the applet in response to detecting the startup operation of the applet on the first applet running platform integrated with the first host application, wherein at least one second applet installed on the terminal device
  • the host application is integrated with a second applet running platform, and the authorization status of the applet is determined according to the authorization status of the applet on the second applet running platform integrated by the second host application.
  • the authorization status includes user authorized and user unauthorized;
  • the execution unit 502 is configured to, if it is determined that the authorization status of the applet is that the user is authorized, in response to the applet on the first applet running platform receiving an authorized operation instruction corresponding to the user's authorization, execute the authorized operation instruction .
  • the determining unit 501 of the information acquiring apparatus 500 may be installed with at least one host application.
  • the aforementioned at least one host application may include a first host application and at least one second host application.
  • the execution subject may determine the authorization status of the applet in response to detecting the start operation of the applet on the first applet running platform integrated with the first host application.
  • the first applet running platform and the second applet running platform may be the same applet running platform, that is, the identifiers of the applet running platform are the same, and in addition, they may also be different applet running platforms.
  • the start operation is the user's operation and is used to start the aforementioned small program.
  • the execution unit 502 may respond to determining that the authorization status of the applet is that the user is authorized, and the execution subject may not prompt the user to authorize the applet. If an authorized operation instruction is received, the execution subject may directly run the applet on the applet running platform of the first host application to execute the authorized operation instruction.
  • the first applet running platform and the second applet running platform are the same applet running platform; or the first applet running platform and the second applet running platform are of the same type Mini program running platforms, similar Mini Program running platforms adopt the same Mini Program platform framework and/or Mini Program platform coding specifications.
  • the device after determining the authorization status of the applet, the device further includes: a display unit configured to run in the first applet if it is determined that the authorization status of the applet is that the user is not authorized The applet on the platform displays the authorization request; the detection unit is configured to modify the authorization status of the applet on the first applet running platform and the similar applet running platform of the first applet running platform in response to detecting the user authorized operation The user is authorized.
  • the determining unit includes: a determining module configured to determine the first applet running platform and/or the similar applet running platform of the first applet running platform. Authorization status.
  • the determining unit includes: a sending module configured to send an authorization status query request to the server, where the authorization status query request includes an identifier of the applet; and the receiving module is configured to The authorization information including the authorization status of the applet returned by the server is received.
  • the method further includes: a re-determination unit configured to, in response to detecting a user modification operation indicating to modify the authorization status of the applet, re-determine the applet’s status based on the user modification operation Authorization status; the first synchronization unit is configured to synchronize the newly determined authorization status to the server.
  • the synchronization unit is further configured to: in response to determining that the authorization status of the applet changes, synchronize the re-determined authorization status to the server.
  • the apparatus before determining the authorization status of the applet in response to detecting the startup operation of the applet on the first applet running platform integrated with the first host application, the apparatus further includes: The second synchronization unit is configured to respond to the second host application detecting the user authorization operation for the applet on the second applet running platform, and correspond the authorization status of the user to the host application identifier of the second host application Synchronize to the server.
  • the authorization status query request further includes the identification of the terminal device; and the receiving module is further configured to: receive the authorization information of the aforementioned applet returned by the server for the identification of the terminal device, wherein: The authorization status between different terminal devices is independent of each other.
  • the authorized operation instruction indicates at least one of the following to be performed in the applet: obtaining user personal information, obtaining location information of the terminal device, and invoking a camera.
  • the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which can be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 executes various appropriate actions and processing.
  • the RAM 603 also stores various programs and data required for the operation of the electronic device 600.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following devices can be connected to the I/O interface 605: including input devices 606 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration Storage device 608; and communication device 609.
  • the communication device 609 may allow the electronic device 600 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 6 shows an electronic device 600 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices. Each block shown in FIG. 6 can represent one device, or can represent multiple devices as needed.
  • the process described above with reference to the flowchart can be implemented as a computer software program.
  • the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium of the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • 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. More specific examples of computer-readable storage media may include, but are not limited to: 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.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a 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 signal 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: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present application can be implemented in software or hardware.
  • the described unit may also be provided in the processor, for example, it may be described as: a processor includes a determining unit and an executing unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the execution unit can also be described as "in response to detecting that the first small program integrated with the first host application runs on the platform. The startup operation of the program, the unit that determines the authorization status of the applet".
  • the present application also provides a computer-readable medium, which may be included in the device described in the above-mentioned embodiments; or it may exist alone without being assembled into the device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the apparatus, the apparatus is caused to run the applet on the platform in response to detecting that the first applet integrated with the first host application
  • the authorization status of the applet at least one second host application installed on the terminal device is integrated with the second applet running platform, and the authorization status of the applet is based on the second applet integrated by the second host application.
  • the authorization status of the applet on the platform includes the user authorized and the user not authorized; if the authorization status of the applet is determined to be the user authorized, it responds to the receipt of the user
  • the authorized operation instruction corresponding to the authorization executes the authorized operation instruction.

Abstract

一种信息获取方法和装置。该方法包括:响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态(201);若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令(202)。在终端设备的两个以上的宿主应用都存在该小程序的情况下,终端设备安装的各个宿主应用可以共享该小程序的授权状态。这样,可以在用户授权之后,避免重复提示用户进行授权,并可以加快小程序的启动效率。

Description

信息获取方法和装置 技术领域
本申请实施例涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及信息获取方法和装置。
背景技术
用户在使用终端设备的小程序时,对于不同宿主应用中的小程序运行平台,总是需要用户进行授权以获取用户信息或者授权其他内容。这里的小程序例如可以是采用Java开发的小程序Applet。
这样,即使用户所使用的是同一个小程序运行平台,也因为宿主应用的不同而需要用户屡次的授权操作。
发明内容
本申请实施例提出了信息获取方法和装置。
第一方面,本申请实施例提供了一种信息获取方法,应用于终端设备,该方法包括:响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权;若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
第二方面,本申请实施例提供了一种信息获取装置,应用于终端设备,该装置包括:确定单元,被配置成响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是 根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权;执行单元,被配置成若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如信息获取方法中任一实施例的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如信息获取方法中任一实施例的方法。
本申请实施例提供的信息获取方案,首先,响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权。然后,若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。在本申请实施例提供的方案中,用户启动一个宿主应用中的某个小程序,如果用户已经对终端设备的其他宿主应用中的该小程序授权,则无需提示用户授权。进一步地,在终端设备的两个以上的宿主应用都存在该小程序的情况下,终端设备安装的各个宿主应用可以共享该小程序的授权状态。这样,可以在用户授权之后,避免重复提示用户进行授权,并可以加快小程序的启动效率。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请可以应用于其中的示例性系统架构图;
图2是根据本申请的信息获取方法的一个实施例的流程图;
图3是根据本申请的信息获取方法的一个应用场景的示意图;
图4是根据本申请的信息获取方法的又一个实施例的流程图;
图5是根据本申请的信息获取装置的一个实施例的结构示意图;
图6是适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以宿主应用本申请的信息获取方法或信息获取装置的实施例的示例性系统架构100。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端宿主应用,例如视频类宿主应用、直播宿主应用、即时通信工具、邮箱客户端、社交平台软件等。
这里的终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103提供支持的后台服务器。后台服务器可以对接收到的授权状态查询请求等数据进行分析等处理,并将处理结果(例如授权状态)反馈给终端设备。
需要说明的是,本申请实施例所提供的信息获取方法一般由终端设备101、 102、103执行,相应地,信息获取装置可以设置于终端设备101、102、103中。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
继续参考图2,示出了根据本申请的信息获取方法的一个实施例的流程200。该信息获取方法,包括以下步骤:
步骤201,响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权。
在本实施例中,信息获取方法的执行主体(例如图1所示的终端设备)可以安装有至少一个宿主应用。比如,上述至少一个宿主应用可以包括第一宿主应用和至少一个第二宿主应用。上述执行主体可以响应于检测到对上述第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定上述小程序的授权状态。这里的第一小程序运行平台和第二小程序运行平台可以是相同的小程序运行平台,即小程序运行平台的标识相同,此外,也可以是不同的小程序运行平台。启动操作是用户的操作,用于启动上述小程序。上述小程序可以运行于上述第一小程序运行平台和第二小程序运行平台,并且,这里的小程序的授权状态可以指上述终端设备安装的任意宿主应用集成的第一小程序运行平台以及第二小程序运行平台上的上述小程序共有的授权状态。
第一宿主应用可以是终端设备安装的任意一个集成有上述第一小程序运行平台的宿主应用。第二宿主应用可以是终端设备安装的任意一个集成有上述第二小程序运行平台的宿主应用。具体地,小程序运行平台用于在宿主应用中为小程序提供运行环境,是小程序能够在宿主应用中启动和运行的必要条件。小程序运行平台可以向小程序提供待显示的界面的模板、浏览器以及针对不同宿主应用或者不同操作系统的个性化服务。终端设备所安装的任意一个宿主应用可以集成多个不同的小程序运行平台。宿主应用指集成有小程序运行平台的应用。需要说明的是,这里的“第一”、“第二”并不表示顺序。
上述终端设备安装的一个或多个宿主应用中都可以集成上述第一小程序 运行平台。授权状态指示了用户是否已经对小程序运行平台的上述小程序授权执行某些操作指令,以使上述执行主体可以在上述小程序进行上述操作指令对应的操作。
在实践中,上述第二小程序运行平台上小程序的授权状态可以是上述执行主体确定的,并存储于上述执行主体。此外,也可以是服务器等其他电子设备确定的,存储于服务器等其他电子设备,上述执行主体可以从服务器等其他电子设备获取。
上述执行主体可以直接将第二小程序运行平台上小程序的授权状态确定为小程序的授权状态,也可以对第二小程序运行平台上小程序的授权状态进行修改,比如修改可以是确定相反状态(用户已授权和用户未授权互为相反状态),并将修改结果作为小程序的授权状态。
步骤202,若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
在本实施例中,响应于确定小程序的授权状态为用户已授权,上述执行主体可以无需提示用户对该小程序进行授权。如果接收到已授权操作指令,上述执行主体可以直接在第一宿主应用的上述小程序运行平台运行上述小程序执行该已授权操作指令。
具体地,已授权操作指令是上述用户已授权所授权的操作指令,也即与上述用户已授权相对应。已授权操作指令指示了用户已授权的操作指令,在对上述小程序授权后,上述执行主体可以在上述小程序执行已授权操作指令。已授权操作指令可以是终端设备在上述小程序进行的各种操作,比如,终端设备在上述小程序获取用户的历史网页浏览记录,并将该记录上传上述小程序对应的服务器。
在本实施例的一些可选的实现方式中,已授权操作指令指示在小程序进行的以下至少一项:获取用户个人信息、获取终端设备的位置信息和调用摄像头。
在这些实现方式中,用户个人信息可以是用户的属性信息,比如性别、年龄等。此外,也可以是用户的历史数据,比如历史网页浏览记录,用户操作历史记录等等。终端设备的位置信息可以包括经纬度坐标,也可以包括地理区域 名称,比如A道路。终端设备的位置信息可以是终端设备当前的位置信息,也可以是终端设备在历史预设时间段内的位置信息或位置信息集合,比如,过去一个月内终端设备的位置信息集合。
在本实施例的一些可选的实现方式中,第一小程序运行平台与第二小程序运行平台为相同的小程序运行平台;或第一小程序运行平台与第二小程序运行平台为同类小程序运行平台,同类小程序运行平台采用相同的小程序平台框架和/或小程序平台编码规范。
在这些实现方式中,上述第一小程序运行平台和上述第二小程序运行平台,既可以是具有相同标识的相同小程序运行平台,也可以具有不同标识的同类小程序运行平台。如果至少两个小程序运行平台是相同的,或者是同类小程序运行平台,那么多个小程序可以运行于这两个小程序运行平台。比如,在本实施例中,多个小程序既可以运行于上述第一小程序运行平台,也可以运行于上述第二小程序运行平台。
相同或同类的小程序运行平台上,往往可以安装相同的小程序,而不同或不同类的小程序运行平台上,安装的小程序往往有很大差别。这些实现方式可以在小程序运行的小程序运行平台相同或为同类小程序运行平台的情况下,有针对性地避免相同小程序在各个宿主应用集成的小程序运行平台上重复要求授权。
在这些实现方式的一些可选的应用场景中,在上述步骤201之后,方法还包括:
若确定小程序的授权状态为用户未授权,在第一小程序运行平台上的小程序显示授权请求;响应于检测到用户授权操作,将第一小程序运行平台和第一小程序运行平台的同类小程序运行平台上小程序的授权状态修改为用户已授权。
在这些可选的应用场景中,上述执行主体可以响应于确定上述小程序的授权状态为用户未授权,显示授权请求,以提示用户授权。若检测到用户授权操作,上述执行主体则可以修改第一小程序运行平台及其同类小程序运行平台上的授权状态为用户已授权。上述执行主体可以响应于上述小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令,这里的小程序可以为上 述终端设备安装的任意宿主应用集成的第一小程序运行平台或第一小程序运行平台的同类小程序运行平台上的小程序。
授权请求为上述执行主体向用户显示的信息,用于请求用户进行授权。用户授权操作为用户的操作,用于指示用户已授权。
这些应用场景可以在用户未授权的情况下,自动提示用户进行授权,在确认用户授权后上述执行主体便可以在上述小程序执行已授权操作指令。
在这些实现方式的一些可选的应用场景中,步骤201中的确定小程序的授权状态,包括:确定第一小程序运行平台和/或第一小程序运行平台的同类小程序运行平台上小程序的授权状态。
在这些应用场景中,在第一小程序运行平台和第二小程序运行平台是相同小程序运行平台的情况下,上述执行主体可以确定第一小程序运行平台上该小程序的运行状态,并且,还可以确定第一小程序运行平台以及其同类小程序运行平台上该小程序的运行状态。而在第一小程序运行平台和第二小程序运行平台是不同小程序运行平台,且为同类小程序运行平台的情况下,上述执行主体可以确定第一小程序运行平台的同类小程序运行平台上小程序的授权状态。
继续参见图3,图3是根据本实施例的信息获取方法的应用场景的一个示意图。在图3的应用场景中,张三对手机301上即时通信宿主应用W的某个游戏小程序进行了启动操作302。该游戏小程序生成指令,该指令指示获取上述手机301的位置信息。上述手机301可以基于手机上另一个宿主应用H的该游戏小程序的授权状态,确定该游戏小程序的授权状态303。如果所确定的授权状态303为用户已授权304,则上述手机301可以在即时通信宿主应用W的该游戏小程序获取并使用上述手机301的位置信息,也即执行已授权操作指令305。
本申请的上述实施例提供的方法中,用户启动一个宿主应用中的某个小程序,如果用户已经对终端设备的其他宿主应用中的该小程序授权,则无需提示用户授权。进一步地,在终端设备的两个以上的宿主应用都存在该小程序的情况下,终端设备安装的各个宿主应用可以共享该小程序的授权状态。这样,可以在用户授权之后,避免重复提示用户进行授权,并可以加快小程序的启动效率。
进一步参考图4,其示出了信息获取方法的又一个实施例的流程400。该信息获取方法的流程400,包括以下步骤:
步骤401,响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,向服务器发送授权状态查询请求,其中,授权状态查询请求包括小程序的标识。
在本实施例中,信息获取方法运行于其上的执行主体(例如图1所示的终端设备)可以向服务器发送授权状态查询请求,以获取服务器返回的授权状态。具体地,服务器可以提供与授权相关的服务,存储有小程序的授权状态。授权状态查询请求为请求服务器返回授权状态的信息。上述执行主体可以在发送授权状态查询请求时携带上述小程序的标识,这样,服务器可以查找到与该标识对应的小程序的授权状态,进而返回给上述执行主体。
步骤402,接收服务器返回的包括上述小程序的授权状态的授权信息。
在本实施例中,上述执行主体可以在服务器返回上述小程序的授权状态之后,接收所返回的包括该授权状态的授权信息。具体地,授权信息可以指与授权相关的信息。
步骤403,若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
在本实施例中,响应于确定小程序的授权状态为用户已授权,上述执行主体可以无需提示用户对该小程序进行授权,。如果接收到已授权操作指令,上述执行主体可以直接在第一宿主应用的上述小程序运行平台运行上述小程序执行该已授权操作指令。
在这些实现方式的一些可选的应用场景中,上述方法还包括:响应于检测到指示修改上述小程序的授权状态的用户修改操作,基于用户修改操作,重新确定上述小程序的授权状态;将重新确定的授权状态同步到服务器。
在这些可选的应用场景中,上述执行主体可以响应于检测到用户修改操作,将小程序的授权状态修改为上述用户修改操作所指示的授权状态。比如授权状态可以是用户对界面显示的“授权”和“不授权”进行选择产生的。之后,上述执行主体可以将重新确定的授权状态上传到服务器,以实现同步。
这些实现方式可以由用户自由地修改授权状态,以确保用户对授权状态的灵活控制。可以在一定程度上避免小程序违背用户意愿地利用终端设备上的用户信息,或者在用户不知情的情况下,启用终端设备的一些功能。
在这些应用场景的一些可选的情况下,上述将重新确定的授权状态同步到服务器,包括:响应于确定小程序的授权状态改变,将重新确定的授权状态同步到服务器。
在这些可选的情况中,上述执行主体可以基于在先的最后一次确定的授权状态,以及重新确定的授权状态,确定授权状态是否发生改变。上述执行主体可以在确定授权状态改变的情况下,向服务器进行授权状态的同步。
这些情况可以先确定授权状态是否改变,若确定改变,再与服务器进行授权状态的同步,进而避免进行无效同步的情况发生。
在这些实现方式的一些可选的应用场景中,在步骤401之前,上述方法还包括:响应于在第二宿主应用检测到对第二小程序运行平台上小程序的用户授权操作,将为用户已授权的授权状态和第二宿主应用的宿主应用标识对应同步到服务器。
在这些可选的应用场景中,上述执行主体可以将授权状态、和第二宿主应用的宿主应用标识作为相对应的信息,并将这些信息同步到服务器。这样,在服务器上可以存储对上述小程序运行平台授权的多种相关信息。这里的第二宿主应用的宿主应用标识是作为上述小程序运行平台所在的宿主应用的宿主应用标识同步到服务器的。此外,上述执行主体还可以将上述终端设备的标识同步到服务器。在该服务器上还可以存储有授权权限列表。
在本申请的一些可选的实现方式中,授权状态查询请求还包括终端设备的标识;以及上述接收服务器返回的包括小程序的授权状态的授权信息,包括:
接收服务器针对终端设备返回的小程序的授权信息,其中,不同终端设备之间的授权状态相互独立。
在这些可选的实现方式中,上述服务器返回的上述小程序的授权信息中的授权状态可以是针对上述终端设备的。不同终端设备对应的小程序的授权状态之间没有任何影响,所以授权状态是针对上述终端设备而言的,与其他终端设备无关。
本实施例可以利用服务器存储并查询授权状态。服务器是一个长期的、存储空间较大的存储介质,可以避免授权状态数据的丢失,更有利于授权状态的存储。
进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种信息获取装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,本实施例的信息获取装置500包括:确定单元501和执行单元502。其中,确定单元501,被配置成响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权;执行单元502,被配置成若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
在一些实施例中,信息获取装置500的确定单元501可以可以安装有至少一个宿主应用。比如,上述至少一个宿主应用可以包括第一宿主应用和至少一个第二宿主应用。上述执行主体可以响应于检测到对上述第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定上述小程序的授权状态。这里的第一小程序运行平台和第二小程序运行平台可以是相同的小程序运行平台,即小程序运行平台的标识相同,此外,也可以是不同的小程序运行平台。启动操作是用户的操作,用于启动上述小程序。
在一些实施例中,执行单元502可以响应于确定小程序的授权状态为用户已授权,上述执行主体可以无需提示用户对该小程序进行授权,。如果接收到已授权操作指令,上述执行主体可以直接在第一宿主应用的上述小程序运行平台运行上述小程序执行该已授权操作指令。
在本实施例的一些可选的实现方式中,第一小程序运行平台与第二小程序运行平台为相同的小程序运行平台;或第一小程序运行平台与第二小程序运行平台为同类小程序运行平台,同类小程序运行平台采用相同的小程序平台框架 和/或小程序平台编码规范。
在本实施例的一些可选的实现方式中,在确定小程序的授权状态之后,装置还包括:显示单元,被配置成若确定小程序的授权状态为用户未授权,在第一小程序运行平台上的小程序显示授权请求;检测单元,被配置成响应于检测到用户授权操作,将第一小程序运行平台和第一小程序运行平台的同类小程序运行平台上小程序的授权状态修改为用户已授权。
在本实施例的一些可选的实现方式中,确定单元,包括:确定模块,被配置成确定第一小程序运行平台和/或第一小程序运行平台的同类小程序运行平台上小程序的授权状态。
在本实施例的一些可选的实现方式中,确定单元,包括:发送模块,被配置成向服务器发送授权状态查询请求,其中,授权状态查询请求包括小程序的标识;接收模块,被配置成接收服务器返回的包括小程序的授权状态的授权信息。
在本实施例的一些可选的实现方式中,方法还包括:重新确定单元,被配置成响应于检测到指示修改小程序的授权状态的用户修改操作,基于用户修改操作,重新确定小程序的授权状态;第一同步单元,被配置成将重新确定的授权状态同步到服务器。
在本实施例的一些可选的实现方式中,同步单元,进一步被配置成:响应于确定小程序的授权状态改变,将重新确定的授权状态同步到服务器。
在本实施例的一些可选的实现方式中,在响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态之前,装置还包括:第二同步单元,被配置成响应于在第二宿主应用检测到对第二小程序运行平台上小程序的用户授权操作,将为用户已授权的授权状态和第二宿主应用的宿主应用标识对应同步到服务器。
在本实施例的一些可选的实现方式中,授权状态查询请求还包括终端设备的标识;以及接收模块进一步被配置成:接收服务器针对终端设备的标识返回的上述小程序的授权信息,其中,不同终端设备之间的授权状态相互独立。
在本实施例的一些可选的实现方式中,已授权操作指令指示在小程序进行的以下至少一项:获取用户个人信息、获取终端设备的位置信息和调用摄像头。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的实施例的方法中限定的上述功能。需要说明的是,本公开的实施例的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中, 计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括确定单元和执行单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,执行单元还可以被描述为“响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多 个程序被该装置执行时,使得该装置:响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定小程序的授权状态,其中,终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,小程序的授权状态是根据第二宿主应用集成的第二小程序运行平台上小程序的授权状态确定的,授权状态包括用户已授权和用户未授权;若确定小程序的授权状态为用户已授权,响应于在第一小程序运行平台上的小程序接收到用户已授权所对应的已授权操作指令,执行已授权操作指令。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (11)

  1. 一种信息获取方法,应用于终端设备,所述方法包括:
    响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定所述小程序的授权状态,其中,所述终端设备安装的至少一个第二宿主应用集成有第二小程序运行平台,所述小程序的授权状态是根据所述第二宿主应用集成的所述第二小程序运行平台上所述小程序的授权状态确定的,所述授权状态包括用户已授权和用户未授权;
    若确定所述小程序的授权状态为用户已授权,响应于在所述第一小程序运行平台上的所述小程序接收到所述用户已授权所对应的已授权操作指令,执行所述已授权操作指令。
  2. 根据权利要求1所述的方法,其中,
    所述第一小程序运行平台与所述第二小程序运行平台为相同的小程序运行平台;或
    所述第一小程序运行平台与所述第二小程序运行平台为同类小程序运行平台,所述同类小程序运行平台采用相同的小程序平台框架和/或小程序平台编码规范。
  3. 根据权利要求2所述的方法,其中,在所述确定所述小程序的授权状态之后,所述方法还包括:
    若确定所述小程序的授权状态为用户未授权,在所述第一小程序运行平台上的所述小程序显示授权请求;
    响应于检测到用户授权操作,将所述第一小程序运行平台和所述第一小程序运行平台的同类小程序运行平台上所述小程序的授权状态修改为用户已授权。
  4. 根据权利要求2所述的方法,其中,所述确定所述小程序的授权状态,包括:
    确定所述第一小程序运行平台和/或所述第一小程序运行平台的同类小程序运行平台上所述小程序的授权状态。
  5. 根据权利要求1所述的方法,其中,所述确定所述小程序的授权状态,包括:
    向服务器发送授权状态查询请求,其中,所述授权状态查询请求包括所述小程序的标识;
    接收所述服务器返回的包括所述小程序的授权状态的授权信息。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    响应于检测到指示修改所述小程序的授权状态的用户修改操作,基于所述用户修改操作,重新确定所述小程序的授权状态;
    将重新确定的授权状态同步到服务器。
  7. 根据权利要求6所述的方法,其中,所述将重新确定的授权状态同步到服务器,包括:
    响应于确定所述小程序的授权状态改变,将重新确定的授权状态同步到服务器。
  8. 根据权利要求5所述的方法,其中,在响应于检测到对第一宿主应用集成的第一小程序运行平台上小程序的启动操作,确定所述小程序的授权状态之前,所述方法还包括:
    响应于在所述第二宿主应用检测到对所述第二小程序运行平台上所述小程序的用户授权操作,将为用户已授权的授权状态和所述第二宿主应用的宿主应用标识对应同步到所述服务器。
  9. 根据权利要求5-8之一所述的方法,其中,所述授权状态查询请求还包括所述终端设备的标识;以及
    所述接收所述服务器返回的包括所述小程序的授权状态的授权信息,包括:
    接收所述服务器针对所述终端设备的标识返回的所述小程序的授权信息,其中,不同终端设备之间的授权状态相互独立。
  10. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9中任一所述的方法。
  11. 一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-9中任一所述的方法。
PCT/CN2020/085801 2019-04-25 2020-04-21 信息获取方法和装置 WO2020216204A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/452,168 US20220043898A1 (en) 2019-04-25 2021-10-25 Methods and apparatuses for acquiring information

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910339044.X 2019-04-25
CN201910339044.XA CN110069919B (zh) 2019-04-25 2019-04-25 信息获取方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/452,168 Continuation US20220043898A1 (en) 2019-04-25 2021-10-25 Methods and apparatuses for acquiring information

Publications (1)

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

Family

ID=67368923

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/085801 WO2020216204A1 (zh) 2019-04-25 2020-04-21 信息获取方法和装置

Country Status (3)

Country Link
US (1) US20220043898A1 (zh)
CN (1) CN110069919B (zh)
WO (1) WO2020216204A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069919B (zh) * 2019-04-25 2021-08-24 上海连尚网络科技有限公司 信息获取方法和装置
CN112579048B (zh) * 2019-09-30 2023-09-08 腾讯科技(深圳)有限公司 小程序集成方法、装置、电子设备及存储介质
CN110865855B (zh) * 2019-11-18 2023-10-27 百度在线网络技术(北京)有限公司 小程序处理方法及相关设备
CN111259356B (zh) * 2020-02-17 2022-09-02 北京百度网讯科技有限公司 授权方法、辅助授权组件、管理服务器和计算机可读介质
CN112565466B (zh) * 2021-02-20 2021-04-27 支付宝(杭州)信息技术有限公司 跨应用关联用户的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150222690A1 (en) * 2012-10-18 2015-08-06 Tencent Technology (Shenzhen) Company Limited Method And Apparatus For Sharing Information
CN107679373A (zh) * 2017-10-09 2018-02-09 武汉斗鱼网络科技有限公司 授权信息获取方法、装置及电子设备
CN108595220A (zh) * 2018-04-25 2018-09-28 上海掌门科技有限公司 应用组件的处理方法、设备及计算机可读存储介质
CN109491721A (zh) * 2018-11-02 2019-03-19 百度在线网络技术(北京)有限公司 用于加载信息的方法和装置
CN110069919A (zh) * 2019-04-25 2019-07-30 上海连尚网络科技有限公司 信息获取方法和装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8265595B1 (en) * 2009-01-30 2012-09-11 Sprint Communications Company L.P. Managing application permissions on a mobile device
US20180032997A1 (en) * 2012-10-09 2018-02-01 George A. Gordon System, method, and computer program product for determining whether to prompt an action by a platform in connection with a mobile device
US9591443B2 (en) * 2015-06-01 2017-03-07 Apple Inc. Location service management
CN108259431A (zh) * 2016-12-29 2018-07-06 航天信息股份有限公司 多应用间共享账号信息的方法、装置及系统
CN107682330B (zh) * 2017-09-27 2020-10-23 广州市万表信息技术有限公司 统一认证方法和系统
CN108259458B (zh) * 2017-09-30 2021-12-28 中国平安人寿保险股份有限公司 应用软件账号关联方法、装置及存储介质
CN108667810A (zh) * 2018-04-18 2018-10-16 珠海横琴盛达兆业科技投资有限公司 一种基于小程序的安全登录验证方法
CN109768961A (zh) * 2018-12-12 2019-05-17 平安科技(深圳)有限公司 基于一账通的微信小程序登录方法、装置及存储介质
CN109995755B (zh) * 2019-02-20 2021-10-26 深圳点猫科技有限公司 一种基于小程序架构的登录状态的控制方法及装置
CN110417642A (zh) * 2019-07-25 2019-11-05 上海派拉软件技术有限公司 基于UnionID实现各类型微信应用的一体化认证方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150222690A1 (en) * 2012-10-18 2015-08-06 Tencent Technology (Shenzhen) Company Limited Method And Apparatus For Sharing Information
CN107679373A (zh) * 2017-10-09 2018-02-09 武汉斗鱼网络科技有限公司 授权信息获取方法、装置及电子设备
CN108595220A (zh) * 2018-04-25 2018-09-28 上海掌门科技有限公司 应用组件的处理方法、设备及计算机可读存储介质
CN109491721A (zh) * 2018-11-02 2019-03-19 百度在线网络技术(北京)有限公司 用于加载信息的方法和装置
CN110069919A (zh) * 2019-04-25 2019-07-30 上海连尚网络科技有限公司 信息获取方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Take is easy with Mobike: Log in simultaneously to Mobike App and WeChat mini-programs", BIKE SHARING, 15 May 2017 (2017-05-15) *

Also Published As

Publication number Publication date
CN110069919B (zh) 2021-08-24
US20220043898A1 (en) 2022-02-10
CN110069919A (zh) 2019-07-30

Similar Documents

Publication Publication Date Title
WO2020216204A1 (zh) 信息获取方法和装置
WO2020207454A1 (zh) 信息推送方法和装置
RU2689203C2 (ru) Гибкая схема для настройки языковой модели
WO2020151599A1 (zh) 视频同步发布方法、装置、电子设备及可读存储介质
WO2020143555A1 (zh) 用于展现信息的方法和装置
WO2020143557A1 (zh) 用于显示信息的方法和装置
CN110007936B (zh) 数据处理方法和装置
CN111459364B (zh) 图标更新方法、装置和电子设备
JP2022542258A (ja) スマートコントラクトを実行するための方法及び装置
CN110046000B (zh) 小程序运行方法和装置
US10033710B2 (en) Electronic device and method of transmitting and receiving information by electronic device
US20140041054A1 (en) Attestation of possession of media content items using fingerprints
US9781198B2 (en) Information processing method and electronic device
CN109660581B (zh) 物理机管理方法及装置、系统
US20230379279A1 (en) Interaction method and apparatus, and electronic device
CN110708238B (zh) 用于处理信息的方法和装置
CN110619101B (zh) 用于处理信息的方法和装置
CN112307393A (zh) 信息发布方法、装置和电子设备
CN111767550A (zh) 数据存储方法和装置
CN110619615A (zh) 用于处理图像方法和装置
CN106547485B (zh) 数据迁移方法及装置
WO2020143556A1 (zh) 用于展示页面的方法和装置
CN111367592B (zh) 信息处理方法和装置
CN111786936A (zh) 用于鉴权的方法和装置
CN113468487B (zh) 界面水印渲染方法、装置、电子设备和计算机可读介质

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: 20794504

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20794504

Country of ref document: EP

Kind code of ref document: A1

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 1205A DATED 16/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20794504

Country of ref document: EP

Kind code of ref document: A1