Data access method, device, electronic device and storage medium

By configuring data storage methods in the Android system, using the failure time to stitch the storage objects and store them on the local disk, the shortcomings of data cache timeout failure settings in traditional Android systems are solved, and data access efficiency and throughput are improved.

CN112612789BActive Publication Date: 2025-01-07PING AN CONSUMER FINANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011478852.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2025-01-07
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

When traditional Android systems use SharePreference for data cache, there is a lack of settings for data cache timeout failure, resulting in inefficient data access and data access, and it is necessary to redevelop cache failure schemes.

Method used

Configure the data storage method in the application module of the terminal system, obtain the invalidation time string of the application data, and splice it with the data to generate a storage object, store it in the local disk, query the invalidation time of the storage object in response to the user's request, and return the corresponding Data or empty data.

Benefits of technology

It realizes customization of the failure time of data cache, improves the efficiency and flexibility of data access, supports high data throughput, and reduces network interaction with the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112612789B_ABST
    Figure CN112612789B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and discloses a data access method, including: configuring a data storage method in an application module of a terminal system, and using the data storage method to obtain application data from a server corresponding to the application module; configuring the expiration time of the application data, splicing the application data and the expiration time, and generating a storage object; storing the storage object in a local disk of the terminal system; in response to a user's data access request, querying the corresponding storage object from the local disk, obtaining a target storage object, and identifying whether the expiration time in the target storage object has expired; if the expiration time has expired, returning empty data to the user; if the expiration time has not expired, returning the application data in the target storage object to the user. In addition, the present invention also relates to blockchain technology, and the storage object can be stored in a blockchain. The present invention can improve the efficiency of data access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data access method, device, electronic device and computer-readable storage medium. Background Art

[0002] The development of terminal systems (such as the Android system) is essentially the communication between devices and web servers on the Internet, which inevitably requires obtaining data from the server. However, repeatedly obtaining data through the network is time-consuming, especially when there are many accesses, which will greatly affect performance. In the Android system, secondary caching can be used to reduce frequent network operations, reduce traffic, and improve performance.

[0003] Traditional Android systems use SharePreference for data caching. However, SharePreference only supports data storage and does not provide data cache timeout settings. For example, if the data requested by the server needs to be cached and the cache time is limited, a new data cache timeout setting solution needs to be developed when using SharePreference for data caching, which greatly affects the efficiency of data access. Summary of the invention

[0004] The present invention provides a data access method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the efficiency of data access.

[0005] To achieve the above object, the present invention provides a data access method, comprising:

[0006] Configuring a data storage method in an application module of a terminal system, and using the data storage method to obtain application data from a server corresponding to the application module;

[0007] Obtaining an expiration time character string of the application data, loading the expiration time character string into the application data to obtain the expiration time of the application data, and concatenating the application data and the expiration time to generate a storage object;

[0008] Storing the storage object in the local disk of the terminal system;

[0009] In response to a user's data access request, query the local disk for a corresponding storage object to obtain a target storage object, and identify whether an expiration time in the target storage object has expired;

[0010] If the expiration time expires, empty data is returned to the user;

[0011] If the expiration time has not expired, the application data in the target storage object is returned to the user.

[0012] Optionally, the method for configuring data storage in the application module of the terminal system includes:

[0013] Acquire the compilation environment of the application module, and load the storage method in the compilation environment;

[0014] A data storage method is obtained by setting a data storage rule in the storage method.

[0015] Optionally, the concatenating the application data and the expiration time to generate a storage object includes:

[0016] Obtaining the key value of the application data and the expiration character string of the expiration time;

[0017] The key value and the invalid character string are combined using concatenation characters to obtain the storage object.

[0018] Optionally, storing the storage object in a local disk of the terminal system includes:

[0019] According to the key value of the storage object, a corresponding key value table is constructed in the local disk;

[0020] The storage object is transmitted to the key-value table by using a pre-created data transmission channel.

[0021] Optionally, before using the pre-created data transmission channel to transmit the storage object to the key-value table, the method further includes:

[0022] Acquire a first interface address of the terminal system and a second interface address of an application module corresponding to the storage object;

[0023] Constructing a configuration file for the first interface address and the second interface address to obtain a first configuration file and a second configuration file;

[0024] Defining the same identification bit in the first configuration file and the second configuration file, and adding an attribute parameter to the identification bit;

[0025] The data transmission channel is configured according to the attribute parameters.

[0026] Optionally, in response to the user data access request, querying the corresponding storage object from the local disk to obtain the target storage object includes:

