[go: up one dir, main page]

CN117573615A - Method for realizing flow archiving of quick-service expense control system - Google Patents

Method for realizing flow archiving of quick-service expense control system Download PDF

Info

Publication number
CN117573615A
CN117573615A CN202311543048.2A CN202311543048A CN117573615A CN 117573615 A CN117573615 A CN 117573615A CN 202311543048 A CN202311543048 A CN 202311543048A CN 117573615 A CN117573615 A CN 117573615A
Authority
CN
China
Prior art keywords
archiving
control system
flow
realizing
expense control
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
CN202311543048.2A
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202311543048.2A priority Critical patent/CN117573615A/en
Publication of CN117573615A publication Critical patent/CN117573615A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

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)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of software, in particular to a method for realizing flow archiving of a quick-service industry expense control system, which comprises the following steps: generating a static page; the data to be archived are sent to the back end, the back end records the archiving state, and then the program in the front end archiving item is called to construct a static page; the back end generates a construction product after calling the construction program, the construction product is deployed into a Web server, and the Web server provides access; the beneficial effects are as follows: the method for realizing the flow archiving of the fast-burning business expense control system provided by the invention adopts the flow archiving realization scheme of the fast-burning business expense control system, the method realizes the access control of the archive file, and solves the problem that the current quick-elimination industry lacks an effective cost control system flow archive realization method.

Description

