CN114510296B - Applet storage calling method, device and equipment - Google Patents

Applet storage calling method, device and equipment Download PDF

Info

Publication number
CN114510296B
CN114510296B CN202210180329.5A CN202210180329A CN114510296B CN 114510296 B CN114510296 B CN 114510296B CN 202210180329 A CN202210180329 A CN 202210180329A CN 114510296 B CN114510296 B CN 114510296B
Authority
CN
China
Prior art keywords
storage
applet
client
cache
data
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202210180329.5A
Other languages
Chinese (zh)
Other versions
CN114510296A (en
Inventor
曾家龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210180329.5A priority Critical patent/CN114510296B/en
Publication of CN114510296A publication Critical patent/CN114510296A/en
Priority to PCT/CN2023/071496 priority patent/WO2023160289A1/en
Application granted granted Critical
Publication of CN114510296B publication Critical patent/CN114510296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/44589Program code verification, e.g. Java bytecode verification, proof-carrying code
    • 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

Abstract

The embodiment of the specification discloses an applet storage calling method, device and equipment. The scheme comprises the following steps: before the applet will initiate a storage API call request to the client, accessing the applet's own cache; checking whether the cache of the applet stores the storage data aimed at by the storage API call request or not; if yes, filtering the storage API call request for the client, and realizing the storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet; otherwise, a storage API call request is initiated to the client.

Description

Applet storage calling method, device and equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, and a device for invoking applet storage.
Background
With the development of technology, application integration functions are increasing.
Currently, the client of one application can be loaded with the applets corresponding to other different applications, so that a user can operate the other applications in the client of the application only through the applets of the other applications without installing the client, thereby providing convenience for the user. In the running process of the applet, the applet needs to borrow the storage space of the client to store data and frequently interact with the client.
Based on this, a more efficient applet storage calling scheme is needed.
Disclosure of Invention
One or more embodiments of the present disclosure provide an applet storage calling method, apparatus, device, and storage medium, to solve the following technical problems: there is a need for a more efficient applet storage calling scheme.
To solve the above technical problems, one or more embodiments of the present specification are implemented as follows:
one or more embodiments of the present disclosure provide an applet storage calling method, where the applet runs on a client, the method including:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client.
One or more embodiments of the present disclosure provide an applet storage calling apparatus, where the applet runs on a client, the apparatus including:
The access module is used for accessing the cache of the applet before the applet is required to initiate a storage API call request to the client;
the verification module is used for verifying whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
the implementation module is used for filtering the storage API call request for the client and implementing storage related operation corresponding to the storage API call request according to the storage data in the self cache of the applet when the result of the verification module is yes;
and the initiating module initiates the storage API call request to the client under the condition that the result of the checking module is negative.
One or more embodiments of the present specification provide an applet storage invocation apparatus, the applet running on a client, the apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
Accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client.
One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer-executable instructions configured to:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
Otherwise, the storage API call request is initiated to the client.
The above-mentioned at least one technical solution adopted by one or more embodiments of the present disclosure can achieve the following beneficial effects:
when the applet needs to call the stored data, the cache of the applet is checked to determine whether the needed data exists. If present, the call may be made directly without requesting the call from the client. If not, then initiates a request for storing API call to the client. Therefore, the efficiency of the small program storage data calling can be improved, particularly, the unnecessary interaction between the small program and the client side is reduced aiming at the operations of repeated writing, reading and the like of the storage data, so that the extra communication cost and the performance cost of the small program operation are reduced, the fluency of the small program operation is improved, and the operation blocking of the small program is improved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of an applet store call method provided in one or more embodiments of the present disclosure;
FIG. 2 (a) is a schematic diagram of memory writing in an application scenario;
FIG. 2 (b) is a schematic diagram of asynchronous writing of storage in an application scenario provided by one or more embodiments of the present disclosure;
FIG. 3 is a schematic diagram illustrating error key recording in an application scenario according to one or more embodiments of the present disclosure;
FIG. 4 is a detailed flowchart of the method of FIG. 1 in an application scenario provided by one or more embodiments of the present disclosure;
FIG. 5 is a schematic diagram of an applet store call device according to one or more embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of an applet storage calling device according to one or more embodiments of the present disclosure.
Detailed Description
The embodiment of the specification provides an applet storage calling method, device, equipment and storage medium.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
In one or more embodiments of the present disclosure, when an applet needs to make a storage application program interface (Application Programming Interface, API) call, the applet's own cache is first checked, and when it is determined that there is corresponding storage data in the applet's own cache, the applet's own cache can be directly called without sending a storage API call request to the client. When the fact that the corresponding storage data does not exist in the cache of the applet is determined, a storage API call request is initiated to the client. Therefore, communication interaction between the applet and the client can be reduced, communication overhead is reduced, high efficiency of the applet for storing data call is improved, and reaction rate of the applet is improved. The following will specifically explain the concept.
Fig. 1 is a schematic flow diagram of an applet storage calling method according to one or more embodiments of the present disclosure. The method can be applied to different business fields, such as the field of electric business, the field of instant messaging business, the field of public business, the field of payment business and the like. The process may be performed by a computing device in the relevant field (e.g., a mobile terminal held by a user in a payment service, etc.), with some input parameters or intermediate results in the process allowing for manual intervention adjustments to help improve accuracy.
The flow in fig. 1 may include the steps of:
s102: before the applet will initiate a store API call request to the client, the applet's own cache is accessed.
The relation between the applet and the client is a dependent relation, the applet operates on the client, persistent storage of storage data is carried out through a storage space of the client, interaction is carried out with the client based on a storage API provided by the client, and calling of the storage data is carried out.
In one or more embodiments of the present description, the cache of the applet itself is a temporary storage that relies on the applet itself, typically found in a terminal held by the user, such as a cell phone, tablet, computer, etc. While the storage space of the client typically also includes storage space hosted in the server. The applet's own cache exists over the applet's lifecycle, independent of the client's storage space. Wherein the lifecycle of the applet indicates the period of time that the applet in the client lasts from activation to deactivation in one use.
When the applet calls the stored data from the own cache, the applet can directly call without calling the storage API, so that the efficiency of calling the stored data can be improved, the reaction rate of the applet is improved, unnecessary interaction between the applet and the client is reduced, and the interactive workload is reduced. Thus, the storage of the applet in its own cache may also be referred to as near-end storage.
S104: and checking whether the storage data aimed by the storage API call request is stored in the cache of the applet.
When the applet needs to call the stored data, check query can be performed on the cache of the applet itself to determine whether the required stored data is stored therein, so as to determine whether the storage API of the client needs to be called. The verification mode can be determined through the form of the stored data, for example, matching is performed according to key value pairs of the stored data.
S106: if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the self cache of the applet.
If the needed storage data exists in the self cache of the applet, the applet can directly acquire the needed storage data from the self cache without sending a storage API call request to the client. The applet may then perform storage related operations, including storage write operations, storage read operations, storage update operations, storage delete operations, etc., based on the stored data in its own cache.
S108: otherwise, the storage API call request is initiated to the client.
If the applet does not have the required storage data in its own cache, the applet needs to initiate a storage API call request to the client to obtain the required storage data from the storage space of the client.
In one or more embodiments of the present disclosure, when the applet needs to call to store data, the applet's own cache is checked to determine if the required data exists. If present, the call may be made directly without requesting the call from the client. If not, then initiates a request for storing API call to the client. Therefore, the efficiency of the small program storage data calling can be improved, particularly, the unnecessary interaction between the small program and the client side is reduced aiming at the operations of repeated writing, reading and the like of the storage data, so that the extra communication cost and the performance cost of the small program operation are reduced, the fluency of the small program operation is improved, and the operation blocking of the small program is improved.
Based on the method of fig. 1, the present specification also provides some specific embodiments and extensions of the method, and the following description will proceed.
In one or more embodiments of the present description, the applet performs a store write operation to the applet's own cache and client, respectively, when performing the store write operation. On the one hand, the storage writing operation is executed on the self cache of the small program, so that the data to be written corresponding to the small program is written into the self cache of the small program. And on the other hand, a storage API call request is initiated to the client so that the client can persist the data to be written corresponding to the applet in the storage space corresponding to the client by executing the storage write operation.
The cache of the applet is relatively independent of the storage space of the client, and the storage space corresponding to the client does not belong to the applet and does not comprise the cache of the applet. The stored data in the cache of the applet itself is temporary storage, which disappears with the expiration of the applet lifecycle, and the stored data in the storage space of the client is persistent storage, which does not change with the applet lifecycle.
The storage data is written into the self cache of the applet, so that the applet can directly call the storage data from the self cache, the call efficiency is improved, the storage data is also written into the storage space of the client, the storage data can be stored in a lasting mode, the applet can retain related storage memory when the next life cycle of the applet is started, and convenience is provided for users.
Further, when the applet performs a storage write operation to the client, risk filling data is generated according to data to be written corresponding to the applet. And according to the risk filling data, initiating a storage API call request to the client so that the client firstly persists the risk filling data in a storage space corresponding to the client, and when the life cycle of the applet is finished, replacing the persisted risk filling data in the storage space corresponding to the client with data to be written corresponding to the applet by executing a storage write operation.
The risk filling data represents data related to the data to be written but hiding the real information in the data to be written. Specifically, according to the set corresponding relation, splitting, converting, sequencing and the like can be performed on the data to be written to obtain risk filling data. The risk filling data may be represented as data completely unrelated to the data to be written, or as data comprising non-private parts of the data to be written.
During the life cycle duration of the applet, the storage space of the client stores risk filling data, namely the client cannot know the real information in the data to be written, so that the safety of the data to be written can be ensured, and even if the client has the risk of data leakage, the real information of the data to be written cannot be leaked. And when the life cycle of the applet is finished, the stored risk filling data is replaced by the data to be written, so that the client can store the data to be written generated by the applet. In addition, the storage mode can ensure that the data stored in the storage space of the client is the latest storage data in the life cycle of the applet, so that the problem that the storage data in the storage space of the client is not updated and contradicts the storage data required by the applet is avoided.
Further, the applet asynchronously sends a store API call request to the client with respect to performing a store write operation to its own cache when performing the store write operation to its own cache and to the client, respectively. Also, immediately after the storage write operation is performed on the cache of the applet itself, the data written by the storage write operation can be read from the cache of the applet itself. It should be noted that, in the past, if the applet directly makes such writing (the synchronous writing call is executed in the past) to the client, the data just written will be read immediately, and the applet calls the storage API of the client to execute the storage writing operation, so the time for executing the storage writing operation is long, which may block the subsequent reading operation, and in this scheme, the problem is solved. By asynchronously executing the storage writing operation, the storage data can be immediately read after being written into the self cache of the applet, so that the smoothness of storage writing and reading is ensured, and the response efficiency of the applet is improved.
As shown in fig. 2 (a), when the applet performs the storage write operation, if data is written into the storage space of the client through the storage API, a block is generated to the subsequent storage read operation, so that the applet needs to wait for the client to complete the storage write operation before reading the written storage data, thus blocking the normal service flow and prolonging the operation waiting time of the user.
As shown in fig. 2 (b), when performing a storage write operation, the applet first writes the data to be written into the applet's own cache (i.e., the near-end cache). Because the writing time of the near-end cache is shorter and faster, the written storage data can be immediately read later. And then asynchronously writing the data to be written into the storage space of the client, and the storage read operation is not influenced.
In one or more embodiments of the present disclosure, when the applet performs a store read operation, the applet may directly read the store data from the applet's own cache and return the store data to the applet through a check of the applet's own cache. Therefore, repeated calling of the client storage API can be avoided when the data is read, the performance cost of the applet is saved, and the data calling efficiency of the applet is improved.
Further, before checking whether the storage data aimed at by the storage API call request is stored in the self cache of the applet, an applet cache management object can be generated for the self cache of the applet according to the base class of the storage cache manager so as to access the self cache of the applet and execute the check through the instance of the applet cache management object.
Furthermore, according to the base class of the storage cache manager, a plug-in cache management object can be generated for the cache of the plug-in of the application, wherein the client belongs to the application or another application. And selecting a target object from the applet cache management object and the plugin cache management object according to the storage API call request and/or the designated application identifier so as to determine that the storage API call request is initiated through the applet or the plugin. Similar to the small program cache management object, the plug-in cache management object can manage the cache allocated to the plug-in, so that the data of the plug-in is temporarily stored in the cache and accessed for use, and the disturbance of the plug-in to the client or other applications where the plug-in is located can be reduced.
In one or more embodiments of the present disclosure, if a storage-related operation corresponding to a storage API call request initiated by an applet is not a storage erase operation, the storage API call request may be filtered out for a client through a check in a cache of the applet itself. If the storage related operation is a storage erasing operation, the storage data in the cache of the applet is cleared, and a storage API call request is initiated to the client so that the storage data related to the applet which is persistent outside the cache of the client is cleared.
Further, the self-cache of the applet runs in the lifecycle of the applet, and when the lifecycle of the applet is finished, the self-cache of the applet is destroyed, so that the stored data in the self-cache of the applet is lost. The stored data in the storage space of the client is not affected by the end of the life cycle of the applet, so that the stored data can be continuously called when the next life cycle of the applet starts. Because the near-end cache of the applet only exists in the lifecycle of the applet, the near-end cache data is destroyed at the end of the lifecycle of the applet, and the contradiction problem that the persistence of the cache data is different from that of the new and old cache data does not exist.
Still further, the stored data includes keys in key-value pairs. When the storage related operation executed by the applet is a storage read operation, if the client responds to the storage API call request and the value of the key is read failure when the storage read operation is executed, which means that the value corresponding to the key does not exist in the storage data, the key is determined to be an error key and recorded so as to filter the storage API call request for reading the value of the error key, and the subsequent repeated execution of the storage read operation on the error key is avoided. After that, after writing the value for the error key by performing the storage write operation, indicating that the error key has a value corresponding to the error key in the storage data, it can be determined that the key is no longer the error key, and the record is modified.
As shown in fig. 3, when the applet performs a storage read operation, the applet records an error key according to a result of a read failure, forming storage data of an error key array. After the subsequent applet executes the storage write operation and corrects the error key, the error key recorded in the error key array can be eliminated.
In connection with the foregoing description, one or more embodiments of the present disclosure provide a detailed flow diagram of the method of fig. 1 in an application scenario, where some of the foregoing alternatives are used, and the flow is shown in fig. 4.
In the flow of fig. 4, when the applet makes the first call to the storage API for the storage write operation, it checks in the applet's own cache according to the Key-Value pair (KV) corresponding to the data to be written, and determines whether the same Key-Value pair exists. When the same KV cannot be hit in the first call, the applet needs to write the key value pair corresponding to the data to be written into the cache of the applet itself and also into the storage space of the client. For example, a client may be in communication via JSAPI CALL BRIDGE to make a call to a storage API.
When the applet recalls the storage API, checking is carried out in the cache of the applet according to the data to be written in, and whether the same key value pair KV exists or not is determined. If the same key value pair exists, the data to be written by the applet is written into the cache of the applet, and the applet is not called for the first time, the verification result in the cache of the applet can be directly returned. If the same key value pair does not exist, the data is not stored in the self cache of the small program, namely the data is not stored in the storage space of the client, and the data to be written is written into the self cache of the small program and the storage space of the client.
For the storage read operation, checking whether a corresponding value exists in the cache of the applet itself according to the key of the data to be read. If there is a value corresponding to the key to be read, the corresponding value may be returned directly to the applet. And if the value corresponding to the key to be read does not exist, calling a storage API of the client, and inquiring the corresponding value in the storage space of the client.
For the storage erasing operation, the storage data in the cache of the applet needs to be cleared, and the storage data in the storage space of the client is cleared together.
Based on the same thought, one or more embodiments of the present disclosure further provide apparatuses and devices corresponding to the above method, as shown in fig. 5 and fig. 6.
Fig. 5 is a schematic structural diagram of an applet storage calling device provided in one or more embodiments of the present disclosure, where the applet runs on a client, and the device includes:
an access module 502 that accesses a cache of the applet itself before the applet is to initiate a store API call request to the client;
a checking module 504, configured to check whether the cache of the applet stores the storage data for the storage API call request;
The implementation module 506 filters the storage API call request for the client if the result of the verification module 504 is yes, and implements a storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
and an initiating module 508, configured to initiate the storage API call request to the client if the result of the checking module 504 is negative.
Optionally, the storage-related operation is a storage write operation;
the initiation module 508 performs the storage write operation on the cache of the applet, so as to write the data to be written corresponding to the applet into the cache of the applet;
and initiating the storage API call request to the client so that the client also executes the storage write operation to persist the data to be written corresponding to the applet in the storage space corresponding to the client, wherein the storage space corresponding to the client does not belong to the applet and does not comprise the cache of the applet.
Optionally, the initiating module 508 generates risk filling data according to the data to be written corresponding to the applet;
And according to the risk filling data, initiating the storage API call request to the client so that the client can persistence the risk filling data in a storage space corresponding to the client, and when the life cycle of the applet is finished, replacing the persistence risk filling data in the storage space corresponding to the client with data to be written corresponding to the applet by executing the storage writing operation.
Optionally, the initiating module 508 asynchronously sends the storage API call request to the client with respect to performing the storage write operation to the applet's own cache;
the apparatus further comprises an immediate read module 510, the immediate read module 510 performing, after the initiating module 508 performs the store write operation to the applet's own cache:
data written by the store write operation is immediately read from the applet's own cache.
Optionally, the storage-related operation is a storage read operation;
the implementation module 506 reads the stored data from the applet's own cache and returns it to the applet.
Optionally, the apparatus further includes a generating module 512, where the generating module 512 performs, before the verifying module 504 verifies whether the storage data for the storage API call request is stored in the cache of the applet itself:
according to the base class of the storage cache manager, generating an applet cache management object for the applet's own cache so as to access the applet's own cache through an instance of the applet cache management object, and performing the verification.
Optionally, the apparatus further includes a selecting module 514, where the selecting module 514 performs, before the verifying module 504 verifies whether the storage data for the storage API call request is stored in the cache of the applet itself:
generating a plug-in cache management object for the cache of the plug-in of the application according to the base class of the storage cache manager, wherein the client belongs to the application or another application;
and selecting a target object from the small program cache management object and the plug-in cache management object according to the storage API call request and/or the designated application identifier.
Optionally, the apparatus further includes a determining module 516, where the determining module 516 performs:
Determining that the storage-related operation is not a storage-erase operation;
the apparatus further includes a purge module 518, the purge module 518 performing:
if the storage related operation is a storage erasing operation, clearing the storage data in the cache of the applet;
and initiating the storage API call request to the client so that the storage data which is persisted outside the cache by the client is also cleared.
Optionally, the stored data includes a key in a key value pair, and the storage related operation is a storage read operation;
the apparatus further includes an error logging module 520, the error logging module 520 performing, after the initiating module 508 initiates the storage API call request to the client:
if the client responds to the storage API call request and the value of the key is read out in a failure mode when the storage read operation is executed, determining the key as an error key and recording the error key so as to filter the storage API call request for reading the value of the error key;
after writing a value for the key by performing a store write operation, it is determined that the key is no longer an erroneous key.
Optionally, the applet's own cache runs in the applet's lifecycle, the apparatus further comprises a destruction module 522, the destruction module 522 executing:
And destroying the self cache of the applet when the life cycle of the applet is finished, so that the stored data in the self cache of the applet is lost.
Fig. 6 is a schematic structural diagram of an applet storage calling device provided in one or more embodiments of the present disclosure, where the applet runs on a client, and the device includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client.
Based on the same considerations, one or more embodiments of the present specification further provide a non-volatile computer storage medium corresponding to the above method, storing computer-executable instructions configured to:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as 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), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product 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.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (17)