[0027] The key value of the data to be accessed in the data access request is obtained, the key value of the data to be accessed is matched with the key value of the storage object in the local disk, and the storage object that successfully matches is used as the target storage object.

[0028] Optionally, matching the key value of the data to be accessed with the key value of the object stored in the local disk includes:

[0029] The key value of the data to be accessed is matched with the key value of the object stored in the local disk using the following method:

[0030]

[0031] Among them, T(x, y) represents the matching degree, x i Indicates the i-th data key value to be accessed, y i Represents the i-th key value in the storage object.

[0032] In order to solve the above problem, the present invention further provides a data access device, the device comprising:

[0033] An acquisition module, used to configure a data storage method in an application module of a terminal system, and to acquire application data from a server corresponding to the application module using the data storage method;

[0034] A concatenation module, used for obtaining an expiration time character string of the application data, loading the expiration time character string into the application data, obtaining the expiration time of the application data, and concatenating the application data and the expiration time to generate a storage object;

[0035] A storage module, used for storing the storage object in a local disk of the terminal system;

[0036] an identification module, configured to query the corresponding storage object from the local disk in response to a user's data access request, obtain a target storage object, and identify whether the expiration time in the target storage object has expired;

[0037] The identification module is also used to return empty data to the user when the expiration time expires.

[0038] The identification module is further configured to return the application data in the target storage object to the user when the expiration time has not expired.

[0039] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0040] at least one processor; and,

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement the data access method described above.

[0043] In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above data access method.

[0044] The embodiment of the present invention first configures a data storage method in the application module of the terminal system, and uses the data storage method to obtain application data from the server corresponding to the application module, so as to realize the fast reading of the data to be cached; secondly, the embodiment of the present invention obtains the expiration time string of the application data, loads the expiration time string into the application data, obtains the expiration time of the application data, and splices the application data and the expiration time to generate a storage object, so as to realize the customization of the expiration time of the data to be cached, which can meet the development needs of different users, and uses the data-time splicing method to generate a storage object, which meets the high-speed reading of subsequent storage objects, and stores the storage object in the local disk of the terminal system, so that the data storage is more flexible and supports high data throughput; further, in response to the user's data access request, the corresponding storage object is queried from the local disk to obtain the target storage object, and the corresponding data is returned to the user according to the expiration time in the target storage object. Therefore, a data access method, device, electronic device and storage medium proposed by the present invention can improve the efficiency of data access. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a flow chart of a data access method provided by an embodiment of the present invention;

[0046] Figure 2 In the first embodiment of the present invention Figure 1 A detailed flowchart of one of the steps in the provided data access method;

[0047] Figure 3 A schematic diagram of a module of a data access device provided by an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of the internal structure of an electronic device for implementing a data access method provided by an embodiment of the present invention;

[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0051] The embodiment of the present application provides a data access method. The execution subject of the data access method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the data access method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0052] Reference Figure 1 FIG. 1 is a flow chart of a data access method provided by an embodiment of the present invention. In the embodiment of the present invention, the data access method includes:

[0053] S1. Configure a data storage method in an application module of a terminal system, and use the data storage method to obtain application data from a server corresponding to the application module.

[0054] In an embodiment of the present invention, the terminal system includes an Android system, which can be applied to a smart phone to control and manage mobile phone hardware and software resources. The application module refers to a specific business application module implemented on the terminal system, such as an application store module, a login module, and an app module.

[0055] It should be understood that when accessing an application in the application module of the terminal system, data interaction will be performed with the corresponding server. For example, when downloading a picture in the app module of the terminal system, the corresponding picture will be queried and downloaded from the server corresponding to the app module, wherein the server may be a web server.

[0056] Further, see Figure 2 As shown, the method for configuring data storage in the application module of the terminal system includes:

[0057] S20, obtaining a compilation environment of the application module, and loading a storage method in the compilation environment;

[0058] S21. Set a data storage rule in the storage method to obtain a data storage method.

[0059] In an optional embodiment, the compilation environment is determined based on different developers. For example, developer A uses Myeclipse compilation environment as the compilation environment of the application module.

[0060] In an optional embodiment, the storage method is a public void put() method, and the storage method can be loaded via a load instruction, and the load instruction includes a load instruction.

[0061] In an optional embodiment, the data storage rule is set through the string class. For example, the following data storage rule is set in the storage method: public void put(String key,String value,int saveTime), and the obtained application data includes: key (key value of data), value (content of data), saveTime (storage time of data).

