Method and system for storing and flexibly calling application program data
Technical Field
The present invention relates to the field of data storage and call, and in particular, to a method and system for storing and flexibly calling application program data.
Background
With the advent of the information age, tax administration and tax return have begun to be performed by application programs, however, currently, software provided by tax authorities, such as tax friends, can only run on a local computer, data is stored in the local computer, users can only view and use the data on the local computer, and the data stored in the local computer is inconvenient and has a risk of losing and damaging.
Moreover, at present, part of financial software can only manage one enterprise, is inconvenient for accounting to realize the management and tax return of a plurality of enterprises, and part of software can realize the management of a plurality of enterprises, however, can only carry out operations such as tax return and the like on a local computer, cannot be operated by a plurality of persons at the same time, and also easily causes dirty data.
Disclosure of Invention
The invention aims to solve the problems that application program data can only be stored in a local database, the viewing and the use are inconvenient, the risk of losing and damaging exists, multiple persons are not allowed to use the application program data simultaneously, and dirty data is easy to generate.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the method and the system for storing and flexibly calling the application program data comprise application software, a data management service module and a cloud data storage service module, and concretely comprise the following steps:
step S1: the application software sends a request to the data management service module to request the downloading of enterprise data;
step S2: the data management service module judges whether a person is using the enterprise data, if yes, the error reporting of the use of the person is returned, otherwise, the step S3 is executed;
step S3: the data management service module locks the enterprise data and returns a data downloading address;
step S4: the application software downloads the enterprise data from the cloud data storage service module to the local database through the data download address, and operates the enterprise data to update the enterprise data;
step S5: the application software uploads the updated enterprise data to the cloud data storage service module;
step S6: the data management service module unlocks the enterprise data.
Further, in step S2, when the data management service module determines that someone is using the enterprise data, further selecting whether to continue to request the data, if so, returning to execute step S1, and sending a request again to the data management service module by the application program; otherwise, the program is directly ended.
The system comprises application software, a data management service module and a cloud data storage service module, wherein the application software is used for providing enterprise data for users, the data management service module plays a role of a server and is used for receiving requests sent by the application software and deciding whether to provide data downloading addresses for the application program or not, and the cloud data storage service module is used for storing the enterprise data.
Preferably, the application program further comprises a local receiving module and a local sending module, the cloud data storage service module further comprises a cloud receiving module and a cloud sending module, the local receiving module is connected with the cloud sending module, and the cloud sending module sends the enterprise data to the local receiving module during downloading; the local sending module is connected to the cloud receiving module, and the local sending module sends enterprise data to the cloud receiving module during uploading.
Preferably, the data management service module further includes a request receiving module, a query module, a data lock module and an address return module, where the receiving end of the request receiving module is connected with the application program, the transmitting end of the request receiving module is connected with the receiving end of the query module, the transmitting end of the query module is respectively connected with the data lock module and the address return module, the request receiving module is used to receive a request sent by the application program and send specific content of the request to the query module, the query module is used to determine whether the requested enterprise data is occupied, if the request is occupied, the query module returns the request, if the enterprise data is free, the data lock module is used to lock the enterprise data in the cloud data storage service module, and prevent the request from being called by other people, and meanwhile, the address return module is used to send a storage URL address of the enterprise data to the application program.
Further, when the application program uploads the enterprise data to the cloud data storage service module and new historical data is generated in the cloud data storage service module, the data lock module unlocks the enterprise data. And when the cloud data storage service module or the application program is unlocked, the cloud data storage service module or the application program sends information to the data lock module.
Preferably, the application program comprises a plurality of application programs, and the application programs can be used on a plurality of computers simultaneously, and meanwhile, the data management service module executes corresponding locking operation to prevent dirty data.
Preferably, each enterprise data corresponds to an ID, and the login user name of the application program should be matched with the ID when the data is called, so that the downloading and the operation of the enterprise data can be realized.
Preferably, the enterprise data uploaded by the application program each time is named by an id+timestamp, thereby achieving the function of retaining the history data.
Compared with the prior art, the invention has the beneficial effects that:
1. the method can realize that a plurality of application programs on a plurality of computers can call enterprise data stored in the cloud data storage service module at the same time, is convenient for a plurality of people to operate, and improves user experience;
2. after the user finishes operating the enterprise data by the application program, the enterprise data is uploaded to a cloud data storage service module to backup the data, so that the local data is prevented from being damaged or lost, and the safety of the enterprise data is improved;
3. when someone occupies a certain enterprise data, the data management service module locks the enterprise data, and dirty data is avoided.
Drawings
FIG. 1 is a flow chart of the present invention;
fig. 2 is a schematic block diagram of the present invention.
Detailed Description
For a further understanding of the objects, construction, features, and functions of the invention, reference should be made to the following detailed description of the preferred embodiments.
Referring to fig. 1, a method and a system for storing and flexibly calling application program data include application software, a data management service module and a cloud data storage service module, and specifically include the following steps:
step S1: the application software sends a request to the data management service module to request the downloading of enterprise data;
step S2: the data management service module judges whether a person is using the enterprise data, if yes, the error reporting of the use of the person is returned, otherwise, the step S3 is executed;
step S3: the data management service module locks the enterprise data and returns a data downloading address;
step S4: the application software downloads the enterprise data from the cloud data storage service module to the local database through the data download address, and operates the enterprise data to update the enterprise data;
step S5: the application software uploads the updated enterprise data to the cloud data storage service module;
step S6: the data management service module unlocks the enterprise data.
Referring to fig. 1, in step S2, when the data management service module determines that someone is using the enterprise data, further selects whether to continue to request the data, if so, returns to step S1, and the application program resends the request to the data management service module; otherwise, the program is directly ended.
Referring to fig. 2, a system for storing and flexibly invoking application program data includes application software, a data management service module and a cloud data storage service module, wherein the application software is used for providing enterprise data for users, the data management service module plays a role of a server, is used for receiving a request sent by the application software and determining whether to provide a data download address for the application program, and the cloud data storage service module is used for storing the enterprise data.
The cloud data storage service module comprises a cloud receiving module and a cloud sending module, wherein the local receiving module is connected with the cloud sending module, and the cloud sending module sends enterprise data to the local receiving module during downloading; the local sending module is connected to the cloud receiving module, and the local sending module sends enterprise data to the cloud receiving module during uploading.
Specifically, the data management service module further includes a request receiving module, a query module, a data lock module and an address return module, wherein a receiving end of the request receiving module is connected with the application program, a transmitting end of the request receiving module is connected with a receiving end of the query module, a transmitting end of the query module is respectively connected with the data lock module and the address return module, the request receiving module is used for receiving a request sent by the application program and sending specific content of the request to the query module, the query module is used for judging whether enterprise data of the request is occupied or not, if the enterprise data is occupied, the request is returned, if the enterprise data is unoccupied, information is respectively sent to the data lock module and the address return module, the data lock module is used for locking the enterprise data in the cloud data storage service module, other people are prevented from calling the data, and meanwhile, the address return module is used for sending a storage URL address of the enterprise data to the application program.
In an embodiment, when the application program uploads the enterprise data to the cloud data storage service module and new history data is generated in the cloud data storage service module, the data lock module unlocks the enterprise data. And when the cloud data storage service module or the application program is unlocked, the cloud data storage service module or the application program sends information to the data lock module.
In one embodiment, the application program includes a plurality of applications that can be used simultaneously on a plurality of computers, and the data management service module performs a corresponding locking operation to prevent dirty data from being generated.
In one embodiment, each enterprise data corresponds to an ID, and the login user name of the application program should be matched with the ID when the data is called, so that the downloading and the operation of the enterprise data can be realized. Specifically, the enterprise data uploaded by the application program each time is named by an id+timestamp, thereby achieving the function of retaining the history data.
The invention has been described with respect to the above-described embodiments, however, the above-described embodiments are merely examples of practicing the invention. It should be noted that the disclosed embodiments do not limit the scope of the invention. On the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.