1. An applet store call method, the applet running on a client, the method comprising:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client, which specifically comprises: executing the storage write operation on the cache of the applet so as to write the data to be written corresponding to the applet into the cache of the applet, initiating the storage API call request to the client so that the client can persist the data to be written corresponding to the applet in a storage space corresponding to the client by executing the storage write operation, wherein the storage space corresponding to the client does not belong to the applet and does not comprise the cache of the applet, and the storage-related operation is a storage write operation;
The step of initiating the storage API call request to the client so that the client can persist the data to be written corresponding to the applet in the storage space corresponding to the client by executing the storage write operation, specifically comprising: generating risk filling data according to data to be written corresponding to the applet, initiating the storage API call request to the client according to the risk filling data so that the client can persistence the risk filling data in a storage space corresponding to the client, and when the life cycle of the applet is finished, replacing the persistence risk filling data in the storage space corresponding to the client with the data to be written corresponding to the applet by executing the storage writing operation;
the risk filling data represents data related to the data to be written but hiding the real information in the data to be written.
2. The method of claim 1, wherein the step of initiating the storage API call request to the client specifically comprises:
asynchronously sending the storage API call request to the client with respect to performing the storage write operation to the applet's own cache;
After the performing the store write operation to the applet's own cache, the method further comprises:
data written by the store write operation is immediately read from the applet's own cache.
3. The method of claim 1, the store-related operation being a store-read operation;
the implementation of the storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet itself specifically includes:
and reading the stored data from the cache of the applet and returning the data to the applet.
4. The method of claim 1, wherein before verifying whether the applet itself stores the storage data for which the storage API call request is directed in the cache, the method further comprises:
according to the base class of the storage cache manager, generating an applet cache management object for the applet's own cache so as to access the applet's own cache through an instance of the applet cache management object, and performing the verification.
5. The method of claim 4, wherein before verifying whether the applet itself stores the storage data for which the storage API call request is directed in the cache, the method further comprises:
Generating a plug-in cache management object for the cache of the plug-in of the application according to the base class of the storage cache manager, wherein the client belongs to the application or another application;
and selecting a target object from the small program cache management object and the plug-in cache management object according to the storage API call request and/or the designated application identifier.
6. The method of claim 1, wherein prior to filtering the storage API call request for the client, the method further comprises:
determining that the storage-related operation is not a storage-erase operation;
if the storage-related operation is a storage-erase operation, the method further includes:
clearing the stored data in the cache of the applet itself;
and initiating the storage API call request to the client so that the storage data which is persisted outside the cache by the client is also cleared.
7. The method of claim 1, the stored data comprising a key of a key-value pair, the storage-related operation being a storage read operation;
after the initiation of the storage API call request to the client, the method further includes:
if the client responds to the storage API call request and the value of the key is read out in a failure mode when the storage read operation is executed, determining the key as an error key and recording the error key so as to filter the storage API call request for reading the value of the error key;
After writing a value for the key by performing a store write operation, it is determined that the key is no longer an erroneous key.
8. The method of any of claims 1-7, the applet's own cache running in a lifecycle of the applet, the method further comprising:
and destroying the self cache of the applet when the life cycle of the applet is finished, so that the stored data in the self cache of the applet is lost.
9. An applet store call apparatus, the applet running on a client, the apparatus comprising:
the access module is used for accessing the cache of the applet before the applet is required to initiate a storage API call request to the client;
the verification module is used for verifying whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
the implementation module is used for filtering the storage API call request for the client and implementing storage related operation corresponding to the storage API call request according to the storage data in the self cache of the applet when the result of the verification module is yes;
the initiating module initiates the storage API call request to the client under the condition that the result of the checking module is negative;
The initiation module executes the storage write operation on the self cache of the applet so as to write the data to be written corresponding to the applet into the self cache of the applet;
initiating the storage API call request to the client so that the client also executes the storage write operation to persist the data to be written corresponding to the applet in the storage space corresponding to the client, wherein the storage space corresponding to the client does not belong to the applet and does not comprise the cache of the applet, and the storage related operation is a storage write operation;
the initiation module generates risk filling data according to the data to be written corresponding to the applet;
according to the risk filling data, the storage API call request is initiated to the client so that the client can persistence the risk filling data in a storage space corresponding to the client, and when the life cycle of the applet is finished, the storage writing operation is also executed to replace the persistence risk filling data in the storage space corresponding to the client with data to be written corresponding to the applet;
The risk filling data represents data related to the data to be written but hiding the real information in the data to be written.
10. The apparatus of claim 9, the initiation module to asynchronously send the storage API call request to the client with respect to performing the storage write operation to the applet's own cache;
the apparatus further includes an immediate read module that performs, after the initiating module performs the store write operation to the applet's own cache:
data written by the store write operation is immediately read from the applet's own cache.
11. The apparatus of claim 9, the store-related operation is a store-read operation;
the realization module reads the stored data from the cache of the applet and returns the stored data to the applet.
12. The apparatus of claim 9, further comprising a generation module to perform, before the verification module verifies whether stored data for which the store API call request is directed is stored in a cache of the applet itself:
according to the base class of the storage cache manager, generating an applet cache management object for the applet's own cache so as to access the applet's own cache through an instance of the applet cache management object, and performing the verification.
13. The apparatus of claim 12, further comprising a selection module to perform, before the verification module verifies whether the store data for which the store API call request is directed is held in the applet's own cache:
generating a plug-in cache management object for the cache of the plug-in of the application according to the base class of the storage cache manager, wherein the client belongs to the application or another application;
and selecting a target object from the small program cache management object and the plug-in cache management object according to the storage API call request and/or the designated application identifier.
14. The apparatus of claim 9, further comprising a determination module to perform, prior to the implementation module filtering the storage API call request for the client:
determining that the storage-related operation is not a storage-erase operation;
the apparatus further includes a purge module that performs:
if the storage related operation is a storage erasing operation, clearing the storage data in the cache of the applet;
and initiating the storage API call request to the client so that the storage data which is persisted outside the cache by the client is also cleared.
15. The apparatus of claim 9, the stored data comprising a key of a key-value pair, the storage-related operation being a storage read operation;
the apparatus further includes an error logging module that performs, after the initiation module initiates the storage API call request to the client:
if the client responds to the storage API call request and the value of the key is read out in a failure mode when the storage read operation is executed, determining the key as an error key and recording the error key so as to filter the storage API call request for reading the value of the error key;
after writing a value for the key by performing a store write operation, it is determined that the key is no longer an erroneous key.
16. The apparatus of any one of claims 9 to 15, wherein the applet's own cache runs in the applet's lifecycle, the apparatus further comprising a destruction module, the destruction module executing:
and destroying the self cache of the applet when the life cycle of the applet is finished, so that the stored data in the self cache of the applet is lost.
17. An applet store call device, the applet running on a client, the device comprising:
At least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
accessing a cache of the applet itself before the applet is to initiate a store API call request to the client;
checking whether the storage data aimed at by the storage API call request is stored in the cache of the applet;
if yes, filtering the storage API call request for the client, and realizing storage related operation corresponding to the storage API call request according to the storage data in the cache of the applet;
otherwise, the storage API call request is initiated to the client, which specifically comprises: executing the storage write operation on the cache of the applet so as to write the data to be written corresponding to the applet into the cache of the applet, initiating the storage API call request to the client so that the client can persist the data to be written corresponding to the applet in a storage space corresponding to the client by executing the storage write operation, wherein the storage space corresponding to the client does not belong to the applet and does not comprise the cache of the applet, and the storage-related operation is a storage write operation;
The step of initiating the storage API call request to the client so that the client can persist the data to be written corresponding to the applet in the storage space corresponding to the client by executing the storage write operation, specifically comprising: generating risk filling data according to data to be written corresponding to the applet, initiating the storage API call request to the client according to the risk filling data so that the client can persistence the risk filling data in a storage space corresponding to the client, and when the life cycle of the applet is finished, replacing the persistence risk filling data in the storage space corresponding to the client with the data to be written corresponding to the applet by executing the storage writing operation;
the risk filling data represents data related to the data to be written but hiding the real information in the data to be written.
CN202210180329.5A 2022-02-25 2022-02-25 Applet storage calling method, device and equipment Active CN114510296B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210180329.5A CN114510296B (en) 2022-02-25 2022-02-25 Applet storage calling method, device and equipment
PCT/CN2023/071496 WO2023160289A1 (en) 2022-02-25 2023-01-10 Mini-program storage call

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210180329.5A CN114510296B (en) 2022-02-25 2022-02-25 Applet storage calling method, device and equipment