[0062] Furthermore, the embodiment of the present invention utilizes the data storage method to obtain application data and corresponding storage time from the server corresponding to the application module, so as to realize rapid reading of subsequent data.

[0063] In detail, the method of obtaining application data from the server corresponding to the application module using the data storage method includes: obtaining a data access request from the application module, and querying application data from the server corresponding to the application module according to the data access request and the data storage method.

[0064] The data access request is determined based on different users, for example, the demand of user A is to download landscape pictures, the demand of user A is to query orders, and so on.

[0065] S2. Obtain an expiration time character string of the application data, load the expiration time character string into the application data, obtain the expiration time of the application data, and concatenate the application data and the expiration time to generate a storage object.

[0066] It should be understood that if the application data is directly stored in the local disk of the terminal system, it is easy to bring storage pressure to the local disk, thereby affecting the operating pressure of the terminal system. Therefore, the embodiment of the present invention obtains the expiration time string of the application data, and uses a preset script to load the expiration time string into the application data to obtain the expiration time of the application data, so as to implement the update filtering of the application data and ensure the normal operation of the terminal system. The expiration time string is obtained according to the needs of different developers. For example, if developer A requires that the expiration time of the application data is 1 hour, the expiration time string obtained is one time; the preset script is compiled by a JavaScript script to implement the expiration time configuration of the application data.

[0067] Furthermore, in order to more intuitively understand the relationship between data and time in the application data, the present invention concatenates the application data and the expiration time to generate a storage object.

[0068] Specifically, the splicing of the application data and the expiration time to generate a storage object includes: obtaining a key value of the application data and an expiration string of the expiration time; and combining the key value and the expiration string using a splicing character to obtain the storage object.

[0069] The key value is used to characterize the data type of the application data, which is represented by the key value in the present invention. The expiration string is used to characterize the expiration time point of the application data, and the concatenation character may be “-”.

[0070] S3. Store the storage object in the local disk of the terminal system.

[0071] In the embodiment of the present invention, the storage object is saved in the local disk of the terminal system, so that the user can directly query from the local disk when querying data, reducing the interaction between the user and the server, thereby improving the data response speed.

[0072] In detail, storing the storage object in the local disk of the terminal system includes: constructing a corresponding key value table in the local disk according to the key value of the storage object; and transmitting the storage object to the key value table using a pre-created data transmission channel.

[0073] It should be stated that in an embodiment of the present invention, the storage object is stored in a key-value pair format to improve the high-speed reading of subsequent data. Therefore, an embodiment of the present invention constructs a corresponding key-value table in the local disk according to the key value of the storage object. Optionally, the key-value table is compiled using the SQL language.

[0074] In an optional embodiment, the transmission of the storage object is performed through a message transmission component, and the message transmission component includes: MQ message middleware.

[0075] Furthermore, in an embodiment of the present invention, before the storage object is transmitted to the key-value table using a pre-created data transmission channel, it also includes: obtaining a first interface address of the terminal system and a second interface address of an application module corresponding to the storage object; constructing a configuration file for the first interface address and the second interface address to obtain a first configuration file and a second configuration file; defining the same identification bit in the first configuration file and the second configuration file, and adding attribute parameters in the identification bit; and executing configuration of the data transmission channel according to the attribute parameters.

[0076] In an optional embodiment, the definition of the identification bit can be defined through an SQL statement, the attribute parameters include: primary key, id and field, etc., and the data transmission channel is compiled through Java language.

[0077] Furthermore, in order to ensure the privacy and availability of the storage object, the storage object may also be stored in a blockchain node.

[0078] S4. In response to the user's data access request, query the corresponding storage object from the local disk to obtain the target storage object, and identify whether the expiration time in the target storage object has expired.

[0079] In the embodiment of the present invention, in response to a user's data access request, a corresponding storage object is queried from the local disk to directly read data from the local disk, thereby reducing the number of network requests to the server and thus reducing the consumption of network resources.

[0080] In detail, in response to a user data access request, the corresponding storage object is queried from the local disk, including: obtaining the key value of the data to be accessed in the data access request, matching the key value of the data to be accessed with the key value of the storage object in the local disk, and using the successfully matched storage object as the target storage object.

[0081] In an optional embodiment, the key value of the data to be accessed is matched with the key value of the object stored in the local disk using the following method:

[0082]

[0083] Among them, T(x, y) represents the matching degree, x i Indicates the i-th data key value to be accessed, y i Indicates the i-th key value in the storage object. If the matching degree is 1, it means that the key value of the data to be accessed matches the key value of the storage object in the local disk successfully. If the matching degree is not 1, it means that the key value of the data to be accessed matches the key value of the storage object in the local disk unsuccessfully.

[0084] Furthermore, another embodiment of the present invention may also include: if the corresponding storage object is not found in the local disk, returning empty data to the user through the getSaveString() method.

[0085] Furthermore, the embodiment of the present invention identifies whether the expiration time in the storage object has expired to determine whether to return the application data in the storage object to the user. Specifically, the embodiment of the present invention determines whether the expiration time in the target storage object has expired based on the access time of the data access request, that is, if the access time exceeds the expiration time, it is determined that the expiration time has expired, and if the access time does not exceed the expiration time, it is determined that the expiration time has not expired.

[0086] If the expiration time expires, S5 is executed to return empty data to the user.

[0087] In the embodiment of the present invention, if the expiration time expires, it means that the data accessed by the data access request has expired in the local disk. Therefore, the present invention implements returning empty data to the user through the getSaveString() method.

[0088] If the expiration time has not expired, execute S6 to return the application data in the target storage object to the user.

[0089] In an embodiment of the present invention, if the expiration time has not expired, it means that the data accessed by the data access request has not expired in the local disk. Therefore, the present invention implements returning the application data in the target storage object to the user through the getSaveString() method.

[0090] The embodiment of the present invention first configures a data storage method in the application module of the terminal system, and uses the data storage method to obtain application data from the server corresponding to the application module, so as to realize fast reading of the data to be cached; secondly, the embodiment of the present invention obtains the expiration time string of the application data, loads the expiration time string into the application data, obtains the expiration time of the application data, and splices the application data and the expiration time to generate a storage object, so as to realize the customization of the expiration time of the data to be cached, which can meet the development needs of different users, and uses the data-time splicing method to generate a storage object, so as to meet the high-speed reading of subsequent storage objects, and stores the storage object in the local disk of the terminal system, so that the data storage is more flexible and supports high data throughput; further, in response to the user's data access request, the corresponding storage object is queried from the local disk to obtain the target storage object, and the corresponding data is returned to the user according to the expiration time in the target storage object. Therefore, the present invention can improve the efficiency of data access.

[0091] like Figure 3 The figure shows a functional module diagram of the data access device of the present invention.

[0092] The data access device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the data access device may include an acquisition module 101, a splicing module 102, a storage module 103 and an identification module 104. The module of the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in the memory of the electronic device.

[0093] In this embodiment, the functions of each module / unit are as follows:

[0094] The acquisition module 101 is used to configure a data storage method in an application module of the terminal system, and to acquire application data from a server corresponding to the application module using the data storage method;

[0095] The splicing module 102 is used to obtain the expiration time character string of the application data, load the expiration time character string into the application data, obtain the expiration time of the application data, and splice the application data and the expiration time to generate a storage object;

[0096] The storage module 103 is used to store the storage object in the local disk of the terminal system;

[0097] The identification module 104 is used to query the corresponding storage object from the local disk in response to the user's data access request, obtain the target storage object, and identify whether the expiration time in the target storage object has expired;

[0098] The identification module 104 is also used to return empty data to the user when the expiration time expires.

[0099] The identification module 104 is further configured to return the application data in the target storage object to the user when the expiration time has not expired.

[0100] In detail, each module in the data access device 100 in the embodiment of the present invention is used in the same manner as described above. Figure 1 and Figure 2 The data access method described in the present invention has the same technical means and can produce the same technical effects, so it will not be repeated here.

[0101] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the data access method of the present invention.

[0102] The electronic device 1 may include a processor 10 , a memory 11 , and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a data access program 12 .

[0103] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as data access codes, etc., but also be used to temporarily store data that has been output or is to be output.

[0104] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executes data access, etc.), and calls data stored in the memory 11, so as to execute various functions of the electronic device 1 and process data.

[0105] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0106] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0107] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0108] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0109] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0110] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0111] The data access 12 stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs, which, when running in the processor 10, can achieve:

[0112] Configuring a data storage method in an application module of a terminal system, and using the data storage method to obtain application data from a server corresponding to the application module;

[0113] Obtaining an expiration time character string of the application data, loading the expiration time character string into the application data to obtain the expiration time of the application data, and concatenating the application data and the expiration time to generate a storage object;

[0114] Storing the storage object in the local disk of the terminal system;

[0115] In response to a user's data access request, query the local disk for a corresponding storage object to obtain a target storage object, and identify whether an expiration time in the target storage object has expired;

[0116] If the expiration time expires, empty data is returned to the user;

[0117] If the expiration time has not expired, the application data in the target storage object is returned to the user.