Method for realizing flow archiving of quick-service expense control system
Technical Field
The invention relates to the technical field of software, in particular to a method for realizing flow archiving of a quick-service industry expense control system.
Background
Archiving, also called archiving, refers to the process of sorting and storing objects that have been processed and are of preservation value.
In the prior art, "archiving" is ubiquitous in daily life: save university admission notes, deposit precious photos into albums, place favorite bookmarks into drawers, etc. For the fast-burning industry, the income and the expenditure of the charge of the last year are summarized and reserved each year, so that the fast-burning industry also needs to archive the summarized flow.
However, the fast-burning industry currently lacks an effective cost control system flow archiving implementation method.
Disclosure of Invention
The invention aims to provide a method for realizing flow archiving of a quick-service expense control system, which aims to solve the problems in the background technology.
In order to achieve the above purpose, the present invention provides the following technical solutions: a method for realizing flow archiving of a quick-service expense control system comprises the following steps:
generating a static page;
the data to be archived are sent to the back end, the back end records the archiving state, and then the program in the front end archiving item is called to construct a static page;
and generating a construction product after the back-end invokes the construction program, deploying the construction product into a Web server, and providing access by the Web server.
Preferably, the static page is generated using a static website generator that converts templates and content into a static HTML page.
Preferably, for engineering projects using frameworks, the statics are implemented by means of some projects in the framework ecology, the exact engineering static HTML page is derived using next.
Preferably, the code invokes a yarn command to construct static HTML.
Preferably, the parameters are passed to the front-end build item when the static page is generated.
Preferably, the user logs in before accessing the system, has permission to access the page and acquire data after acquiring login credentials, and the user login credentials are required to be transmitted to the building program as well as the request parameters.
Preferably, the specific operation of the backend to pass parameters to the front-end build project includes:
creating a file for each piece of filing data, writing parameters into the file in a certain format, reading the corresponding parameter file by a construction item, constructing, and deleting the parameter file after the construction is completed;
and writing the parameters into the environment variable, reading the values in the environment variable by the construction project, and for the NodeJS project, realizing the API for acquiring the environment variable by the NodeJS.
Preferably, a Web server deployment catalog configuration is added in the backend, which is used to move the artifacts to the deployment catalog after construction.
Compared with the prior art, the invention has the beneficial effects that:
the method for realizing the flow archiving of the fast-burning business expense control system provided by the invention adopts the flow archiving realization scheme of the fast-burning business expense control system, the method realizes the access control of the archive file, and solves the problem that the current quick-elimination industry lacks an effective cost control system flow archive realization method.
Drawings
FIG. 1 is a flow chart of a calling program of the present invention;
FIG. 2 is a flow chart of the access check of the present invention.
Detailed Description
In order to make the objects, technical solutions, and advantages of the present invention more apparent, the embodiments of the present invention will be further described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are some, but not all, embodiments of the present invention, are intended to be illustrative only and not limiting of the embodiments of the present invention, and that all other embodiments obtained by persons of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
Referring to fig. 1 to 2, the present invention provides a technical solution: a method for realizing flow archiving of a quick-service expense control system comprises the following steps:
1) Generating static pages
In addition to the data being archived, the pages need to be archived, and the archived pages need to be "static", i.e., static pages are generated. The purpose of this is that the user always sees a page, which is more intuitive than the data; with version iterations, pages and data structures may change, which is not in compliance with the archiving principles, because changes always occur, and if historical versions are preserved, version information of each piece of data needs to be maintained; the generated static page can be distributed to any place and can be viewed even on a personal computer; avoiding dynamically rendering pages at access time. Archiving pages is also costly and if the user is now visiting a static page, this step can go straight ahead. Otherwise, program code may need to be modified to generate static pages.
Static pages may be generated using a static website generator. Static website generators are an automated tool that can convert templates and content into static HTML pages. Typically, developers use template languages and Markdown files to create content, which is then converted to HTML files using a static website generator. Some popular static website generators include Jekyll, hugo, gatsby, etc.
For some engineering projects using frameworks, the staticization can be achieved by means of some projects in the framework ecology, such as using Next.js to export the real engineering static HTML page and Nuxt.js to export the Vue engineering static HTML page.
2) Calling program
Generally, archiving is performed in a time dimension, for example, archiving data from the last year, which may also require other conditions to be met. The user selects the data to be archived, the user clicks a button to send the data to be archived to the back end, the back end records the archiving state, and then the program in the front end archiving item is called to construct a static page, as shown in figure 1;
many programming languages provide APIs for calling native programs, hereinafter exemplified by Java code,
the above code would call the yarn command to construct static HTML. Some programming languages including Java call local programs to start a new process, developers who learn an operating system know that the process is an operating system unit which consumes resources more than threads, and a large number of CPUs, memories and the like can be used for creating a plurality of subprocesses, so that when the programs are called concurrently, the situation of resources such as the concurrent quantity and the CPUs is concerned, and proper concurrent quantity parameters are found. Likewise, the destruction process consumes a lot of resources. The creation and destruction of the process are points which can be optimized, and the thought of a thread pool can be consulted, so that the use of the process pool is considered, the use of resources is reduced, and the performance of the program is improved.
When some detail pages are accessed, the request parameters are usually carried to the next page during the jump, the detail pages acquire the carried parameters, and acquire corresponding data, for example, jump to a detailed information page of the user a in the user list, and the address after the jump is/username=a. Parameters also need to be passed to the front-end build item when generating the static page. Before accessing the system, the user generally needs to log in first, and can have authority to access the page and acquire data after acquiring login credentials, and the user login credentials are transmitted to the building program as well as the request parameters. In addition, some other parameters may be needed, and each piece of data to be archived should correspond to a set of parameters, which may be the same or different, depending on the project requirements. The backend needs to acquire these parameters before the caller can generate static HTML. It is sufficient that the parameters need only be obtained once before static HTML is generated.
There are several ways in which the backend communicates parameters to the front-end build project:
a) Creating a file for each piece of archive data, writing parameters into the file in a certain format (such as JSON format), reading the corresponding parameter file by the construction item, constructing, and deleting the parameter file after the construction is completed.
b) Parameters are written to the environment variables and build items read values in the environment variables. For the NodeJS project, the mode is easy to realize, and the NodeJS already realizes the API for obtaining the environment variable. Compared with the first mode, the method is simpler, and file creation, deletion, writing, reading and other operations are avoided.
Parameter transmission is realized through environment variables in the existing project of the editor. And setting an environment variable when the back-end calls the command. Setting environment variables by command set command on Windows system, setting environment variables by export command on Unix-like system,
3) Deployment
The back end calls the construction program to generate a construction product, and the construction product is the generated static HTML, JS, CSS, pictures and the like, and the construction product needs to be deployed in a Web server, so that the Web server provides access. A Web server deployment catalog configuration needs to be added in the backend, which is used after construction to move artifacts to the deployment catalog.
Data security
After the back-end service is deployed, the archiving function is almost completed, and finally the archiving state is updated, and the URL for accessing the static HTML needs to be saved. The user can jump to a specific archive page on the archived data list page, and the user only needs one access URL to access the archive page, which is unsafe for pages with confidential data.
The access check may be implemented by a Web server. When the user accesses the URL, the login credential is acquired from the browser and is used as a parameter to jump to an archiving page, the Web server acquires the login credential parameter, and if the parameter is not acquired, the user is redirected to a 401 page to prompt that the user has no access. If a login credential exists, checking whether the login credential is valid, if so, judging whether the user has authority to access, if so, accessing the page, and if not, redirecting to the page 403; if invalid, redirect to page 401, flow is as in FIG. 2;
openResty is recommended as the Web server. Openresolution is based on ng inx, which can run Lua scripts using its LuaJIT engine. In openResty, when processing a request, multiple execution phases are passed, one of which is access check, so that access check is easily implemented in openResty. Only the configuration is required to be added and,
location/archive{
access_by_lua_file access control script;
root archive directory;
}
writing own access control lua script.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (8)

