WO2022007638A1 - 一种数据处理方法、装置、设备及系统 - Google Patents

一种数据处理方法、装置、设备及系统 Download PDF

Info

Publication number
WO2022007638A1
WO2022007638A1 PCT/CN2021/102074 CN2021102074W WO2022007638A1 WO 2022007638 A1 WO2022007638 A1 WO 2022007638A1 CN 2021102074 W CN2021102074 W CN 2021102074W WO 2022007638 A1 WO2022007638 A1 WO 2022007638A1
Authority
WO
WIPO (PCT)
Prior art keywords
plug
applet
application
server
applet application
Prior art date
Application number
PCT/CN2021/102074
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 WO2022007638A1 publication Critical patent/WO2022007638A1/zh

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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
    • G06F21/54Monitoring 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 by adding security routines or objects to programs
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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

Definitions

  • the present specification belongs to the field of computer technology, and in particular, relates to a data processing method, apparatus, device and system.
  • Some open platforms can provide a variety of services. With the development of computer technology, different services can be provided through different small programs, such as: credit service, live broadcast service, life payment service, etc. These services generally need to call the data in the platform, but some data may be relatively private and are directly provided to the service, which reduces the security of user data.
  • the purpose of the embodiments of this specification is to provide a data processing method, apparatus, device and system, which realizes data isolation and ensures data security.
  • an embodiment of this specification provides a data processing method, which is applied in an applet application.
  • the method includes: sending a plug-in service request to a server, where the plug-in service request includes a plug-in identifier, so that the server will The plug-in corresponding to the plug-in identifier establishes a use association relationship with the applet application; wherein, the plug-in has an independent data server; receives the applet access request, and determines the applet access request and the service corresponding to the plug-in Whether the preset correspondence is satisfied, and if so, load the plug-in according to the usage association; send the applet access request to the plug-in, so that the plug-in completes the process by accessing the data server of the plug-in itself The applet accesses the task corresponding to the request.
  • this specification provides a data processing method, which is applied to a plug-in with an independent data server, the method includes: sending a request for publishing to the server; On-line information, the plug-in online information includes a plug-in identifier; receiving a loading request based on a use association relationship from an applet application, wherein the applet application is the one that the server establishes a use association relationship with the plug-in according to the plug-in identifier The applet application; receives the applet access request sent by the applet application after loading the plug-in, and completes the task corresponding to the applet access request by accessing the data server of the plug-in itself.
  • this specification provides a data processing device, applied in a small program application, comprising: a plug-in selection module, configured to send a plug-in service request to a server, where the plug-in service request includes a plug-in identifier, so that the server Establish a use association relationship between the plug-in corresponding to the plug-in identifier and the applet application, and the plug-in has an independent data server; the plug-in loading module is used to receive the access request of the applet, and determine whether the access request of the applet is related to the application of the applet.
  • the plug-in running module is used to send the applet access request to the plug-in, so that the plug-in can pass Access the data server of the plug-in itself to complete the task corresponding to the applet access request.
  • this specification provides a data processing device, which is applied to a plug-in with an independent data server, the device includes: a publishing and online module for sending a publishing and online request to the server; an identification receiving module for receiving The server is reviewing the plug-in online information that has passed the online plug-in, and the plug-in online information includes a plug-in identifier; a loading request receiving module is configured to receive a loading request of the applet application based on the use association relationship, wherein the applet
  • the application is a small program application that the server establishes a use association relationship with the plug-in according to the plug-in identifier; a running module is used to receive a small program access request sent by the small program application after loading the plug-in, and by accessing the plug-in
  • the data server of the plug-in itself completes the task corresponding to the access request of the applet.
  • the embodiments of this specification provide a data processing system, including: a platform server, multiple applet applications, and multiple plug-ins, wherein the plug-ins and the applet applications have independent data services respectively terminal;
  • the platform server is used to publish the plug-in online, receive the plug-in service request sent by the applet application, and establish a usage association between the applet application and the plug-in based on the plug-in service request;
  • the applet application runs When the applet application is used, the permission of the applet application is obtained by accessing the data server of the applet application itself; when the applet application is the service of the plug-in, the applet application loads the corresponding plug-in based on the usage association, and By accessing the data server of the loaded plug-in itself, the permissions of the plug-in or the data of the plug-in itself are accessed.
  • an embodiment of this specification provides a data processing device, including at least one processor and a memory for storing instructions executable by the processor, and the processor implements the first aspect or the second when executing the instructions The data processing method described in the method.
  • the data processing method, device, device and system provided in this specification provide a plug-in with an independent data server.
  • the plug-in can be used by the applet application.
  • the applet application loads the plug-in and needs to use the service of the plug-in, run the plug-in.
  • Plug-in so that the plug-in can access its own data server and complete the corresponding service.
  • the service of the plug-in is not needed, it is only necessary to run the applet application itself and access the data server of the applet application itself.
  • the applet application cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in. Can't get the permission of the applet.
  • the data and permissions of the plug-in and the applet are isolated, ensuring the privacy and security of the data, and at the same time, the data interaction and invocation between the applet application and the plug-in can be flexibly realized.
  • FIG. 1 is a schematic structural diagram of a data processing system with context and authority isolation provided by an embodiment of the present specification
  • FIG. 2 is a schematic flowchart of an embodiment of a data processing method provided by an embodiment of this specification
  • FIG. 3 is a schematic flowchart of a data processing method in another embodiment of the present specification.
  • FIG. 4 is a schematic diagram of a module structure of an embodiment of the data processing apparatus provided in this specification.
  • FIG. 5 is a schematic structural diagram of a data processing apparatus in another embodiment of the present specification.
  • FIG. 6 is a block diagram of the hardware structure of a data processing server in an embodiment of the present specification.
  • Mini Programs can be understood as a new type of Internet application technology framework, which is an application that can be used without downloading and installing. It can be hosted in mobile applications or hardware devices, and users can use mobile applications or hardware devices without independent development.
  • the applets are used directly in the device, and different applets can provide different services, and each applet can satisfy relatively simple basic applications.
  • a small program developer has developed a small program, it can be embedded in a mobile application or some network platforms for use.
  • the applet can be understood as a service provided by the mobile application or network platform.
  • an online platform provides a merchant applet.
  • users When users use the merchant applet, they may need to determine whether the user needs a deposit or is eligible for registration based on the user's credit score. Check your own credit score, but the credit score belongs to the user's relatively private information.
  • the online platform cannot directly open a room to the merchant's applet, but it needs to be displayed to the user.
  • FIG. 1 is a schematic structural diagram of a data processing system with context and authority isolation provided by the embodiments of this specification.
  • the data processing system may It includes a platform server, multiple applet applications, and multiple plug-ins.
  • Figure 1 shows a applet application (ie, applet) and a plug-in loaded by it.
  • the system can include multiple applet applications. , multiple plug-ins, different applet applications can load different plug-ins, and one applet application can load one or more plug-ins, which are not specifically limited in the embodiments of this specification.
  • the plug-in and the applet application have independent data servers respectively, that is, as shown in Figure 1, the permissions and data of the applet application and the plug-in are isolated from each other, and each has its own independent data server.
  • the plug-in in the embodiment of this specification can be understood as an independent function module, which can be integrated and used by the applet application.
  • the plug-in in the embodiment of this specification is different from the usual plug-in. It can be developed and created by using a small program development tool.
  • the developer can be a company or individual independent of the applet application developer, the plugin runtime context and permissions are independent of the applet application.
  • the platform server can be understood as a platform for small program or plug-in developers to settle in and register. In the platform server, developers can create small program applications or plug-ins, and the platform server can apply for relevant permissions for the small program applications or plug-ins.
  • Plug-in developers can use applet application development tools to develop and build plug-ins, and then upload the developed plug-ins to the open platform, the platform server.
  • the platform server can review the uploaded plug-ins. After the review is passed, the plug-ins can be released online independently of the applet application.
  • Plug-in developers need to open the platform to assign corresponding identities and permissions to the plug-ins.
  • the plug-in can provide custom components, which can be embedded in the applet, and can also provide pages for the applet to jump to. In addition, it can also provide an API (Application Programming Interface, application program interface) module, which can be referenced and called by the applet application. .
  • API Application Programming Interface, application program interface
  • the platform server can also provide a plug-in application market, and the applet application can query the plug-in application market of the platform server for its own plug-in, and send a plug-in service request to the platform server to request to load the corresponding plug-in.
  • the platform server can establish a usage association between the applet application and the plug-in. After the usage association is established, when the applet container runs the applet, it loads the plug-in where it needs to run, and generates an independent context for the plug-in at runtime. That is, when the applet application is running, it can access the data of the applet application itself through the applet context, and obtain the permission of the applet application itself.
  • the code in the plug-in runs in the context of the plug-in itself, and can access the data of the plug-in itself or the permissions of the plug-in itself.
  • the applet application cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in.
  • the plug-in cannot directly access the context of the applet application, that is, the plug-in cannot access the data inside the applet application. , and can't get the permission of the applet application.
  • the plug-in and the applet application have independent data servers, which can be understood as the data server of the plug-in and the applet server are completely different, or when the data server of the plug-in and the applet application are the same, but the plug-in and the applet are used in the data server
  • the permissions in the server are different.
  • the data servers of plug-in and applet applications are both platform servers, but the permissions assigned by the platform server to the plug-in and applet applications can be different, that is, the plug-in and applet references can access or use different data in the platform server.
  • the isolation of data and permissions is achieved through a plug-in that can support context isolation, and the problem caused by the inability to isolate common custom component contexts and applet applications is overcome.
  • the plug-in system also includes open platform data, permissions, and R&D support systems, so that plug-ins can establish separate application IDs and issue independent versions with a standardized process, so that plug-ins do not need to be bundled with the applet application framework, which solves the problem.
  • Security issues are also applicable to all third-party teams outside the framework of the Mini Program framework, expanding the scope of application of plug-in developers.
  • FIG. 2 is a schematic flowchart of an embodiment of a data processing method provided by an embodiment of the present specification.
  • the present specification provides method operation steps or device structures as shown in the following embodiments or accompanying drawings, the method or device may include more or less operation steps after partial combination based on routine or without creative work. or modular units.
  • the execution sequence of these steps or the module structure of the device are not limited to the execution sequence or module structure shown in the embodiments of the present specification or the accompanying drawings.
  • Step 202 Send a plug-in service request to a server, where the plug-in service request includes a plug-in identifier, so that the server can store the plug-in
  • the plug-in corresponding to the identification establishes a use association relationship with the applet application; wherein the plug-in has an independent data server.
  • the data processing method provided by the embodiments of this specification can be applied to a applet application, and the applet application can request to use one or more plug-ins in the platform server in the server, namely the platform server in FIG. 1 .
  • the applet application can send a plug-in service request to the server, and the plug-in service request can carry a plug-in identifier, and the server can establish a usage association between the plug-in and the applet application according to the plug-in identifier in the received plug-in server request.
  • the plug-in identifier may be a character or character string that can uniquely identify the plug-in and is allocated by the server to the plug-in when the plug-in is published on the server.
  • the plug-in in the embodiment of this specification has an independent data server, that is, the context and authority of the plug-in and the applet are isolated, and the plug-in itself has data, authority and R&D support system.
  • One applet application may be associated with one or more plug-ins, which may be determined according to actual application scenarios and usage requirements, which are not specifically limited in the embodiments of this specification.
  • Step 204 Receive the applet access request, and determine whether the service corresponding to the applet access request and the plug-in satisfies a preset correspondence, and if so, load the plug-in according to the usage association.
  • the applet application when the user uses the applet application, the applet application will receive the applet access request sent by the user, and the applet container will run the applet application according to the received applet access container.
  • the applet container can be understood as in the client or device system, in order to run the applet application or plug-in, it is necessary to provide a applet running environment, which acts as a bridge between the applet application and the underlying platform. This running environment is called the applet container .
  • the request needs to use the service corresponding to the plug-in, that is, whether the service corresponding to the applet access request and the plug-in satisfies the preset correspondence. If it is determined that the service corresponding to the plug-in needs to be used, the corresponding plug-in can be loaded according to the usage association established by the server.
  • applet application A is a car rental applet developed by merchant B
  • applet application A requests the associated plug-in a in the server
  • the plug-in a can be used to obtain the user's credit score.
  • Merchant B needs to determine whether the user needs to submit a deposit in advance based on the user's credit score.
  • the credit score is generally determined by a professional network platform based on the user's consumption records and other evaluations, and belongs to the private data of the network platform and the user. The network platform does not want to directly provide the user's credit score to Merchant B for use.
  • the applet application A can load its associated plug-in a.
  • the plug-in a obtains the user's credit score from the network platform for credit score evaluation, and displays it to the user, but the merchant B cannot know it. That is, merchant B cannot directly obtain the user's credit score from the network platform, but can provide the user's credit score to the user by loading the plug-in a.
  • Plug-in a can directly return the credit score to meet the requirements or not. The required result is given to the applet application A.
  • Step 206 Send the applet access request to the plug-in, so that the plug-in completes the task corresponding to the applet access request by accessing the data server of the plug-in itself.
  • the applet application after the applet application loads the plug-in, it can send the applet access request to the plug-in to run the code inside the plug-in.
  • the plug-in When the plug-in is running, it can access the data server of the plug-in itself, and access the data or permissions of the plug-in itself. , to execute the applet access request and complete the corresponding task.
  • the applet application A can load and run the plug-in a, so that the plug-in a can obtain the user's credit score by accessing the credit evaluation network platform.
  • the applet application when the applet access request received by the applet application does not require the use of the services of the plug-in, the applet application can be directly run, the data server of the applet application itself can be accessed, and the corresponding applet access request can be completed. service.
  • the data server of the applet application and the data server of the plug-in can be different data servers or the same data server.
  • the plug-in and the applet application use the same data server, the plug-in and the applet
  • the permissions of applications on the data server are different, that is, the data they can use or access may be different, so as to achieve data isolation between plug-in and applet applications.
  • the data processing method provided by the embodiments of this specification provides a plug-in with an independent data server, the plug-in can be used by the applet application, when the applet application loads the plug-in, when the service of the plug-in needs to be used, the plug-in is run, so that The plug-in accesses its own data server to complete the corresponding service.
  • the service of the plug-in is not required, it only needs to run the applet application itself and access the data server of the applet application itself.
  • the applet application cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in. Can't get the permission of the applet.
  • the data and permissions of the plug-in and the applet are isolated, ensuring the privacy and security of the data, and at the same time, the data interaction and invocation between the applet application and the plug-in can be flexibly realized.
  • the plug-in includes at least one of a component, a page, and a calling interface
  • the method for loading the plug-in includes at least one of the following: A component embedded in the plug-in in a program application; the component is set with a component attribute, and the component attribute is used to cause the applet application to send an applet access request to the plug-in; call the calling interface in the plug-in ; Add a link to the page in the plug-in in the applet application.
  • the plug-in may include at least one of a component, a page or a calling interface.
  • a component can be understood as a functional module, a display and interaction module with a user interface, which can be integrated and used by the applet.
  • the custom component runs in the context of the applet.
  • the context is the data and state information that the application or function module depends on at runtime. For example, the data obtained or generated by the applet or plug-in during the running process can be called the context.
  • a component is a module directly embedded in an applet application, but the context of a component embedded in an applet application cannot generally be isolated from the applet application. The component in this application is in the plug-in.
  • the component has the same data server as the plug-in.
  • the component attribute can be used for the applet application to send the applet access to the plug-in when the component is embedded. request, that is, one-way data transfer from the applet application to the plug-in can be realized by defining the component properties of the component.
  • the plug-in can include multiple components with different functions, and the configuration can be defined by the user, and the components support context isolation. When the applet application is embedded in the component in the plug-in, the component runs in the context of the plug-in, realizing data and The isolation of permissions overcomes the problems caused by the inability to isolate common custom component contexts and applets.
  • the plug-in can also be configured with multiple call interfaces that are open to the outside world, and the applet application can realize data interaction with the plug-in by calling the call interface of the plug-in.
  • the plug-in can also include pages that can be jumped, and the plug-in developer can choose to expose these plug-in pages for the applet application to jump to, so that the applet application can jump to the plug-in page while achieving context isolation, that is, data Permissions and applets are isolated. Users can choose the appropriate loading method to load the plug-in according to the actual application scenario. For example, in some common cases, the plug-in may need to be embedded in the applet application to achieve better results. In this way, the plug-in can be loaded by embedding the component.
  • the scene may be better by calling the interface, or the way of page jumping may be better, which can be selected according to actual needs.
  • the embodiments of this specification can provide a variety of plug-in loading methods, and each method can realize plug-ins and small programs. Data isolation for applications.
  • the plug-in includes a configuration declaration file
  • the configuration declaration file includes at least one of a component, a page, and a calling interface open to the applet application;
  • the plug-in includes: obtaining a configuration declaration file of the plug-in according to the usage association; loading the plug-in through a component, page or calling interface opened by the plug-in to the applet application according to the configuration declaration file.
  • the plug-in may include a configuration declaration file
  • the configuration declaration file may include components, pages, and calling interfaces open to the applet application, and may also include information such as functions of each component and page. Of course, it can also include components, pages, and calling interfaces that are not developed for the applet application.
  • the applet application needs to load a plug-in, it can obtain the configuration declaration file of the plug-in associated with it according to the usage association established by the server, and according to the components, pages, calling interfaces, etc., which are open to the applet application declared in the configuration declaration file, Choose the appropriate way to load the plugin.
  • the applet application can accurately and quickly select the appropriate method, load the plug-in, and improve the efficiency of data processing.
  • the method further includes: sending a callback function to the plug-in through the calling interface , so that the plug-in accesses the data server of the applet application itself when the callback function is called.
  • the applet can pass the callback function to the plug-in through the calling interface, and the callback function can be understood as a function called through the function pointer. (address) passed as a parameter to another function, when this pointer is used to call the function it points to, this is the callback function.
  • the callback function can be called inside the plug-in.
  • the data server of the applet application itself is accessed.
  • the plug-in can indirectly access the data of the applet application and control the behavior of the applet application in the position allowed by the applet application. This mechanism ensures the security isolation of the two contexts, and can flexibly realize the relationship between the applet application and the plug-in. data exchange and call each other.
  • the method further includes: receiving the execution returned by the plug-in through the calling interface the execution result of the applet access request.
  • the plug-in itself can also provide a calling interface for the applet application to load the plug-in, so that the applet application and the plug-in can communicate bidirectionally according to the agreed component attributes and interfaces. That is, the plug-in can return the execution result after executing the applet access request to the applet application through the calling interface, such as: the credit score meets the conditions, etc.
  • Fig. 3 is a schematic flowchart of a data processing method in another embodiment of this specification. As shown in Fig. 3, this specification can also provide a data processing method that can be applied in a plug-in.
  • the plug-in has an independent data server, the The method may include: Step 302, sending a release online request to the server.
  • the plug-in in the embodiments of this specification can be understood as an independent functional module, which can be integrated and used by the applet application.
  • the runtime context and permissions are independent of the applet application, and the plug-in developer can be independent of the applet application.
  • the plug-in developer can use the development tools of the applet to develop and build the plug-in.
  • the plug-in developer can send a release and online request to the server, that is, the platform server in Figure 1, requesting that the plug-in be launched on the server. release.
  • the plug-in will include a plug-in code folder, and the plug-in in the embodiment of this specification may also include components, pages, and calling interfaces.
  • Components, pages, and surrogate interfaces open to the applet application can be declared in the configuration declaration file for the applet to use. Used by the app when loading plugins.
  • the plug-ins in the embodiments of this specification may be developed and created by different plug-in developers. There is no necessary connection between the creator of the plug-in and the creator of the applet application that loads the plug-in. Can be used by applet applications.
  • Step 304 Receive the plug-in online information of the plug-in that has been approved by the server to go online, where the plug-in online information includes a plug-in identifier.
  • the server can review the published plug-in, such as: reviewing whether the plug-in is legal and whether it can be used by other applet applications. After the review is passed, the server can put the plug-in online on the server, and at the same time, the server can return a plug-in online information to the plug-in, and the plug-in online information can include the plug-in identifier.
  • the plug-in identifier can be a string assigned by the server to the plug-in that can uniquely identify the plug-in, and the server can also assign corresponding permissions to the plug-in, such as defining which data the plug-in can access to the server.
  • Step 306 Receive a loading request of the applet application based on the usage association, wherein the applet application is the applet application that the server establishes the usage association with the plug-in according to the plug-in identifier.
  • the applet application can establish a usage relationship with the plug-in through the server.
  • the applet application needs to use the service corresponding to the plug-in, it can choose to load the plug-in, and the plug-in can receive Load request sent to the applet application.
  • the plug-in includes at least one of a component, a page, and a calling interface
  • the method for receiving a loading request of an applet application based on an association relationship includes at least one of the following: receiving the applet A request sent by an application for a component embedded in the plug-in; the component is set with a component attribute, and the component attribute is used to cause the applet application to send an applet access request to the plug-in; receive the applet application Sending a request for invoking a calling interface in the plug-in; receiving a request for adding a link to a page in the plug-in by the applet application.
  • the applet application can load the plug-in through the component embedded in the plug-in, or can also load the plug-in by calling the calling interface in the plug-in, and can also load the plug-in by adding a link to the page in the plug-in. It may be determined according to the actual use situation, and is not specifically limited in the embodiments of this specification.
  • a plug-in When a plug-in is loaded in the form of an embedded component, one-way communication between the applet application and the plug-in can be realized according to the component attributes of the components in the plug-in, that is, data can be transmitted through custom component attributes: components in the plug-in can define component attributes, so The required data can be unidirectionally passed from the applet application to the plug-in by the applet application when the custom component is embedded.
  • This component can support context isolation.
  • the applet application embeds a custom component in a plugin
  • the custom component runs in the plugin context, which realizes the isolation of data and permissions, and overcomes the common custom component context and applet application. problems caused by inability to isolate.
  • the plug-in When a plug-in is loaded through the calling interface, the plug-in is exposed to the applet application calling interfaces, and the applet can call these calling interfaces and pass the data required by the plug-in, and can realize the two-way communication between the plug-in and the applet application.
  • the plug-in can return the execution result of the applet access request to the applet application through the calling interface called by the applet application.
  • the applet By loading the plug-in on the page, the applet can jump to the plug-in page and at the same time realize the isolation of the context, that is, the data permission is isolated from the host applet. Users can choose the appropriate loading method to load the plug-in according to the actual application scenario.
  • the plug-in may need to be embedded in the applet application to achieve better results.
  • the plug-in can be loaded by embedding the component.
  • the scene may be better by calling the interface, or the way of page jumping may be better, which can be selected according to actual needs.
  • the embodiments of this specification can provide a variety of plug-in loading methods, and each method can realize plug-ins and small programs. Data isolation for applications.
  • Step 308 Receive an applet access request sent by the applet application after loading the plug-in, and complete the task corresponding to the applet access request by accessing the data server of the plug-in itself.
  • the applet application after the applet application loads the plug-in, it can send the applet access request to the plug-in, the plug-in can run its own code, and complete the service corresponding to the applet access request by accessing the data server of the plug-in itself, such as : query the user's credit value, issue an invoice, etc., which are not specifically limited in the embodiments of this specification.
  • the applet developer can order the plug-in on the open platform and request to establish a use relationship between the applet and the plug-in.
  • the plugin can be referenced by the plugin identifier.
  • the applet container loads the plugin where it needs to run the plugin when it runs the applet Generate separate contexts for plugins at runtime.
  • the applet application When the applet application is running, it can access the data of the applet itself through the applet context, and obtain the permissions of the applet itself.
  • the applet application loads the plug-in and runs, the code in the plug-in runs in the context of the plug-in itself, and can access the data of the plug-in itself or the permissions of the plug-in itself.
  • the applet application cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in.
  • the plug-in cannot directly access the context of the host applet, that is, the plug-in cannot access the data inside the applet. You can't get the permissions of the applet either.
  • the context in which the plug-in runs is isolated from the applet application loaded with the plug-in, so that the data authority of the plug-in is isolated from the data and authority of the applet application, and the plug-in provides a mechanism to support Embedded custom components, jumpable plug-in pages, and callable interfaces are available for applet applications to embed, jump, and call.
  • the context is automatically executed as the call actually occurs in the plug-in or the applet application. Switching, which not only ensures data security, but also ensures the scalability of various application scenarios.
  • the above capabilities make the plug-in itself a self-closed business and commercial service capability that can combine front-end and back-end services, not just a combination of some interface elements.
  • the plug-in includes a calling interface
  • the method further includes:
  • the callback function sent by the applet application through the calling interface is received, and when the callback function is called, the data server of the applet application itself is accessed.
  • the applet can pass the callback function to the plug-in through the calling interface, and the callback function can be understood as a function called through the function pointer. (address) passed as a parameter to another function, when this pointer is used to call the function it points to, this is the callback function.
  • the callback function can be called inside the plug-in.
  • the data server of the applet application itself is accessed.
  • the plug-in can indirectly access the data of the applet application and control the behavior of the applet application in the position allowed by the applet application. This mechanism ensures the security isolation of the two contexts, and can flexibly realize the relationship between the applet application and the plug-in. data exchange and call each other.
  • one or more embodiments of this specification further provide a system for data processing.
  • the system may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in the embodiments of this specification in combination with necessary hardware implementation devices.
  • the apparatuses in one or more embodiments provided by the embodiments of this specification are described in the following embodiments. Since the implementation solution of the device to solve the problem is similar to the method, the implementation of the specific device in the embodiments of the present specification may refer to the implementation of the foregoing method, and repeated descriptions will not be repeated.
  • the term "unit” or "module” may be a combination of software and/or hardware that implements a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
  • FIG. 4 is a schematic diagram of the module structure of an embodiment of the data processing apparatus provided in this specification, and the apparatus is applied to the applet application in the above-mentioned embodiment.
  • the data processing apparatus provided in this specification can be Including: a plug-in selection module 41, which can be used to send a plug-in service request to the server, where the plug-in service request includes a plug-in identifier, so that the server establishes a use association relationship between the plug-in corresponding to the plug-in identifier and the applet application;
  • the plug-in has an independent data server;
  • the plug-in loading module 42 can be used to receive the applet access request, and determine whether the applet access request and the service corresponding to the plug-in satisfy the preset correspondence, and if so, then Load the plug-in according to the usage association;
  • the plug-in running module 43 can be configured to send the applet access request to the plug-in, so that the plug-in can complete the The task corresponding to the apple
  • the data processing apparatus implements the isolation of data and permissions through a plug-in capable of supporting context isolation, and overcomes the problem caused by the inability to isolate common custom component contexts and applet applications.
  • the plug-in system also includes open platform data, permissions, and R&D support systems, so that plug-ins can establish separate application IDs and issue independent versions with a standardized process, so that plug-ins do not need to be bundled with the applet application framework, which solves the problem.
  • Security issues are also applicable to all third-party teams outside the framework of the Mini Program framework, expanding the scope of application of plug-in developers.
  • the apparatus further includes an applet running module, configured to: run the applet application when the service corresponding to the applet access request and the plug-in does not satisfy the preset correspondence , complete the task corresponding to the applet access request by accessing the data server of the applet application itself.
  • the applet application when the applet application is running, it can access the data of the applet itself through the applet context, and obtain the authority of the applet itself.
  • the applet loads the plug-in and runs, the code in the plug-in runs in the context of the plug-in itself, and can access the plug-in's own data or the plug-in's own permissions.
  • the applet cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in. Obtain the permission of the applet to realize the isolation of data.
  • the plug-in includes at least one of a component, a page, and a calling interface
  • the plug-in loading module is specifically configured to use at least one of the following methods to load the plug-in: in the applet application A component embedded in the plug-in; the component is set with a component attribute, and the component attribute is used to make the applet application send an applet access request to the plug-in; call the calling interface in the plug-in; Add a link to the page in the plug-in in the applet application.
  • the user can select an appropriate loading method to load the plug-in according to the actual application scenario.
  • the plug-in may need to be embedded into the applet application to achieve better effects.
  • it may be better to call the interface, or the way to jump to the page is better.
  • the embodiment of this specification can provide a variety of ways to load the plug-in, and each Either way can achieve data isolation between plug-ins and applet applications.
  • the plug-in running module is further configured to: send a callback to the plug-in through the calling interface function, so that when the plug-in calls the callback function, it accesses the data server of the applet application itself.
  • FIG. 5 is a schematic structural diagram of a data processing apparatus in another embodiment of the present specification.
  • the apparatus can be applied to a plug-in having an independent data server.
  • the server sends a release online request;
  • the identification receiving module 52 is used to receive the plug-in online information of the plug-in that the server has approved to go online, and the plug-in online information includes the plug-in identification;
  • the loading request receiving module 53 is used to receive the applet Applying a loading request based on a usage association relationship, wherein the applet application is an applet application that the server establishes a usage association relationship with the plug-in according to the plug-in identifier;
  • the running module 54 is configured to receive the applet application The applet access request sent after the plug-in is loaded, and the task corresponding to the applet access request is completed by accessing the data server of the plug-in itself.
  • the data processing apparatus provides a plug-in with an independent data server, and the plug-in can be used by the applet application.
  • the plug-in When the applet application loads the plug-in, when the service of the plug-in needs to be used, the plug-in is run to make The plug-in accesses its own data server to complete the corresponding service.
  • the service of the plug-in When the service of the plug-in is not required, it only needs to run the applet application itself and access the data server of the applet application itself.
  • the applet application cannot directly access the context of the plug-in, that is, the applet cannot access the data inside the plug-in, nor can it obtain the permissions of the plug-in. Can't get the permission of the applet.
  • the data and permissions of the plug-in and the applet are isolated, ensuring the privacy and security of the data, and at the same time, the data interaction and invocation between the applet application and the plug-in can be flexibly realized.
  • the above-mentioned apparatus may also include other implementation manners according to the description of the corresponding method embodiment.
  • reference may be made to the descriptions of the corresponding method embodiments above, which will not be repeated here.
  • the embodiments of this specification also provide a data processing device, including: at least one processor and a memory for storing instructions executable by the processor, and the processor implements the data processing method of the above embodiment when executing the instructions, such as: Send a plug-in service request to the server, where the plug-in service request includes a plug-in identifier, so that the server establishes a use association relationship between the plug-in corresponding to the plug-in identifier and the applet application; wherein the plug-in has an independent data service receiving the applet access request, and judging whether the service corresponding to the applet access request and the plug-in satisfies the preset correspondence; if so, load the plug-in according to the usage association; send the plug-in the The applet access request, so that the plug-in completes the task corresponding to the applet access request by accessing the data server of the plug-in itself.
  • the applet application is an applet application that the server establishes a usage relationship with the plugin according to the plugin identifier; receives an applet access request sent by the applet application after loading the plugin, and accesses the plugin by accessing the plugin. Its own data server completes the task corresponding to the applet access request.
  • the data processing device provided in this specification can also be applied to various data analysis and processing systems.
  • the system or server or terminal or device may be a separate server, or may include a server cluster, system (system ( Including distributed systems), software (applications), actual operation devices, logic gate circuit devices, quantum computers, etc., combined with terminal devices that implement necessary hardware.
  • the detection system for checking difference data may include at least one processor and a memory storing computer-executable instructions, the processor implementing the steps of the method described in any one or more of the above embodiments when the processor executes the instructions.
  • FIG. 6 is a block diagram of the hardware structure of a data processing server in an embodiment of this specification, and the computer terminal may be the data processing server or data processing device in the above-mentioned embodiment.
  • the server 10 may include one or more (only one is shown in the figure) processor 100 (the processor 100 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), A non-volatile memory 200 for storing data, and a transmission module 300 for communication functions.
  • server 10 may also include more or fewer components than those shown in FIG. 6 , for example, other processing hardware, such as databases or multi-level caches, GPUs, or have a different configuration than that shown in FIG. 6 .
  • the non-volatile memory 200 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the data processing methods in the embodiments of this specification.
  • the processor 100 runs the software stored in the non-volatile memory 200 by running the software. Programs and modules to perform various functional applications and resource data updates.
  • Non-volatile memory 200 may include high-speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the non-volatile memory 200 may further include memory located remotely from the processor 100, and these remote memories may be connected to the computer terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, an office network, a mobile communication network, and combinations thereof.
  • the transmission module 300 is used to receive or transmit data via a network.
  • the specific example of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal.
  • the transmission module 300 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission module 300 may be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • the method or apparatus described in the above-mentioned embodiments provided in this specification can realize business logic through a computer program and record it on a storage medium, and the storage medium can be read and executed by a computer, so as to achieve the effects of the solutions described in the embodiments of this specification, For example, receiving an access request from an applet, judging whether the service corresponding to the access request of the applet and the plug-in satisfies a preset correspondence, and if so, loading the plug-in according to the use association; sending the plug-in the The applet access request, so that the plug-in completes the task corresponding to the applet access request by accessing the data server of the plug-in itself.
  • the applet application is an applet application that the server establishes a usage relationship with the plugin according to the plugin identifier; receives an applet access request sent by the applet application after loading the plugin, and accesses the plugin by accessing the plugin. Its own data server completes the task corresponding to the applet access request.
  • the storage medium may include a physical device for storing information, usually after digitizing the information and then storing it in a medium using electrical, magnetic or optical means.
  • the storage medium may include: devices that use electrical energy to store information, such as various memories, such as RAM, ROM, etc.; devices that use magnetic energy to store information, such as hard disks, floppy disks, magnetic tapes, magnetic core memory, magnetic bubble memory, U Disc; a device such as a CD or DVD that uses optical means to store information.
  • devices that use electrical energy to store information such as various memories, such as RAM, ROM, etc.
  • devices that use magnetic energy to store information such as hard disks, floppy disks, magnetic tapes, magnetic core memory, magnetic bubble memory, U Disc
  • a device such as a CD or DVD that uses optical means to store information.
  • quantum memory graphene memory, and so on.
  • the above-mentioned data processing methods or apparatuses provided in the embodiments of this specification can be implemented by a processor executing corresponding program instructions in a computer, such as using the C++ language of the windows operating system to implement on the PC side, the Linux system, or other methods such as using android,
  • the iOS system programming language is implemented in smart terminals, and the processing logic based on quantum computers is implemented.
  • the device, computer storage medium, and system described above in the specification may also include other implementations according to the description of the related method embodiments. For specific implementations, refer to the descriptions of the corresponding method embodiments, which will not be repeated here. .
  • Embodiments of this specification are not limited to those that necessarily conform to industry communication standards, standard computer resource data update and data storage rules, or what is described in one or more embodiments of this specification. Some industry standards or implementations described by using custom methods or examples with slight modifications can also achieve the same, equivalent or similar, or predictable implementation effects after deformations of the above-mentioned examples. Embodiments obtained by applying these modified or deformed data acquisition, storage, judgment, and processing methods can still fall within the scope of optional implementations of the embodiments of this specification.
  • a Programmable Logic Device (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device.
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller may be implemented in any suitable manner, for example, the controller may take the form of eg a microprocessor or processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory.
  • the controller may take the form of eg a microprocessor or processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers
  • ASICs application specific integrated circuits
  • controllers include but are not limited to
  • the controller in addition to implementing the controller in the form of pure computer-readable program code, the controller can be implemented as logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded devices by logically programming the method steps.
  • the same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for realizing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions can be regarded as both a software module implementing a method and a structure within a hardware component.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet A computer, wearable device, or a combination of any of these devices.
  • one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-inventive means.
  • the sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence.
  • an actual device or terminal product When executed, it can be executed sequentially or in parallel according to the methods shown in the embodiments or the drawings (for example, a parallel processor or multi-threaded processing environment, or even a distributed resource data update environment).
  • each module can be implemented in the same one or more software and/or hardware, and the modules that implement the same function can also be implemented by a combination of multiple sub-modules or sub-units, etc. .
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable resource data updating device to function in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising instruction means, the The instruction means implement the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
  • These computer program instructions may also be loaded onto a computer or other programmable resource data updating device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process for execution on the computer or other programmable device
  • the instructions provide steps for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include forms of non-persistent memory, random access memory (RAM) and/or non-volatile memory in computer readable media, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
  • one or more of the embodiments of this specification may be provided as a method, system or computer program product. Accordingly, one or more embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present specification may employ a computer program implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein form of the product.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • program modules may also be practiced in distributed computing environments where tasks are performed by remote devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

本说明书提供一种数据处理方法、装置、设备及系统,提供一种拥有独立数据服务端的插件,该插件可以供小程序应用使用,当小程序应用加载插件时,在需要使用插件的服务时,运行插件,以使得插件访问自身的数据服务端,完成对应的服务,在不需要插件的服务时,只需要运行小程序应用本身,访问小程序应用自身的数据服务端。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限。

Description

一种数据处理方法、装置、设备及系统 技术领域
本说明书属于计算机技术领域,尤其涉及一种数据处理方法、装置、设备及系统。
背景技术
有些开放平台可以提供多种服务,随着计算机技术的发展,不同的服务可以通过不同的小程序提供,如:信用服务、直播服务、生活缴费服务等。这些服务一般需要调用平台内的数据,但是有些数据可能比较隐私,直接提供给服务使用,降低了用户数据的安全。
发明内容
本说明书实施例的目的在于提供一种数据处理方法、装置、设备及系统,实现了数据隔离,确保了数据的安全性。
第一方面,本说明书实施例提供了一种数据处理方法,应用在小程序应用中,所述方法包括:向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端;接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
第二方面,本说明书提供了一种数据处理方法,应用于拥有独立的数据服务端的插件中,所述方法包括:向服务器发送发布上线请求;接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
第三方面,本说明书提供了一种数据处理装置,应用在小程序应用中,包括:插件选择模块,用于向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系,所述插件拥有独立的数据服务端;插件加载模块,用于接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;插件运行模块,用于向所述插件发送所述小程序访问请求,以使得所 述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
第四方面,本说明书提供了一种数据处理装置,应用于拥有独立的数据服务端的插件中,所述装置包括:发布上线模块,用于向服务器发送发布上线请求;标识接收模块,用于接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;加载请求接收模块,用于接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;运行模块,用于接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
第五方面,本说明书实施例提供了一种数据处理系统,包括:包括:平台服务器、多个小程序应用、多个插件,其中,所述插件和所述小程序应用分别拥有独立的数据服务端;所述平台服务器用于发布上线所述插件,并接收小程序应用发送的插件服务请求,基于所述插件服务请求建立小程序应用和插件之间的使用关联关系;所述小程序应用运行时,通过访问小程序应用自身的数据服务端,获取所述小程序应用的权限;当所述小程序应用插件的服务时,所述小程序应用基于所述使用关联关系加载对应的插件,并通过访问加载的插件自身的数据服务端,访问所述插件的权限或所述插件自身的数据。
第六方面,本说明书实施例提供了一种数据处理设备,包括至少一个处理器以及用于存储处理器可执行指令的存储器,所述处理器执行所述指令时实现上述第一方面或第二方法所述的数据处理方法。
本说明书提供的数据处理方法、装置、设备及系统,提供一种拥有独立数据服务端的插件,该插件可以供小程序应用使用,当小程序应用加载插件时,在需要使用插件的服务时,运行插件,以使得插件访问自身的数据服务端,完成对应的服务,在不需要插件的服务时,只需要运行小程序应用本身,访问小程序应用自身的数据服务端。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限。实现了插件与小程序数据和权限的隔离,确保了数据的隐私和安全性,同时,能够灵活实现小程序应用和插件之间的数据交互、调用。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本说明书实施例提供的一种上下文和权限隔离的数据处理系统的结构示意图;
图2是本说明书实施例提供的数据处理方法实施例的流程示意图;
图3是本说明书又一个实施例中数据处理方法的流程示意图;
图4是本说明书提供的数据处理装置一个实施例的模块结构示意图;
图5是本说明书又一个实施例中数据处理装置的结构示意图;
图6是本说明书一个实施例中数据处理服务器的硬件结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
随着计算机技术的发展,小程序的开发使用大大方便人们的工作和生活。小程序可以理解为一种新型的互联网应用技术框架,是一种不需要下载安装即可使用的应用,可以寄宿在移动应用或者硬件设备中,不需要独立开发,用户就可以在移动应用或硬件设备中直接使用其中的小程序,并且不同的小程序可以提供不同的服务,每个小程序可以满足比较简单的基础应用。通常小程序开发者开发完成一款小程序后,可以嵌入到移动应用或一些网络平台中使用,小程序即可以理解为移动应用或网络平台提供的一种服务,小程序在运行时,一般是依赖其宿主如:移动应用或网络平台提供的数据,但是有些数据可能比较隐私,不能直接提供给小程序使用。例如:某网络平台提供一款商家小程序,用户在使用该商家小程序用时,可能需要根据用户的信用分值来确定用户是否需要押金或者是否具备注册使用资格等,用户可以在商家小程序中查询自己的信用分值,但是信用分值属于用户比较私密的信息,网络平台不能直接开房给商家小程序,但是又需要展示给用户。
本说明书实施例可以提供一种上下文和权限隔离的框架体系,图1是本说明书实施例提供的一种上下文和权限隔离的数据处理系统的结构示意图,如图1所示,数据处理系统中可以包括一个平台服务器、多个小程序应用、多个插件,图1中示意出了一个小程序应用(即小程序)和其加载的一个插件,根据实际需要,系统中可以包括多个小程序应用,多个插件,不同的小程序应用可以加载不同的插件,一个小程序应用可以加载一个或多个插件,本说明书实施例不作具体限定。其中,插件和小程序应用分别拥有独立的数据服务端,即如图1所示,小程序应用和插件权限和数据是相互隔离的状态,各自拥有自己独立的数据服务端。本说明书实施例中的插件可以理解为一个独立的功能模块,可以由小程序应用集成使用,本说明书实施例中的插件与通常的插件不同,其可以使用小程序开发工具进行开发和创建,插件开发者可以是独立于小程序应用开发者的 公司或个人,插件运行时上下文以及权限和小程序应用独立。平台服务器可以理解为一种可以供小程序或插件开发者入驻和注册的平台,在平台服务器中开发者可以创建小程序应用或插件,平台服务器可以给小程序应用或插件申请相关权限。
插件开发者可以使用小程序应用开发工具对插件进行开发和构建后,将开发出的插件上传到开放平台即平台服务器。平台服务器可以对上传的插件进行审核,审核通过后,插件可以独立于小程序应用发布上线,插件开发者需要开放平台给插件分配相应标识和权限。插件里面可以提供自定义组件,可供小程序嵌入,还可以提供页面,可供小程序跳转,另外还可以提供API(Application Programming Interface,应用程序接口)模块,可供小程序应用引用和调用。
平台服务器中还可以提供一个插件应用市场,小程序应用可以在平台服务器的插件应用市场中查询适合自己的插件,并向平台服务器发送插件服务请求,以请求加载对应的插件。平台服务器接收到小程序应用的插件服务器请求后,可以建立小程序应用和插件之间的使用关联关系。建立使用关联关系后,小程序容器在运行小程序的时候,在需要运行插件的地方,对插件进行加载,并对插件在运行时生成独立的上下文。即小程序应用在运行时,可以通过小程序上下文访问小程序应用自身的数据,获得小程序应用本身的权限。小程序应用加载插件并运行的时候,插件内的代码运行在插件自身的上下文中,可以访问插件自身的数据,或者插件自身的权限。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序应用的上下文,即插件无法访问小程序应用内部的数据,也不能获得小程序应用的权限。
其中,插件和小程序应用各自独立的数据服务端,可以理解为插件和小程序服务器的数据服务端完全不同,或插件和小程序应用的数据服务端相同时,但插件和小程序应用在数据服务端中的权限不同。例如:插件和小程序应用的数据服务端均为平台服务器,但是平台服务器对插件和小程序应用分配的权限可以不同,即插件和小程序引用可以访问或使用平台服务器中不同的数据。
本说明书实施例,通过能够支持上下文隔离的插件,实现了数据和权限的隔离,克服了普通自定义组件上下文和小程序应用不能隔离而引来的问题。插件体系里面还包含开放平台数据、权限与研发支撑体系,这样插件可以建立单独的应用标识,并以标准化的流程进行独立的发版,这样使得插件无需和小程序应用框架捆绑在一起,解决了安全性问题,同时也适用于小程序框架组织架构以外的第三方所有团队,扩大了插件开发者的适用范围。
图2是本说明书实施例提供的数据处理方法实施例的流程示意图。虽然本说明书提供了如下述实施例或附图所示的方法操作步骤或装置结构,但基于常规或者无需创造性的劳动在所述方法或装置中可以包括更多或者部分合并后更少的操作步骤或模块单 元。在逻辑性上不存在必要因果关系的步骤或结构中,这些步骤的执行顺序或装置的模块结构不限于本说明书实施例或附图所示的执行顺序或模块结构。所述的方法或模块结构的在实际中的装置、服务器或终端产品应用时,可以按照实施例或者附图所示的方法或模块结构进行顺序执行或者并行执行(例如并行处理器或者多线程处理的环境、甚至包括分布式处理、服务器集群的实施环境)。
具体的一个实施例如图2所示,本说明书提供的数据处理方法的一个实施例中,所述方法可以应用在小程序应用中,小程序应用可以是在计算机、平板电脑、服务器、智能手机、智能穿戴设备、车载设备等终端中的小程序应用,所述方法可以包括如下步骤:步骤202、向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端。
在具体的实施过程中,本说明书实施例提供的数据处理方法可以应用在小程序应用中,小程序应用可以在服务器即图1中的平台服务器中请求使用平台服务器中的一个或多个插件。即小程序应用可以向服务器发送插件服务请求,插件服务请求中可以带有插件标识,服务器可以根据接收到的插件服务器请求中的插件标识,将插件和小程序应用建立使用关联关系。其中,插件标识可以是插件在服务器中发布上线时,服务器为插件分配的能够唯一标识插件的字符或字符串,具体形式本说明书实施例不作具体限定。此外,本说明书实施例中的插件拥有独立的数据服务端,即插件和小程序的上下文、权限是隔离的,插件自身带有数据、权限以及研发支撑体系。
一个小程序应用可以关联一个或多个插件,具体可以根据实际应用场景和使用需求而定,本说明书实施例不作具体限定。
步骤204、接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件。
在具体的实施过程中,当用户使用小程序应用时,小程序应用会接收到用户发送的小程序访问请求,小程序容器会根据接收到的小程序访问容器运行小程序应用。小程序容器可以理解为在客户端或者设备系统中,为了运行小程序应用或者插件,需要提供一个小程序运行环境,充当小程序应用和底层平台之间的桥梁,这个运行环境称为小程序容器。在运行小程序应用时,可以先判断小程序访问请求与插件对应的服务器是否满足预设对应关系,即当前接收到的小程序访问请求是否需要使用插件对应的服务即插件的功能,在接收到小程序访问请求时,可以判断该请求是否需要使用插件对应的服务,即小程序访问请求与插件对应的服务是否满足预设对应关系。若判断需要使用插件对应的服务,则可以根据服务器建立的使用关联关系加载对应的插件。
例如:小程序应用A是一个商户B开发的一款租车小程序,小程序应用A在服务器中请求关联插件a,插件a可以用于获取用户的信用分值。当用户在注册小程序应用 A时,商户B需要根据用户的信用分值判断用户是否需要预先提交押金。信用分值一般由专业的网络平台基于用户的消费记录等评估确定,属于网络平台和用户的私密数据,网络平台不希望直接将用户的信用分值直接提供给商户B使用。此时,当用户在小程序应用A中需要获取用户的信用分值时,确定需要使用插件a的服务,小程序应用A可以加载其关联的插件a。以通过运行插件a,由插件a从信用分值评估的网络平台中获取用户的信用分值,展示给用户,但是商户B并不能获知。即商户B不能直接从网络平台中获取到用户的信用分值,但是可以通过加载插件a的形式,将用户的信用分值提供给用户查看,插件a可以直接返回信用分值满足要求或不满足要求的结果给小程序应用A。
步骤206、向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
在具体的实施过程中,小程序应用加载了插件后,可以向插件发送小程序访问请求,以运行插件内部的代码,插件运行时,访问插件自身的数据服务端,访问插件自身的数据或权限,以执行该小程序访问请求,完成对应的任务。如:上述实施例中,小程序应用A可以通过加载并运行插件a,使得插件a通过访问信用评估网络平台获取到用户的信用分值。
本说明书说一些实施例中,在确定小程序访问请求与所述插件对应的服务不满足所述预设对应关系,则运行所述小程序应用,通过访问所述小程序应用自身的数据服务端,完成所述小程序访问请求对应的任务。
在具体的实施过程中,当小程序应用接收到的小程序访问请求不需要使用插件的服务时,则可以直接运行小程序应用,访问小程序应用自身的数据服务端,完成小程序访问请求对应的服务。其中,小程序应用的数据服务端和插件的数据服务端可以是不同的数据服务端,也可以是相同的数据服务端,当插件和小程序应用使用同一个数据服务端时,插件和小程序应用在该数据服务端的权限是不同的,即他们能够使用或访问的数据可能是不同的,以实现插件和小程序应用的数据隔离。
本说明书实施例提供的数据处理方法,提供一种拥有独立数据服务端的插件,该插件可以供小程序应用使用,当小程序应用加载插件时,在需要使用插件的服务时,运行插件,以使得插件访问自身的数据服务端,完成对应的服务,在不需要插件的服务时,只需要运行小程序应用本身,访问小程序应用自身的数据服务端。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限。实现了插件与小程序数据和权限的隔离,确保了数据的隐私和安全性,同时,能够灵活实现小程序应用和插件之间的数据交互、调用。
在上述实施例的基础上,本说明书一些实施例中,所述插件中包括组件、页面、 调用接口中的至少一个,所述加载所述插件的方法包括下述至少一种:在所述小程序应用中嵌入所述插件中的组件;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;调用所述插件中的调用接口;在所述小程序应用中添加所述插件中页面的链接。
在具体的实施过程中,插件中可以包括组件、页面或调用接口中的至少一个,组件可以理解为一种功能模块,带用户界面的显示和交互模块,可由小程序集成使用,小程序集成后,自定义组件运行在小程序的上下文中。上下文是应用或功能模块在运行时依赖的数据和状态信息,例如小程序或插件在运行过程中获取或产生的数据可以称为上下文。通常,组件是直接嵌入到小程序应用中的模块,但是一般嵌入到小程序应用中的组件的上下文不能和小程序应用隔离。本申请中的组件是在插件中,组件拥有和插件相同的数据服务端,可以通过定义插件中组件的组件属性,该组件属性可以用于小程序应用在嵌入组件时,向插件发送小程序访问请求,即可以通过定义组件的组件属性实现小程序应用向插件的进行单向数据传递。插件中可以包括多个不同功能的组件,具体可以由用户自行定义配置,且组件支持上下文隔离,在小程序应用嵌入插件中的组件的时,组件是运行在插件上下文中的,实现了数据和权限的隔离,克服了普通自定义组件上下文和小程序不能隔离而引来的问题。
插件中还可以配置多个对外开放的调用接口,小程序应用可以通过调用插件的调用接口实现与插件的数据交互。此外,插件中还可以包括可以跳转的页面,插件开发者可以选择暴露这些插件页面供小程序应用跳转,这样小程序应用可以跳转到插件页面的同时,实现了上下文的隔离,即数据权限和小程序进行隔离。用户可以根据实际的应用场景,选择合适的加载方式加载插件,如:有些常见可能需要将插件嵌入到小程序应用中,才能实现更好的效果,这样可以选择嵌入组件的方式加载插件,有些业务场景可能通过调用接口更好,或者页面跳转的方式更好,具体可以根据实际需要进行选择,本说明书实施例可以提供多种插件加载的方式,并且每一种方式均能够实现插件与小程序应用的数据隔离。
本说明书一些实施例中,所述插件中包括配置声明文件,所述配置声明文件中包括对小程序应用开放的组件、页面、调用接口中的至少一个;所述根据所述使用关联关系加载所述插件,包括:根据所述使用关联关系获取所述插件的配置声明文件;根据所述配置声明文件通过所述插件对小程序应用开放的组件、页面或调用接口加载所述插件。
在具体的实施过程中,插件中可以包括配置声明文件,该配置声明文件中可以包括对小程序应用开放的组件、页面、调用接口,还可以包括各个组件、页面的功能等信息。当然,还可以包括不对小程序应用开发的组件、页面、调用接口。当小程序应用需要加载插件时,可以根据服务器建立的使用关联关系,获取与之关联的插件的配置声明文件,根据配置声明文件中声明的对小程序应用开放的组件、页面、调用接口等,选择合适的方式加载插件。如:选择嵌入插件中对小程序应用开放的组件,或在小程序应用 添加一个插件的页面的链接或按钮,或者直接调用插件中对外开放的调用接口等。通过配置声明文件能够使得小程序应用能够准确快速的选择合适的方式,加载插件,提升了数据处理的效率。
在上述实施例的基础上,本说明书一些实施例中,若通过调用所述插件中的调用接口的方式加载所述插件,所述方法还包括:通过所述调用接口向所述插件发送回调函数,以使得所述插件在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
在具体的实施过程中,若小程序应用使用调用接口的方式加载插件,则小程序可以通过调用接口向插件传递回调函数,回调函数可以理解为一个通过函数指针调用的函数,如果把函数的指针(地址)作为参数传递给另一个函数,当这个指针被用来调用其所指向的函数时,这是回调函数。当小程序应用传递一个回调函数给插件时,插件内部可以调用该回调函数,当插件内部调用回调函数时访问的是小程序应用自身的数据服务端。也就是说,在小程序应用运行时,小程序应用调用插件接口时,在进入插件接口内部时,上下文切换到插件上下文。如果小程序应用传递了回调函数给到插件,在插件内部调用回调函数的时候,在进入到回调函数内部的时候,上下文切换回小程序应用上下文。实现了插件可以间接的在小程序应用允许的方位内,访问小程序应用的数据,控制小程序应用的行为,这种机制保证了两边上下文的安全隔离,同时可以灵活实现小程序应用和插件之间的数据交换和互相调用。
在上述实施例的基础上,本说明书一些实施例中,若通过调用所述插件中的调用接口的方式加载所述插件,所述方法还包括:接收所述插件通过所述调用接口返回的执行所述小程序访问请求的执行结果。
在具体的实施过程中,插件本身也可以通过提供调用接口的方式供小程序应用加载插件,这样小程序应用和插件之间可以按约定的组件属性和接口双向通讯。即插件可以通过调用接口向小程序应用返回执行小程序访问请求后的执行结果,如:信用分值满足条件等。
图3是本说明书又一个实施例中数据处理方法的流程示意图,如图3所示,本说明书还可以提供一种可以应用在插件中的数据处理方法,该插件拥有独立的数据服务端,该方法可以包括:步骤302、向服务器发送发布上线请求。
在具体的实施过程中,本说明书实施例中的插件可以理解为一个独立的功能模块,可以由小程序应用集成使用,运行时上下文以及权限和小程序应用独立,插件开发者可以是独立于小程序应用开发者的公司或个人。插件开发者可以使用小程序应用的开发工具对插件进行开发和构建,当插件开发构建完成后,插件开发者可以向服务器即图1中的平台服务器发送发布上线请求,请求将插件在服务器中上线发布。插件中会包括插件代码文件夹,本说明书实施例中的插件还可以包括组件、页面和调用接口,向小程序应用开放的组件、页面、代用接口可以在配置声明文件中声明,以供小程序应用在加载插 件时使用。本说明书实施例中的插件可以是不同的插件开发者开发创建的,插件的创建者与加载插件的小程序应用的创建者之间没有必然的联系,创建出的插件发布在服务器中后,均可以供小程序应用使用。
步骤304、接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识。
在具体的实施过程中,服务器在接收到插件开发者的发布上线请求后,可以对发布的插件进行审核,如:审核插件是否合法、是否能够供其他小程序应用使用等。当审核通过后,服务器可以将该插件上线到服务器中,同时,服务器可以向插件返回一个插件上线信息,该插件上线信息中可以包括插件标识。插件标识可以是服务器为插件分配的能够唯一标识插件的字符串,服务器还可以为插件分配相应的权限,如:定义插件可以访问服务器的哪些数据等。
步骤306、接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用。
在具体的实施过程中,插件在服务器中发布上线后,小程序应用可以通过服务器与插件建立使用关联关系,当小程序应用需要使用插件对应的服务时,则可以选择加载插件,插件即可以接收到小程序应用发送的加载请求。
本说明书一些实施例中,所述插件中包括组件、页面、调用接口中的至少一个,所述接收小程序应用基于使用关联关系的加载请求的方法包括下述至少一种:接收所述小程序应用发送的嵌入所述插件中的组件的请求;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;接收所述小程序应用发送的调用所述插件中的调用接口的请求;接收所述小程序应用添加所述插件中页面的链接的请求。
在具体的实施过程中,小程序应用可以通过嵌入插件中的组件来加载插件,或者也可以通过调用插件中的调用接口来加载插件,还可以通过添加插件中的页面的链接来加载插件,具体可以根据实际使用情况而定,本说明书实施例不作具体限定。通过嵌入组件的形式加载插件时,可以根据插件中组件的组件属性实现小程序应用和插件之间的单向通讯,即可以通过自定义组件属性传递数据:插件里面的组件可以定义组件属性,所需要的数据可由小程序应用在嵌入自定义组件的时候从小程序应用单向传递给插件。该组件可以支持上下文隔离,小程序应用嵌入插件里面自定义组件的时候,自定义组件是运行在插件上下文中的,这样实现了数据和权限的隔离,克服了普通自定义组件上下文和小程序应用不能隔离而引来的问题。通过调用接口加载插件时,插件暴露给小程序应用调用接口,小程序可以调用这些调用接口,并传递插件所需要的数据,并且可以实现插件和小程序应用的双向通讯,本说明书一些实施例中,插件可以通过小程序应用调用的调用接口向小程序应用返回小程序访问请求的执行结果。通过页面加载插件,则小 程序可以在跳转到插件页面的同时,实现了上下文的隔离,即数据权限和宿主小程序进行隔离。用户可以根据实际的应用场景,选择合适的加载方式加载插件,如:有些常见可能需要将插件嵌入到小程序应用中,才能实现更好的效果,这样可以选择嵌入组件的方式加载插件,有些业务场景可能通过调用接口更好,或者页面跳转的方式更好,具体可以根据实际需要进行选择,本说明书实施例可以提供多种插件加载的方式,并且每一种方式均能够实现插件与小程序应用的数据隔离。
步骤308、接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
在具体的实施过程中,小程序应用加载插件后,可以向插件发送小程序访问请求,插件则可以运行自身的代码,并通过访问插件自身的数据服务端完成小程序访问请求对应的服务,如:查询用户信用值、开具发票等等,本说明书实施例不作具体限定。小程序开发者在插件发布上线后,可以在开放平台订购插件,并请求把小程序和插件建立起使用关系。小程序应用在开发的时候,可以通过插件标识引用插件,通过小程序开发工具构建、上传和发布后,小程序容器在运行小程序的时候,在需要运行插件的地方,对插件进行加载,并对插件在运行时生成独立的上下文。小程序应用在运行时,可以通过小程序上下文访问小程序自身的数据,获得小程序本身的权限。小程序应用加载插件并运行的时候,插件内的代码运行在插件自身的上下文中,可以访问插件自身的数据,或者插件自身的权限。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问宿主小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限。
本说明书实施例提供的数据处理方法,插件运行的上下文和加载了插件的小程序应用进行隔离,这样使插件的数据权限和小程序应用的数据和权限进行了隔离,同时插件提供了机制支持可以嵌入的自定义组件、可以跳转的插件页面以及可调用的接口供小程序应用嵌入、跳转和调用,且在调用过程中,上下文随着调用实际发生在插件还是小程序应用内,自动进行切换,这样既保证数据安全性,又保证了多种应用场景的伸缩性。上述的能力使得插件本身可以成为一个可以结合前后端服务的自闭环的业务和商业服务能力,而不仅仅是一些界面元素的组合。
在上述实施例的基础上,本说明书一些实施例中,所述插件中包括调用接口,所述方法还包括:
接收所述小程序应用通过所述调用接口发送的回调函数,在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
在具体的实施过程中,若小程序应用使用调用接口的方式加载插件,则小程序可以通过调用接口向插件传递回调函数,回调函数可以理解为一个通过函数指针调用的函数,如果把函数的指针(地址)作为参数传递给另一个函数,当这个指针被用来调用其 所指向的函数时,这是回调函数。当小程序应用传递一个回调函数给插件时,插件内部可以调用该回调函数,当插件内部调用回调函数时访问的是小程序应用自身的数据服务端。也就是说,在小程序应用运行时,小程序应用调用插件接口时,在进入插件接口内部时,上下文切换到插件上下文。如果小程序应用传递了回调函数给到插件,在插件内部调用回调函数的时候,在进入到回调函数内部的时候,上下文切换回小程序应用上下文。实现了插件可以间接的在小程序应用允许的方位内,访问小程序应用的数据,控制小程序应用的行为,这种机制保证了两边上下文的安全隔离,同时可以灵活实现小程序应用和插件之间的数据交换和互相调用。
本说明书中上述方法的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参考即可,每个实施例重点说明的都是与其他实施例的不同之处。相关之处参考方法实施例的部分说明即可。
基于上述所述的数据处理方法,本说明书一个或多个实施例还提供一种用于数据处理的系统。所述系统可以包括使用了本说明书实施例所述方法的系统(包括分布式系统)、软件(应用)、模块、组件、服务器、客户端等并结合必要的实施硬件的装置。基于同一创新构思,本说明书实施例提供的一个或多个实施例中的装置如下面的实施例所述。由于装置解决问题的实现方案与方法相似,因此本说明书实施例具体的装置的实施可以参考前述方法的实施,重复之处不再赘述。以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
具体地,图4是本说明书提供的数据处理装置一个实施例的模块结构示意图,该装置即应用上述实施例中的小程序应用中,如图4所示,本说明书中提供的数据处理装置可以包括:插件选择模块41,可以用于向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端;插件加载模块42,可以用于接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;插件运行模块43,可以用于向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
本说明书实施例提供的数据处理装置,通过能够支持上下文隔离的插件,实现了数据和权限的隔离,克服了普通自定义组件上下文和小程序应用不能隔离而引来的问题。插件体系里面还包含开放平台数据、权限与研发支撑体系,这样插件可以建立单独的应用标识,并以标准化的流程进行独立的发版,这样使得插件无需和小程序应用框架捆绑在一起,解决了安全性问题,同时也适用于小程序框架组织架构以外的第三方所有团队,扩大了插件开发者的适用范围。
本说明书一些实施例中,所述装置还包括小程序运行模块,用于:在所述小程序访问请求与所述插件对应的服务不满足所述预设对应关系时,运行所述小程序应用,通过访问所述小程序应用自身的数据服务端,完成所述小程序访问请求对应的任务。
本说明书实施例提供的数据处理装置,小程序应用在运行时,可以通过小程序上下文访问小程序自身的数据,获得小程序本身的权限。小程序加载插件并运行的时候,插件内的代码运行在插件自身的上下文中,可以访问插件自身的数据,或者插件自身的权限。小程序不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限,实现了数据的隔离。
本说明书一些实施例中,所述插件中包括组件、页面、调用接口中的至少一个,所述插件加载模块具体用于采用下述至少一种方法加载所述插件:在所述小程序应用中嵌入所述插件中的组件;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;调用所述插件中的调用接口;在所述小程序应用中添加所述插件中页面的链接。
本说明书实施例提供的数据处理装置,用户可以根据实际的应用场景,选择合适的加载方式加载插件,如:有些常见可能需要将插件嵌入到小程序应用中,才能实现更好的效果,这样可以选择嵌入组件的方式加载插件,有些业务场景可能通过调用接口更好,或者页面跳转的方式更好,具体可以根据实际需要进行选择,本说明书实施例可以提供多种插件加载的方式,并且每一种方式均能够实现插件与小程序应用的数据隔离。
本说明书一些实施例中,若所述插件加载模块通过调用所述插件中的调用接口的方式加载所述插件,则所述插件运行模块还用于:通过所述调用接口向所述插件发送回调函数,以使得所述插件在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
图5是本说明书又一个实施例中数据处理装置的结构示意图,如图5所示,该装置可以应用在拥有独立的数据服务端的插件中,所述装置包括:发布上线模块51,用于向服务器发送发布上线请求;标识接收模块52,用于接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;加载请求接收模块53,用于接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;运行模块54,用于接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
本说明书实施例提供的数据处理装置,提供一种拥有独立数据服务端的插件,该插件可以供小程序应用使用,当小程序应用加载插件时,在需要使用插件的服务时,运行插件,以使得插件访问自身的数据服务端,完成对应的服务,在不需要插件的服务时, 只需要运行小程序应用本身,访问小程序应用自身的数据服务端。小程序应用不能直接访问插件的上下文,即小程序无法访问插件内部的数据,也不能获得插件的权限,反之,插件也不能直接访问小程序的上下文,即插件无法访问小程序内部的数据,也不能获得小程序的权限。实现了插件与小程序数据和权限的隔离,确保了数据的隐私和安全性,同时,能够灵活实现小程序应用和插件之间的数据交互、调用。
需要说明的,上述所述的装置根据对应方法实施例的描述还可以包括其他的实施方式。具体的实现方式可以参照上述对应的方法实施例的描述,在此不作一一赘述。
本说明书实施例还提供一种数据处理设备,包括:至少一个处理器以及用于存储处理器可执行指令的存储器,所述处理器执行所述指令时实现上述实施例的数据处理方法,如:向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端;接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
或,向服务器发送发布上线请求;接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
需要说明的,上述所述的设备和系统根据方法实施例的描述还可以包括其他的实施方式。具体的实现方式可以参照相关方法实施例的描述,在此不作一一赘述。
本说明书提供的数据处理装置,也可以应用在多种数据分析处理系统中。所述系统或服务器或终端或设备可以为单独的服务器,也可以包括使用了本说明书的一个或多个所述方法或一个或多个实施例系统或服务器或终端或设备的服务器集群、系统(包括分布式系统)、软件(应用)、实际操作装置、逻辑门电路装置、量子计算机等并结合必要的实施硬件的终端装置。所述核对差异数据的检测系统可以包括至少一个处理器以及存储计算机可执行指令的存储器,所述处理器执行所述指令时实现上述任意一个或者多个实施例中所述方法的步骤。
本说明书实施例所提供的方法实施例可以在移动终端、计算机终端、服务器或者类似的运算装置中执行。以运行在服务器上为例,图6是本说明书一个实施例中数据处理服务器的硬件结构框图,该计算机终端可以是上述实施例中的数据处理服务器或数据处理装置。如图6所示服务器10可以包括一个或多个(图中仅示出一个)处理器100(处理器100可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、 用于存储数据的非易失性存储器200、以及用于通信功能的传输模块300。本领域普通技术人员可以理解,图6所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,服务器10还可包括比图6中所示更多或者更少的组件,例如还可以包括其他的处理硬件,如数据库或多级缓存、GPU,或者具有与图6所示不同的配置。
非易失性存储器200可用于存储应用软件的软件程序以及模块,如本说明书实施例中的数据处理方法对应的程序指令/模块,处理器100通过运行存储在非易失性存储器200内的软件程序以及模块,从而执行各种功能应用以及资源数据更新。非易失性存储器200可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,非易失性存储器200可进一步包括相对于处理器100远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端。上述网络的实例包括但不限于互联网、企业内部网、局与网、移动通信网及其组合。
传输模块300用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端的通信供应商提供的无线网络。在一个实例中,传输模块300包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输模块300可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本说明书提供的上述实施例所述的方法或装置可以通过计算机程序实现业务逻辑并记录在存储介质上,所述的存储介质可以计算机读取并执行,实现本说明书实施例所描述方案的效果,如:接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
或,向服务器发送发布上线请求;接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
所述存储介质可以包括用于存储信息的物理装置,通常是将信息数字化后再以利 用电、磁或者光学等方式的媒体加以存储。所述存储介质有可包括:利用电能方式存储信息的装置如,各式存储器,如RAM、ROM等;利用磁能方式存储信息的装置如硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置如CD或DVD。当然,还有其他方式的可读存储介质,例如量子存储器、石墨烯存储器等等。
本说明书实施例提供的上述数据处理方法或装置可以在计算机中由处理器执行相应的程序指令来实现,如使用windows操作系统的C++语言在PC端实现、linux系统实现,或其他例如使用android、iOS系统程序设计语言在智能终端实现,以及基于量子计算机的处理逻辑实现等。
需要说明的是说明书上述所述的装置、计算机存储介质、系统根据相关方法实施例的描述还可以包括其他的实施方式,具体的实现方式可以参照对应方法实施例的描述,在此不作一一赘述。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参考即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于硬件+程序类实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参考方法实施例的部分说明即可。
本说明书实施例并不局限于必须是符合行业通信标准、标准计算机资源数据更新和数据存储规则或本说明书一个或多个实施例所描述的情况。某些行业标准或者使用自定义方式或实施例描述的实施基础上略加修改后的实施方案也可实现上述实施例相同、等同或相近、或变形后可预料的实施效果。应用这些修改或变形后的数据获取、存储、判断、处理方式等获取的实施例,仍然可属于本说明书实施例的可选实施方案范围之内。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University  Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、车载人机交互设备、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
虽然本说明书一个或多个实施例提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或终端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式资源数据更新环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书一个或多个时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可 以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本发明是参照根据本发明实施例的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程资源数据更新设备的处理器以产生一个机器,使得通过计算机或其他可编程资源数据更新设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程资源数据更新设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程资源数据更新设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储、石墨烯存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
本领域技术人员应明白,本说明书一个或多个实施例可提供为方法、系统或计算 机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参考即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参考方法实施例的部分说明即可。在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
以上所述仅为本说明书一个或多个实施例的实施例而已,并不用于限制本说明书一个或多个实施例。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在权利要求范围之内。

Claims (17)

  1. 一种数据处理方法,应用在小程序应用中,所述方法包括:
    向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端;
    接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;
    向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
  2. 如权利要求1所述的方法,所述方法还包括:
    若判断所述小程序访问请求与所述插件对应的服务不满足所述预设对应关系,则运行所述小程序应用,通过访问所述小程序应用自身的数据服务端,完成所述小程序访问请求对应的任务。
  3. 如权利要求1所述的方法,所述插件中包括组件、页面、调用接口中的至少一个,所述加载所述插件的方法包括下述至少一种:
    在所述小程序应用中嵌入所述插件中的组件;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;
    调用所述插件中的调用接口;
    在所述小程序应用中添加所述插件中页面的链接。
  4. 如权利要求3所述的方法,若通过调用所述插件中的调用接口的方式加载所述插件,所述方法还包括:
    通过所述调用接口向所述插件发送回调函数,以使得所述插件在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
  5. 如权利要求3所述的方法,若通过调用所述插件中的调用接口的方式加载所述插件,所述方法还包括:
    接收所述插件通过所述调用接口返回的执行所述小程序访问请求的执行结果。
  6. 如权利要求1所述的方法,所述插件中包括配置声明文件,所述配置声明文件中包括对小程序应用开放的组件、页面、调用接口中的至少一个;所述根据所述使用关联关系加载所述插件,包括:
    根据所述使用关联关系获取所述插件的配置声明文件;
    根据所述配置声明文件通过所述插件对小程序应用开放的组件、页面或调用接口加载所述插件。
  7. 一种数据处理方法,应用于拥有独立的数据服务端的插件中,所述方法包括:
    向服务器发送发布上线请求;
    接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;
    接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;
    接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
  8. 如权利要求7所述的方法,所述插件中包括组件、页面、调用接口中的至少一个,所述接收小程序应用基于使用关联关系的加载请求的方法包括下述至少一种:
    接收所述小程序应用发送的嵌入所述插件中的组件的请求;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;
    接收所述小程序应用发送的调用所述插件中的调用接口的请求;
    接收所述小程序应用添加所述插件中页面的链接的请求。
  9. 如权利要求8所述的方法,所述插件中包括调用接口,所述方法还包括:
    接收所述小程序应用通过所述调用接口发送的回调函数,在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
  10. 如权利要求8所述的方法,所述小程序应用通过调用所述插件中的调用接口的方式加载所述插件,所述方法还包括:
    通过所述调用接口向所述小程序应用返回执行所述小程序访问请求的执行结果。
  11. 一种数据处理装置,应用在小程序应用中,所述装置包括:
    插件选择模块,用于向服务器发送插件服务请求,所述插件服务请求包括插件标识,以使得所述服务器将所述插件标识对应的插件与所述小程序应用建立使用关联关系;其中,所述插件拥有独立的数据服务端;
    插件加载模块,用于接收小程序访问请求,判断所述小程序访问请求与所述插件对应的服务是否满足预设对应关系,若是,则根据所述使用关联关系加载所述插件;
    插件运行模块,用于向所述插件发送所述小程序访问请求,以使得所述插件通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
  12. 如权利要求11所述的装置,所述装置还包括小程序运行模块,用于:
    在所述小程序访问请求与所述插件对应的服务不满足所述预设对应关系时,运行所述小程序应用,通过访问所述小程序应用自身的数据服务端,完成所述小程序访问请求对应的任务。
  13. 如权利要求11所述的装置,所述插件中包括组件、页面、调用接口中的至少一个,所述插件加载模块具体用于采用下述至少一种方法加载所述插件:
    在所述小程序应用中嵌入所述插件中的组件;所述组件被设置有组件属性,所述组件属性用于使得所述小程序应用向所述插件发送小程序访问请求;
    调用所述插件中的调用接口;
    在所述小程序应用中添加所述插件中页面的链接。
  14. 如权利要求13所述的装置,若所述插件加载模块通过调用所述插件中的调用接口的方式加载所述插件,则所述插件运行模块还用于:
    通过所述调用接口向所述插件发送回调函数,以使得所述插件在调用所述回调函数时,访问所述小程序应用自身的数据服务端。
  15. 一种数据处理装置,应用于拥有独立的数据服务端的插件中,所述装置包括:
    发布上线模块,用于向服务器发送发布上线请求;
    标识接收模块,用于接收所述服务器在审核通过上线所述插件的插件上线信息,所述插件上线信息中包括插件标识;
    加载请求接收模块,用于接收小程序应用基于使用关联关系的加载请求,其中,所述小程序应用为所述服务器根据所述插件标识与所述插件建立使用关联关系的小程序应用;
    运行模块,用于接收所述小程序应用加载所述插件后发送的小程序访问请求,并通过访问所述插件自身的数据服务端,完成所述小程序访问请求对应的任务。
  16. 一种数据处理系统,包括:平台服务器、多个小程序应用、多个插件,其中,所述插件和所述小程序应用分别拥有独立的数据服务端;
    所述平台服务器用于发布上线所述插件,并接收小程序应用发送的插件服务请求,基于所述插件服务请求建立小程序应用和插件之间的使用关联关系;
    所述小程序应用运行时,通过访问小程序应用自身的数据服务端,获取所述小程序应用的权限;
    当所述小程序应用插件的服务时,所述小程序应用基于所述使用关联关系加载对应的插件,并通过访问加载的插件自身的数据服务端,访问所述插件的权限或所述插件自身的数据。
  17. 一种数据处理设备,包括:至少一个处理器以及用于存储处理器可执行指令的存储器,所述处理器执行所述指令时实现权利要求1-10任一项所述的方法。
PCT/CN2021/102074 2020-07-08 2021-06-24 一种数据处理方法、装置、设备及系统 WO2022007638A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010651082.1 2020-07-08
CN202010651082.1A CN111782300B (zh) 2020-07-08 2020-07-08 一种数据处理方法、装置、设备及系统

Publications (1)

Publication Number Publication Date
WO2022007638A1 true WO2022007638A1 (zh) 2022-01-13

Family

ID=72759614

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102074 WO2022007638A1 (zh) 2020-07-08 2021-06-24 一种数据处理方法、装置、设备及系统

Country Status (3)

Country Link
US (1) US11379248B2 (zh)
CN (1) CN111782300B (zh)
WO (1) WO2022007638A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782300B (zh) * 2020-07-08 2022-02-08 支付宝(杭州)信息技术有限公司 一种数据处理方法、装置、设备及系统
CN112307371B (zh) * 2020-10-27 2024-03-22 支付宝(杭州)信息技术有限公司 小程序子服务识别方法、装置、设备及存储介质
US11544373B2 (en) * 2020-12-18 2023-01-03 Huawei Technologies Co., Ltd. Method and system for application security
CN112738219B (zh) * 2020-12-28 2022-06-10 中国第一汽车股份有限公司 程序运行方法、装置、车辆及存储介质
CN113391854A (zh) * 2021-06-16 2021-09-14 湖南快乐阳光互动娱乐传媒有限公司 一种宿主应用程序与小程序的通信方法及装置
CN113687891A (zh) * 2021-07-19 2021-11-23 阿里巴巴新加坡控股有限公司 数据管理方法、装置及设备
CN114168215B (zh) * 2021-11-17 2024-03-19 广东太平洋互联网信息服务有限公司 一种多个小程序功能模块插件化处理方法、系统及介质
CN114037503A (zh) * 2022-01-07 2022-02-11 浙江口碑网络技术有限公司 一种订单处理方法以及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407130A (zh) * 2015-09-25 2016-03-16 成都趣点科技有限公司 一种移动端插件系统及移动端插件处理方法
CN109032691A (zh) * 2018-06-25 2018-12-18 腾讯科技(深圳)有限公司 一种小程序运行方法、装置及存储介质
US20190303123A1 (en) * 2018-03-30 2019-10-03 Barracuda Networks, Inc. System and method for application plug-in distribution
CN111371676A (zh) * 2020-03-03 2020-07-03 腾讯科技(深圳)有限公司 一种客服功能接入方法和相关装置
CN111782300A (zh) * 2020-07-08 2020-10-16 支付宝(杭州)信息技术有限公司 一种数据处理方法、装置、设备及系统

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6571389B1 (en) * 1999-04-27 2003-05-27 International Business Machines Corporation System and method for improving the manageability and usability of a Java environment
US20020124100A1 (en) * 1999-05-20 2002-09-05 Jeffrey B Adams Method and apparatus for access to, and delivery of, multimedia information
US20040098306A1 (en) * 2002-09-30 2004-05-20 Fitzpatrick Brian F. Platform system and method for extending sales and use of a resource of motivational programs
US7748020B2 (en) * 2002-10-08 2010-06-29 Canon Kabushiki Kaisha Receiving apparatus and method for processing interruptions in streaming broadcasts
KR100548328B1 (ko) * 2003-02-19 2006-02-02 엘지전자 주식회사 보상 서비스 제공 시스템 및 이동 통신 단말기의 보상 차원 애플릿 다운로드 서비스 방법
US7159954B2 (en) * 2003-12-29 2007-01-09 Bendix Commercial Vehicle Systems, Llc ABS control system for off-road driving conditions
US8489715B2 (en) * 2011-06-29 2013-07-16 Cisco Technology, Inc. Identifying and downloading an application associated with a service registered in a home network
CN103297381B (zh) * 2012-02-22 2017-01-18 阿里巴巴集团控股有限公司 一种基于插件的业务访问方法及其系统
US8938796B2 (en) * 2012-09-20 2015-01-20 Paul Case, SR. Case secure computer architecture
US9405932B2 (en) * 2013-05-24 2016-08-02 Microsoft Technology Licensing, Llc User centric data maintenance
CN103823697B (zh) * 2014-02-27 2018-06-05 百度在线网络技术(北京)有限公司 应用的跨平台实现方法、系统以及插件管理器
CN105094861A (zh) * 2014-05-06 2015-11-25 腾讯科技(深圳)有限公司 网页应用程序加载方法、装置及系统
CN108319990A (zh) * 2017-01-16 2018-07-24 上海浩创亘永科技有限公司 一种通过微信小程序替代手写纸质面单的方法
CN108737325B (zh) * 2017-04-13 2021-01-08 华为技术有限公司 一种多租户数据隔离方法、装置及系统
CN110032358B (zh) * 2019-01-03 2022-08-09 创新先进技术有限公司 一种应用程序生成方法、装置、设备及系统
CN110083789B (zh) * 2019-04-29 2021-08-06 百度在线网络技术(北京)有限公司 一种小程序页面获取方法、服务器、客户端及电子设备
CN109995882A (zh) * 2019-05-07 2019-07-09 东莞市商二信息科技有限公司 一种基于微服务化的移动应用系统
CN110941551B (zh) * 2019-11-21 2021-04-30 腾讯科技(深圳)有限公司 一种应用卡顿检测方法、装置、设备及计算机存储介质
CN111159614B (zh) * 2019-12-30 2021-02-02 北京金堤科技有限公司 网页资源获取方法以及装置
CN111381903B (zh) * 2020-03-18 2023-05-26 支付宝(杭州)信息技术有限公司 程序运行方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407130A (zh) * 2015-09-25 2016-03-16 成都趣点科技有限公司 一种移动端插件系统及移动端插件处理方法
US20190303123A1 (en) * 2018-03-30 2019-10-03 Barracuda Networks, Inc. System and method for application plug-in distribution
CN109032691A (zh) * 2018-06-25 2018-12-18 腾讯科技(深圳)有限公司 一种小程序运行方法、装置及存储介质
CN111371676A (zh) * 2020-03-03 2020-07-03 腾讯科技(深圳)有限公司 一种客服功能接入方法和相关装置
CN111782300A (zh) * 2020-07-08 2020-10-16 支付宝(杭州)信息技术有限公司 一种数据处理方法、装置、设备及系统

Also Published As

Publication number Publication date
CN111782300A (zh) 2020-10-16
US11379248B2 (en) 2022-07-05
US20220012068A1 (en) 2022-01-13
CN111782300B (zh) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2022007638A1 (zh) 一种数据处理方法、装置、设备及系统
US9928038B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
CN110311989B (zh) 一种灰度发布方法、装置、存储介质、设备及系统
CN108091384B (zh) 一种基于微服务框架的医学影像处理系统
US9959426B2 (en) Method and apparatus for specifying time-varying intelligent service-oriented model
US10055393B2 (en) Distributed version control of orchestration templates
CN114329406A (zh) 一种资源处理方法、装置及设备
US9122559B2 (en) Extensible dependency management framework and method
CN112930530B (zh) 用于网络应用程序执行的客户端应用程序
US20180246916A1 (en) Scalable object service data and metadata overflow
CN111371851B (zh) 一种连接方法、装置及电子设备和存储介质
US10776180B1 (en) Expression-based feature toggle in an application programming interface (API)
US9141353B2 (en) Dynamically building locale objects at run-time
CN113742108A (zh) 服务调用方法和装置、电子设备和计算机可读存储介质
US9298473B2 (en) System and method for a generic object access layer
CN109614089B (zh) 数据访问代码的自动生成方法、装置、设备及存储介质
US8028274B2 (en) Integrating loosely coupled tools using contracts and references
US10101920B2 (en) Disk I/O attribution
CN112596929B (zh) 基于命令事件转换的微服务注册、调用方法及相关装置
CN112686533A (zh) 一种资源分配方法、设备、介质及电子设备
Dorasamy et al. Sandbox
US9778917B2 (en) Dynamically building subsections of locale objects at run-time
CN114661426A (zh) 容器管理方法、装置、电子设备及存储介质
US10083214B1 (en) Method and system for a flexible ADO.NET provider based on a customized dynamic-link library
Kim et al. Applying CBD to Build Mobile Service Applications

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

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

Country of ref document: EP

Kind code of ref document: A1