CN112612789A - Data access method and device, electronic equipment and storage medium - Google Patents

Data access method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112612789A
CN112612789A CN202011478852.3A CN202011478852A CN112612789A CN 112612789 A CN112612789 A CN 112612789A CN 202011478852 A CN202011478852 A CN 202011478852A CN 112612789 A CN112612789 A CN 112612789A
Authority
CN
China
Prior art keywords
data
storage object
application
storage
key value
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.)
Pending
Application number
CN202011478852.3A
Other languages
Chinese (zh)
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.)
Ping An Consumer Finance Co Ltd
Original Assignee
Ping An Consumer Finance 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 Ping An Consumer Finance Co Ltd filed Critical Ping An Consumer Finance Co Ltd
Priority to CN202011478852.3A priority Critical patent/CN112612789A/en
Publication of CN112612789A publication Critical patent/CN112612789A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of data processing, and discloses a data access method, which comprises the following steps: configuring a data storage method in an application module of a terminal system, and acquiring application data from a server corresponding to the application module by using the data storage method; configuring failure time of application data, and splicing the application data and the failure time to generate a storage object; storing the storage object into a local disk of a terminal system; responding to a data access request of a user, inquiring a corresponding storage object from a local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due; if the expiration time expires, returning empty data to the user; and if the expiration time is not expired, returning the application data in the target storage object to the user. Furthermore, the invention also relates to a blockchain technique, wherein the storage objects can be stored in the blockchain. The invention can improve the efficiency of data access.

Description

Data access method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data access method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The development of a terminal system (such as an Android system) is essentially that communication is carried out between equipment and a web server in the internet, data is necessarily acquired from a server, the repeated acquisition of the data through a network is time-consuming, particularly, when access is more, the performance is greatly influenced, frequent network operation can be reduced through secondary cache in the Android system, the flow is reduced, and the performance is improved.
The traditional Android system uses SharePreference for data caching. However, the SharePreference only supports data storage, and does not provide a setting of timeout and invalidation of data caching, for example, data requested by the server needs to be cached, and the caching time is limited, and a set of setting scheme of timeout and invalidation of data caching needs to be redeveloped when the SharePreference is used for caching data, which greatly affects the efficiency of data access.
Disclosure of Invention
The invention provides a data access method, a data access device, electronic equipment and a computer readable storage medium, and mainly aims to improve the efficiency of data access.
In order to achieve the above object, the present invention provides a data access method, including:
configuring a data storage method in an application module of a terminal system, and acquiring application data from a server corresponding to the application module by using the data storage method;
acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
storing the storage object into a local disk of the terminal system;
responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due;
if the expiration time expires, returning empty data to the user;
and if the expiration time is not expired, returning the application data in the target storage object to the user.
Optionally, the method for configuring data storage in the application module of the terminal system includes:
acquiring a compiling environment of the application module, and loading a storage method in the compiling environment;
and setting a data storage rule in the storage method to obtain the data storage method.
Optionally, the splicing the application data and the expiration time to generate the storage object includes:
obtaining a key value of the application data and a failure character string of the failure time;
and combining the key value and the failure character string by using splicing characters to obtain the storage object.
Optionally, storing the storage object in a 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 by using a pre-created data transmission channel.
Optionally, before the transmitting the storage object to the key value table by using the pre-created data transmission channel, the method further includes:
acquiring 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 bits in the first configuration file and the second configuration file, and adding attribute parameters in the identification bits;
and executing the configuration of the data transmission channel according to the attribute parameters.
Optionally, the querying, in response to the user data access request, the corresponding storage object from the local disk to obtain the target storage object includes:
and acquiring a key value of the data to be accessed of 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 taking the successfully matched storage object as the target storage object.
Optionally, the matching the key value of the data to be accessed and the key value of the storage object in the local disk includes:
matching the data key value to be accessed with the key value of the storage object in the local disk by using the following method:
Figure BDA0002837866080000021
wherein T (x, y) represents a degree of matching, xiIndicates the i-th key value of the data to be accessed, yiRepresenting the ith key value in the storage object.
In order to solve the above problem, the present invention further provides a data access apparatus, comprising:
the acquisition module is used for configuring a data storage method in an application module of a terminal system and acquiring application data from a server corresponding to the application module by using the data storage method;
the splicing module is used for acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
the storage module is used for storing the storage object into a local disk of the terminal system;
the identification module is used for responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due or not;
the identification module is further used for returning 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 is not expired.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to implement the data access method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the data access method described above.
The embodiment of the invention firstly configures a data storage method in an application module of a terminal system, and the data storage method is utilized to acquire application data from a server corresponding to the application module, so that the data to be cached can be quickly read; secondly, acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain failure time of the application data, splicing the application data and the failure time to generate a storage object, realizing self-definition of the failure time of the data to be cached, meeting development requirements of different users, generating the storage object by adopting a data-time splicing method, meeting high-speed reading of a subsequent storage object, and storing the storage object into a local disk of the terminal system, so that data storage is more flexible and throughput of high data volume is supported; further, responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and returning corresponding data to the user according to the failure time in the target storage object. Therefore, the data access method, the data access device, the electronic equipment and the storage medium can improve the data access efficiency.
Drawings
FIG. 1 is a flow chart illustrating a data access method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart illustrating a step of the data access method provided in FIG. 1 according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a data access device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an internal structure of an electronic device implementing a data access method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a data access method. The executing body of the data access method includes, but is not limited to, at least one of electronic devices such as a server and a terminal, which can be configured to execute the method provided by the embodiments of the present application. In other words, the data access method may be performed by software or hardware installed in the terminal device or the server device, and the software may 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, and the like.
Fig. 1 is a schematic flow chart illustrating a data access method according to an embodiment of the invention. In an embodiment of the present invention, the data access method includes:
s1, configuring a data storage method in the application module of the terminal system, and acquiring the application data from the server corresponding to the application module by using the data storage method.
In the embodiment of the present invention, the terminal system includes an Android system, the Android system may be applied to a smart phone and is used to control and manage hardware and software resources of the smart phone, and the application module refers to a specific service application module implemented on the terminal system, such as an application store module, a login module, and an app module.
It should be understood that, when an application access is performed in an application module of the terminal system, data interaction is performed with a corresponding server, for example, pictures are downloaded in the app module of the terminal system, and corresponding pictures are queried and downloaded from the server corresponding to the app module, where the server may be a web server.
Further, referring to fig. 2, the method for configuring data storage in the application module of the terminal system includes:
s20, acquiring a compiling environment of the application module, and loading a storage method in the compiling environment;
and S21, setting a data storage rule in the storage method to obtain the data storage method.
In an alternative embodiment, the compiling environment is determined based on different developers, for example, developer a adopts a Myeclipse compiling environment as the compiling environment of the application module.
In an optional embodiment, the store method is a public void put () method, and the store method may be loaded by a load instruction, where the load instruction includes a load instruction.
In an optional embodiment, the data storage rule is set by a string class, for example, in the storage method, it is set that: a public void put (String key, String value, int saveTime) data storage rule, the obtained application data includes: key (key of data), value (content of data), saveTime (storage time of data).
Further, the embodiment of the present invention obtains the application data and the corresponding storage time from the server corresponding to the application module by using the data storage method, so as to realize the rapid reading of the subsequent data.
In detail, the obtaining of the application data from the server corresponding to the application module by using the data storage method includes: and acquiring a data access request of the application module, and inquiring application data from a server corresponding to the application module according to the data access request and the data storage method.
The data access request is determined based on different users, for example, the requirement of the user a is to download a landscape picture, the requirement of the user a is to query an order, and the like.
S2, acquiring the failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object.
It should be understood that if the application data is directly stored in the local disk of the terminal system, storage pressure is easily brought to the local disk, so that the operating pressure of the terminal system is affected, and therefore, in the embodiment of the present invention, by acquiring the failure time character string of the application data, and loading the failure time character string into the application data by using a preset script, the failure time of the application data is obtained, so as to implement updating and filtering of the application data, and ensure normal operation of the terminal system. The failure time character string is obtained according to the requirements of different developers, for example, if the requirement of the developer A is that the failure time of the application data is 1 hour, the failure time character string is obtained as one time; and compiling the preset script through a JavaScript script, and realizing the configuration of the failure time of the application data.
Further, in order to more intuitively know the relationship between the data and the time in the application data, the invention splices the application data and the failure time to generate a storage object.
Specifically, the splicing the application data and the expiration time to generate the storage object includes: obtaining a key value of the application data and a failure character string of the failure time; and combining the key value and the failure character string by using splicing characters to obtain the storage object.
The key value is used for representing the data type of the application data, the failure character string is used for representing the failure time point of the application data, and the splicing character can be "-".
And S3, storing the storage object into a local disk of the terminal system.
In the embodiment of the invention, the storage object is stored in the local disk of the terminal system, so that a user can directly inquire from the local disk when inquiring data, the interaction between the user and a server is reduced, and the response speed of the data is improved.
In detail, the storing the storage object into a 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 by using a pre-created data transmission channel.
It should be noted that, in the embodiment of the present invention, the storage form of the storage object is a key-value pair (key-value) form, so as to improve high-speed reading of subsequent data, therefore, according to the key value of the storage object, the embodiment of the present invention constructs a corresponding key value table in the local disk, and optionally, the key value table is compiled through an sql language.
In an alternative embodiment, the transferring of the memory object is performed by a message transfer component comprising: mq message middleware.
Further, in this embodiment of the present invention, before the transmitting the storage object to the key value table by using a pre-created data transmission channel, the method further includes: acquiring 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 bits in the first configuration file and the second configuration file, and adding attribute parameters in the identification bits; and executing the configuration of the data transmission channel according to the attribute parameters.
In an optional embodiment, the definition of the flag bit may be defined by an SQL statement, and the attribute parameters include: a primary key, an id, a field and the like, and the data transmission channel is compiled through a Java language.
Further, to ensure the privacy and availability of the storage object, the storage object may also be stored in a blockchain node.
S4, responding to the data access request of the user, inquiring the corresponding storage object from the local disk to obtain the target storage object, and identifying whether the expiration time in the target storage object is due.
In the embodiment of the invention, the corresponding storage object is inquired from the local disk in response to the data access request of the user so as to realize the direct reading of the data of the local disk, and the network request times with the server are reduced, thereby reducing the consumption of network resources.
In detail, the querying a corresponding storage object from the local disk in response to the user data access request includes: and acquiring a key value of the data to be accessed of 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 taking the successfully matched storage object as the target storage object.
In an optional embodiment, the data key value to be accessed is matched with the key value of the storage object in the local disk by using the following method:
Figure BDA0002837866080000071
wherein T (x, y) represents a degree of matching, xiIndicates the i-th key value of the data to be accessed, yiRepresenting the ith key value in the storage object. If the matching degree is 1, it indicates that the key value of the data to be accessed is matched with the key value of the storage object in the local diskIf the matching degree is not 1, the data key value to be accessed and the key value of the storage object in the local disk are failed to be matched.
Further, another embodiment of the present invention may further include: and if the corresponding storage object is not inquired in the local disk, returning empty data to the user by a getSaveString () method.
Further, the embodiment of the present invention identifies whether the expiration time in the storage object expires, so as to determine whether to return the application data in the storage object to the user. Specifically, according to the access time of the data access request, the embodiment of the present invention determines whether the expiration time in the target storage object expires, that is, if the access time exceeds the expiration time, the expiration time is determined to expire, and if the access time does not exceed the expiration time, the expiration time is determined to not expire.
If the expiration time expires, S5 is executed to return empty data to the user.
In the embodiment of the present invention, if the expiration time expires, it indicates that the data accessed corresponding to the data access request has expired in the local disk, and then, the present invention returns the empty data to the user by using a getsave string () method.
If the expiration time is not expired, executing S6, and returning the application data in the target storage object to the user.
In the embodiment of the present invention, if the expiration time is not expired, it indicates that the data accessed corresponding to the data access request is not expired in the local disk, and then, the present invention returns the application data in the target storage object to the user by using a getsave string () method.
The embodiment of the invention firstly configures a data storage method in an application module of a terminal system, and the data storage method is utilized to acquire application data from a server corresponding to the application module, so that the data to be cached can be quickly read; secondly, acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain failure time of the application data, splicing the application data and the failure time to generate a storage object, realizing self-definition of the failure time of the data to be cached, meeting development requirements of different users, generating the storage object by adopting a data-time splicing method, meeting high-speed reading of a subsequent storage object, and storing the storage object into a local disk of the terminal system, so that data storage is more flexible and throughput of high data volume is supported; further, responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and returning corresponding data to the user according to the failure time in the target storage object. Therefore, the invention can improve the efficiency of data access.
FIG. 3 is a functional block diagram of the data access device of the present invention.
The data access device 100 of the present invention can be installed in an electronic device. Depending on the implemented functionality, the data access means may comprise an acquisition module 101, a splicing module 102, a storage module 103, and an identification module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the obtaining module 101 is configured to configure a data storage method in an application module of a terminal system, and obtain application data from a server corresponding to the application module by using the data storage method;
the splicing module 102 is configured to obtain a failure time character string of the application data, load the failure time character string into the application data to obtain failure time of the application data, and splice the application data and the failure time to generate a storage object;
the storage module 103 is configured to store the storage object in a local disk of the terminal system;
the identification module 104 is configured to, in response to a data access request of a user, query a corresponding storage object from the local disk to obtain a target storage object, and identify whether expiration time in the target storage object expires;
the identification module 104 is further configured to return empty data to the user when the expiration time expires
The identifying 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.
In detail, when the modules in the data access apparatus 100 according to the embodiment of the present invention are used, the same technical means as the data access method described in fig. 1 and fig. 2 are adopted, and the same technical effects can be produced, and no further description is provided herein.
Fig. 4 is a schematic structural diagram of an electronic device implementing the data access method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a data access program 12, stored in the memory 11 and operable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes for data access, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged 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. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, performing data access and the like) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and 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 are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The data access 12 stored by the memory 11 in the electronic device 1 is a combination of computer programs which, when run in the processor 10, enable:
configuring a data storage method in an application module of a terminal system, and acquiring application data from a server corresponding to the application module by using the data storage method;
acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
storing the storage object into a local disk of the terminal system;
responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due;
if the expiration time expires, returning empty data to the user;
and if the expiration time is not expired, returning the application data in the target storage object to the user.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
configuring a data storage method in an application module of a terminal system, and acquiring application data from a server corresponding to the application module by using the data storage method;
acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
storing the storage object into a local disk of the terminal system;
responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due;
if the expiration time expires, returning empty data to the user;
and if the expiration time is not expired, returning the application data in the target storage object to the user.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for accessing data, the method comprising:
configuring a data storage method in an application module of a terminal system, and acquiring application data from a server corresponding to the application module by using the data storage method;
acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
storing the storage object into a local disk of the terminal system;
responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due;
if the expiration time expires, returning empty data to the user;
and if the expiration time is not expired, returning the application data in the target storage object to the user.
2. The data access method of claim 1, wherein configuring the data storage method in the application module of the terminal system comprises:
acquiring a compiling environment of the application module, and loading a storage method in the compiling environment;
and setting a data storage rule in the storage method to obtain the data storage method.
3. The data access method of claim 1, wherein the concatenating the application data and the expiration time to generate the storage object comprises:
obtaining a key value of the application data and a failure character string of the failure time;
and combining the key value and the failure character string by using splicing characters to obtain the storage object.
4. The data access method of claim 1, wherein storing the storage object in a local disk of the end system comprises:
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 by using a pre-created data transmission channel.
5. The data access method of claim 4, wherein prior to transferring the memory object into the key value table using the pre-created data transfer channel, further comprising:
acquiring 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 bits in the first configuration file and the second configuration file, and adding attribute parameters in the identification bits;
and executing the configuration of the data transmission channel according to the attribute parameters.
6. The data access method of any one of claims 1 to 5, wherein the querying the corresponding storage object from the local disk in response to the user data access request to obtain the target storage object comprises:
and acquiring a key value of the data to be accessed of 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 taking the successfully matched storage object as the target storage object.
7. The data access method of claim 6, wherein matching the key value of the data to be accessed with the key value of the storage object in the local disk comprises:
matching the data key value to be accessed with the key value of the storage object in the local disk by using the following method:
Figure FDA0002837866070000021
wherein T (x, y) represents a degree of matching, xiIndicates the i-th key value of the data to be accessed, yiRepresenting the ith key value in the storage object.
8. A data access device, the device comprising:
the acquisition module is used for configuring a data storage method in an application module of a terminal system and acquiring application data from a server corresponding to the application module by using the data storage method;
the splicing module is used for acquiring a failure time character string of the application data, loading the failure time character string into the application data to obtain the failure time of the application data, and splicing the application data and the failure time to generate a storage object;
the storage module is used for storing the storage object into a local disk of the terminal system;
the identification module is used for responding to a data access request of a user, inquiring a corresponding storage object from the local disk to obtain a target storage object, and identifying whether the failure time in the target storage object is due or not;
the identification module is further used for returning 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 is not expired.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data access method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the data access method according to any one of claims 1 to 7.
CN202011478852.3A 2020-12-15 2020-12-15 Data access method and device, electronic equipment and storage medium Pending CN112612789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011478852.3A CN112612789A (en) 2020-12-15 2020-12-15 Data access method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011478852.3A CN112612789A (en) 2020-12-15 2020-12-15 Data access method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112612789A true CN112612789A (en) 2021-04-06