Publications (2)

Publication Number Publication Date
CN114510296A CN114510296A (en) 2022-05-17
CN114510296B true CN114510296B (en) 2024-02-02

Family

ID=81552705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210180329.5A Active CN114510296B (en) 2022-02-25 2022-02-25 Applet storage calling method, device and equipment

Country Status (2)

Country Link
CN (1) CN114510296B (en)
WO (1) WO2023160289A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114510296B (en) * 2022-02-25 2024-02-02 支付宝(杭州)信息技术有限公司 Applet storage calling method, device and equipment
CN117312394B (en) * 2023-11-08 2024-03-05 之江实验室 Data access method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933367A (en) * 2019-02-03 2019-06-25 广州视源电子科技股份有限公司 Cookie implementation method, device and the computer equipment of small routine
CN111930696A (en) * 2020-07-22 2020-11-13 中国建设银行股份有限公司 File transmission processing method and system based on small program
CN112000394A (en) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for accessing an applet
CN113448641A (en) * 2020-03-10 2021-09-28 腾讯科技(深圳)有限公司 Method and device for starting small program, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9086972B2 (en) * 2013-07-08 2015-07-21 International Business Machines Corporation Managing metadata for caching devices during shutdown and restart procedures
US20210042398A1 (en) * 2019-08-08 2021-02-11 Pulsepoint, Inc. Validation of Properties of a User Device in a Network
CN111708734A (en) * 2020-05-29 2020-09-25 苏州浪潮智能科技有限公司 Metadata access method, system, device and medium for distributed system
CN114510296B (en) * 2022-02-25 2024-02-02 支付宝(杭州)信息技术有限公司 Applet storage calling method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933367A (en) * 2019-02-03 2019-06-25 广州视源电子科技股份有限公司 Cookie implementation method, device and the computer equipment of small routine
CN113448641A (en) * 2020-03-10 2021-09-28 腾讯科技(深圳)有限公司 Method and device for starting small program, computer equipment and storage medium
CN111930696A (en) * 2020-07-22 2020-11-13 中国建设银行股份有限公司 File transmission processing method and system based on small program
CN112000394A (en) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for accessing an applet

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
J2ME中面向对象的持久存储管理研究;卜登立;魏斯民;彭嵩松;;计算机工程(11);全文 *
基于低功耗ASIP的循环缓存的设计;胡锦;李新泽;黑勇;于增辉;陈黎明;;微电子学与计算机(05);全文 *