[0118] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0119] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0120] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0121] Configuring a data storage method in an application module of a terminal system, and using the data storage method to obtain application data from a server corresponding to the application module;

[0122] Obtaining an expiration time character string of the application data, loading the expiration time character string into the application data to obtain the expiration time of the application data, and concatenating the application data and the expiration time to generate a storage object;

[0123] Storing the storage object in the local disk of the terminal system;

[0124] In response to a user's data access request, query the local disk for a corresponding storage object to obtain a target storage object, and identify whether an expiration time in the target storage object has expired;

[0125] If the expiration time expires, empty data is returned to the user;

[0126] If the expiration time has not expired, the application data in the target storage object is returned to the user.

[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0128] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0129] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0130] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0131] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0132] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0133] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A data access method, characterized in that: The method comprises: Configuring a data storage method in an application module of a terminal system, and using the data storage method to obtain application data from a server corresponding to the application module; According to the preset requirement of setting the expiration time of the application data, the expiration time string of the application data is obtained, the expiration time string is loaded into the application data by using a preset JavaScript script, the expiration time of the application data is obtained, the key value of the application data and the expiration string of the expiration time are obtained, and the key value and the expiration string are combined by using a concatenation character to obtain a storage object; Storing the storage object in the local disk of the terminal system; In response to a data access request from a user, a key value of the data to be accessed is obtained from the data access request, a key value of a corresponding storage object is searched from the local disk according to the key value of the data to be accessed, a target storage object is obtained, and an expiration time in the target storage object is identified as being expired; If the expiration time expires, empty data is returned to the user; If the expiration time has not expired, the application data in the target storage object is returned to the user.

2. The data access method according to claim 1, wherein: The method for configuring data storage in the application module of the terminal system comprises: Acquire the compilation environment of the application module, and load the storage method in the compilation environment; A data storage method is obtained by setting a data storage rule in the storage method.

3. The data access method according to claim 1, wherein: The storing the storage object into the local disk of the terminal system includes: According to the key value of the storage object, a corresponding key value table is constructed in the local disk; The storage object is transmitted to the key-value table by using a pre-created data transmission channel.

4. The data access method as claimed in claim 3, characterized in that: Before the storage object is transmitted to the key-value table by using the pre-created data transmission channel, the method further includes: Acquire a first interface address of the terminal system and a second interface address of an application module corresponding to the storage object; Constructing a configuration file for the first interface address and the second interface address to obtain a first configuration file and a second configuration file; Define the same identification bit in the first configuration file and the second configuration file, and add attribute parameters to the identification bit; The data transmission channel is configured according to the attribute parameters.

5. The data access method according to any one of claims 1 to 4, characterized in that: The step of querying the key value of the corresponding storage object from the local disk according to the key value of the data to be accessed to obtain the target storage object includes: The key value of the data to be accessed is matched with the key value of the storage object in the local disk, and the storage object with successful matching is used as the target storage object.

6. The data access method according to claim 5, characterized in that: The matching of the key value of the data to be accessed with the key value of the object stored in the local disk includes: The key value of the data to be accessed is matched with the key value of the object stored in the local disk using the following method: Among them, T(x, y) represents the matching degree, x i Indicates the i-th data key value to be accessed, y i Represents the i-th key value in the storage object.

7. A data access device, characterized in that: The device comprises: An acquisition module, used to configure a data storage method in an application module of a terminal system, and to acquire application data from a server corresponding to the application module using the data storage method; A splicing module, used for obtaining an expiration time string of the application data according to a preset requirement for setting the expiration time of the application data, loading the expiration time string into the application data using a preset JavaScript script, obtaining the expiration time of the application data, obtaining a key value of the application data and an expiration string of the expiration time, combining the key value and the expiration string using a splicing character, and obtaining a storage object; A storage module, used for storing the storage object in a local disk of the terminal system; an identification module, configured to respond to a data access request of a user, obtain a key value of the data to be accessed from the data access request, query a key value of a corresponding storage object from the local disk according to the key value of the data to be accessed, obtain a target storage object, and identify whether an expiration time in the target storage object has expired; The identification module is further configured to return empty data to the user when the expiration time expires; The identification module is further configured to return the application data in the target storage object to the user when the expiration time has not expired.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the data access method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data access method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data buffer store method and system at duster environment

    CN101090401A

  • Information storage method and device

    CN110019263A

  • Data matching method and system, computer equipment and computer readable storage medium

    CN110766047A

  • Text online editing method and device, electronic equipment and storage medium

    CN111428451A