1. A method for realizing flow archiving of a quick-service expense control system is characterized in that: the method comprises the following steps:
generating a static page;
the data to be archived are sent to the back end, the back end records the archiving state, and then the program in the front end archiving item is called to construct a static page;
and generating a construction product after the back-end invokes the construction program, deploying the construction product into a Web server, and providing access by the Web server.
2. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: the static page is generated using a static website generator that converts templates and content into a static HTML page.
3. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: for engineering projects using frameworks, the staticization is achieved by means of some projects in the framework ecology, a real engineering static HTML page is exported by using Next.
4. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: code invokes a yarn command to construct static HTML.
5. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: parameters are passed to the front-end build item when the static page is generated.
6. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: the user logs in before accessing the system, has authority to access the page and acquire data after acquiring login credentials, and the user login credentials are required to be transmitted to the building program as well as request parameters.
7. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: the specific operations by which the backend passes parameters to the front-end build project include:
creating a file for each piece of filing data, writing parameters into the file in a certain format, reading the corresponding parameter file by a construction item, constructing, and deleting the parameter file after the construction is completed;
and writing the parameters into the environment variable, reading the values in the environment variable by the construction project, and for the NodeJS project, realizing the API for acquiring the environment variable by the NodeJS.
8. The method for realizing the flow archiving of the fast-burning industrial expense control system according to claim 1, wherein the method comprises the following steps: the Web server deployment catalog configuration is added in the backend and used to move artifacts to the deployment catalog after construction.
CN202311543048.2A 2023-11-20 2023-11-20 Method for realizing flow archiving of quick-service expense control system Pending CN117573615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311543048.2A CN117573615A (en) 2023-11-20 2023-11-20 Method for realizing flow archiving of quick-service expense control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311543048.2A CN117573615A (en) 2023-11-20 2023-11-20 Method for realizing flow archiving of quick-service expense control system

Publications (1)

Publication Number Publication Date
CN117573615A true CN117573615A (en) 2024-02-20

Family

ID=89860065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311543048.2A Pending CN117573615A (en) 2023-11-20 2023-11-20 Method for realizing flow archiving of quick-service expense control system

Country Status (1)

Country Link
CN (1) CN117573615A (en)

Similar Documents

Publication Publication Date Title
US6021416A (en) Dynamic source code capture for a selected region of a display
CN108304498A (en) Webpage data acquiring method, device, computer equipment and storage medium
CN111125598A (en) Intelligent data query method, device, equipment and storage medium
CN117033249B (en) Test case generation method and device, computer equipment and storage medium
US6317760B1 (en) Extensible ordered information within a web page
CN110321504B (en) Page processing method and device
EP4198773A1 (en) Image processing method and apparatus, and computer readable storage medium
CN116569165B (en) Page display method and device, storage medium and electronic equipment
CN115794437B (en) Microservice calling method, device, computer equipment and storage medium
CN114996619A (en) Page display method and device, computer equipment and storage medium
CN113051514A (en) Element positioning method and device, electronic equipment and storage medium
CN112087370A (en) Method, system, electronic device and computer-readable storage medium for issuing GitHub Issues
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
JP2016018233A (en) Script caching method and information processing apparatus using the same
CN117573615A (en) Method for realizing flow archiving of quick-service expense control system
US7937715B2 (en) Mechanism for generating dynamic content without a web server
CN115426146B (en) System login method, device, computer equipment and storage medium
CN112527320B (en) Method, device and storage medium for deploying application system based on browser
CN116432176A (en) Web malicious program detection method and system based on cross-language semantic analysis
CN105592108B (en) The method and device of static website is applied in embedded systems
KR101231329B1 (en) System for web data extraction for mobile platform
US8639732B2 (en) Method for storing and reading-out data handled by application operating on HTTP client, data storage program, and data read-out program
CN117519691B (en) Application processing method, device, computer equipment and storage medium
CN108021371A (en) Search dog input method and the integrated approach of IBUS frames under Domestic Platform
CN114398036A (en) Method, device, equipment and medium for converting front-end web project into vue project

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