Family

ID=75239226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011478852.3A Pending CN112612789A (en) 2020-12-15 2020-12-15 Data access method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112612789A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN105608115A (en) * 2015-12-11 2016-05-25 北京奇虎科技有限公司 Data acquisition method and apparatus
CN110019263A (en) * 2017-10-18 2019-07-16 北京京东尚科信息技术有限公司 Information storage means and device
CN110766047A (en) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 Data matching method, system, computer device and computer readable storage medium
CN111428451A (en) * 2020-06-09 2020-07-17 平安国际智慧城市科技股份有限公司 Text online editing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN105608115A (en) * 2015-12-11 2016-05-25 北京奇虎科技有限公司 Data acquisition method and apparatus
CN110019263A (en) * 2017-10-18 2019-07-16 北京京东尚科信息技术有限公司 Information storage means and device
CN110766047A (en) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 Data matching method, system, computer device and computer readable storage medium
CN111428451A (en) * 2020-06-09 2020-07-17 平安国际智慧城市科技股份有限公司 Text online editing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112528307A (en) Service request checking method and device, electronic equipment and storage medium
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN112685117A (en) System language internationalization maintenance method, device and computer readable storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN113704665A (en) Dynamic service publishing method, device, electronic equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN113297180A (en) Data migration method and device, electronic equipment and storage medium
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
CN113434501A (en) Storage method and device of relational database table and readable storage medium
CN113032275A (en) Method and device for testing field, electronic equipment and storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
CN115174541A (en) H5 resource loading method and device, electronic equipment and storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN114895942A (en) Application skin changing method, device, equipment and storage medium
CN112612789A (en) Data access method and device, electronic equipment and storage medium
CN115080899A (en) Interactive sub-web page starting method, device, equipment and storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN112540839A (en) Information changing method, device, electronic equipment and storage medium
CN114003661A (en) Offline data entry method and device, electronic equipment and storage medium
CN113364848A (en) File caching method and device, electronic equipment and storage medium
CN112328656A (en) Service query method, device, equipment and storage medium based on middle platform architecture
CN113452785B (en) Service access method and device based on offline resources, electronic equipment and medium
CN113704109B (en) Front-end and back-end data interaction method and device, electronic equipment and storage medium
CN114416575A (en) Method, device and equipment for generating Mock data and storage medium

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