Also Published As

Publication number Publication date
CN114510296A (en) 2022-05-17
WO2023160289A1 (en) 2023-08-31

Similar Documents

Publication Publication Date Title
CN110008224B (en) Database transaction processing method and device
CN114510296B (en) Applet storage calling method, device and equipment
CN108628688B (en) Message processing method, device and equipment
CN108549562A (en) A kind of method and device of image load
CN111861454B (en) Method and device for displaying unique identifier of digital object
CN114547024A (en) SQL statement risk detection method, device, equipment and medium
CN115374481A (en) Data desensitization processing method and device, storage medium and electronic equipment
KR20150103886A (en) Data processing apparatus for pipeline execution acceleration and method thereof
CN116305298B (en) Method and device for managing computing power resources, storage medium and electronic equipment
CN115185847A (en) Fault testing method and device, storage medium and electronic equipment
CN115391337A (en) Database partitioning method and device, storage medium and electronic equipment
CN112286572A (en) Configuration method and device of business process
CN112699129A (en) Data processing system, method and device
CN105242951A (en) UUID calling method for software application
CN116737367B (en) Minio-based data preservation method, device and medium
CN115344410B (en) Method and device for judging event execution sequence, storage medium and electronic equipment
CN104461382A (en) Internal writing method for file server operating multiple file systems and server
CN117555697B (en) Distributed training-oriented cache loading system, method, device and equipment
CN110674106B (en) Storage method, device and equipment of policy data and computer readable storage medium
CN116166693B (en) Data query method, device and equipment based on secret state range index
CN111611597A (en) Block chain-based data access and write-in method, equipment and medium
CN110009237B (en) Resource allocation method, device, equipment and medium
CN116302917A (en) Flow recording method and device, storage medium and electronic equipment
CN113821325A (en) Application program calling method, device, equipment and medium
CN117591703A (en) Graph data optimization method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant