Method, device and equipment for checking local computer file on line and medium

By generating HTML pages and URL addresses, it provides a method for viewing local folder contents online, solves the problem of viewing across LANs, implements secure remote file access, ensures that users can only view but not modify, and ensures the security of the local system.

CN120676041APending Publication Date: 2025-09-19ZIXUN TECHNOLOGY (FUJIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510762536.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the existing technology, local computer files cannot be viewed online across a local area network and there are security risks, especially when using third-party remote management software, which may lead to user data leakage.

Method used

By generating an HTML page to display the file list of the local folder and listening to the local port to generate a URL address, online services are provided so that users can view the folder contents through the URL address, while ensuring that they can only view and cannot perform other operations. The local HTTP server is used to update the content in real time.

Benefits of technology

It realizes the function of viewing local folder contents online across the LAN, ensuring the security of files. Users can view the latest files anytime and anywhere without affecting the security of the local system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676041A_ABST
    Figure CN120676041A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for checking local computer files online and a medium. The method comprises the following steps: placing files needing to be shared into a local folder; generating a corresponding HTML (Hypertext Markup Language) page which is a file list and comprises links of all files in the local folder; monitoring a port of a local computer, and generating a URL address for opening online service; the HTML page is viewed through the URL address, and the files in the HTML page are viewed through the file list of the HTML page, so that the files of the set computer can be viewed anytime and anywhere, and the security of the set computer is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, equipment and medium for viewing local computer files online. Background Art

[0002] Currently, to view files on a local computer online, you need to make a local folder a shared folder and then place the required files in the shared folder. Others can then view them online, and this online access is limited to the same local area network. If the user is not connected to the local area network, they cannot view the files.

[0003] When the viewing computer and the viewed computer are not in the same local area network, the connection can only be established by downloading and installing third-party remote management software (such as TeamViewer, AnyDesk, etc.); running the software on the computer that needs remote access, obtaining the connection ID and password, running the same software on another computer, and entering the connection ID and password of the target computer; in this way, all files in the computer can be viewed, and addition, deletion, modification and query can be performed, which may lead to the leakage of user information. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for viewing local computer files online, which can view the files of the set computer at any time and anywhere, and ensure the security of the set computer.

[0005] In a first aspect, the present invention provides a method for viewing local computer files online, comprising the following steps:

[0006] Step 1: Place the files to be shared into a local folder; generate a corresponding HTML page, which is a file list and includes links to all files in the local folder;

[0007] Step 2: Monitor a port on the local computer and generate a URL address to open the online service;

[0008] Step 3: View the HTML page through the URL address, and view the files in the HTML page through the file list.

[0009] In a second aspect, the present invention provides a device for viewing local computer files online, comprising:

[0010] The page setting module places the files to be shared into a local folder; generates a corresponding HTML page, which is a file list and includes links to all files in the local folder;

[0011] The open service module listens to a port on the local computer and generates a URL address to open an online service;

[0012] The file viewing module is used to view the HTML page through the URL address and view the files in the HTML page through the file list of the HTML page.

[0013] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the method described in the first aspect when the program is executed by a processor.

[0015] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:

[0016] The present invention can directly view the unshared files of a certain machine online as needed, without the need to manually send the entire folder or log in to the local machine to view;

[0017] The invention only allows users to view files but not perform any other operations, ensuring local security;

[0018] The present invention can update the content in the folder in real time and push it in real time, so that the user can view the content in the latest folder, which is convenient for the user to use.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Figure 1 This is a flowchart of the method in Example 1 of the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of the device in Example 2 of the present invention. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of this application have the following general ideas:

[0024] 1. The report is stored in the local folder;

[0025] 2. Listen to a local port to open an online service (generate a URL address); (equivalent to a local server)

[0026] 3. When a new report is generated, the HTML page is updated in real time through service push notifications;

[0027] 4. Write an HTML page on this service to display all reports in the specified local folder to form a report list;

[0028] 5. Push notification service address;

[0029] 6. Others can view the list of all reports in this local folder online by clicking on this service address.

[0030] The local folder can be used to store test reports. Since the test reports are automatically generated, the files in the local folder are updated in real time. The present invention can display the latest test report; list historical test reports and group them by date and time; provide an API interface to obtain the URL of the latest report; support dynamic update of the report path to ensure that the server can reflect the latest file list in real time; the details are as follows:

[0031] 1. Structural Overview

[0032] It is mainly divided into the following parts:

[0033] Global variables and configuration: defines the server port, the latest report path, etc.

[0034] Auxiliary functions: such as obtaining the local IP address, updating the latest report path, etc.

[0035] HTTP request processor: processes client HTTP requests and provides report pages, historical report lists, and API interfaces.

[0036] Main function: Starts the HTTP server and supports specifying the port through command line parameters.

[0037] 2. Global variables and configuration

[0038]

[0039]

[0040] 3. Helper functions

[0041] 3.1 Get the local IP address

[0042]

[0043] Get the local IP address by establishing a UDP connection to Google's DNS server (8.8.8.8).

[0044] If this fails, it returns 127.0.0.1 (the local loopback address).

[0045] 3.2 Update the latest report path

[0046]

[0047]

[0048]

[0049] First, check whether test_report.html exists in the report folder under the root directory.

[0050] If it does not exist, it traverses the result directory, searches for the latest date and time subdirectory, and finally determines the latest report path.

[0051] Update the global variable latest_report_rel_path.

[0052] 4. HTTP Request Handler

[0053]

[0054]

[0055]

[0056] Redirect the root path to the latest report:

[0057] If you access the root path ( / ), you will be redirected to the path of the latest report.

[0058] If there is no latest report, "No test report available" is displayed.

[0059] To process a historical report request:

[0060] If you access the / history path, an HTML page will be generated, listing links to all history reports.

[0061] Historical reports are grouped by date and time.

[0062] API interface:

[0063] If you access the / api / latest_report path, a JSON object containing the relative path and full URL of the latest report will be returned.

[0064] Supports cross-origin access (via the Access-Control-Allow-Origin header).

[0065] #4.1 Generate historical report HTML page

[0066]

[0067]

[0068]

[0069] Traverse the result directory and list all historical reports grouped by date and time. Each report link points to its corresponding HTML file.

[0070] 5. Start the HTTP server

[0071]

[0072]

[0073] Before starting the server, call update_latest_report_path() to update the latest report path.

[0074] Start a thread to check the latest report path every 10 minutes to ensure that the server can dynamically update the report.

[0075] Use socketserver.TCPServer to start the HTTP server and listen on the specified port.

[0076] 6. Main function

[0077]

[0078] Displays startup information.

[0079] The port number can be specified via command line parameters. If the parameter is invalid or not provided, the default port 1111 is used.

[0080] Call start_report_server() to start the HTTP server.

[0081] In this way, users can store the generated reports in the set folder in real time. Users can log in to view them anytime and anywhere, and can only view them but not make any modifications, thus ensuring the security of local files.

[0082] Example 1

[0083] like Figure 1As shown, this embodiment provides a method for viewing local computer files online, including the following steps:

[0084] Step 1: Place the files to be shared into a local folder; generate a corresponding HTML page, which is a file list and includes links to all files in the local folder;

[0085] Step 2: Monitor a port on the local computer and generate a URL address to open the online service;

[0086] Step 3: View the HTML page through the URL address, and view the files in the HTML page through the file list.

[0087] In this embodiment, preferably, step 1 is specifically as follows: placing the files to be shared into a local folder; generating a corresponding HTML page, which is a file list and includes links to all files in the local folder; and regularly checking the files in the local folder. If there are new files placed in the local folder, the HTML page is updated in real time.

[0088] In this embodiment, preferably, step 2 is specifically: opening a port of the local computer, starting the local HTTP server of the local computer to listen to the port, and obtaining a URL address by creating a UDP connection to the DNS server, wherein the URL address is used to open the online service.

[0089] In this embodiment, preferably, the file list groups files according to date and time.

[0090] Based on the same inventive concept, this application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0091] Example 2

[0092] like Figure 2 As shown, in this embodiment, a device for viewing local computer files online is provided, including:

[0093] The page setting module places the files to be shared into a local folder; generates a corresponding HTML page, which is a file list and includes links to all files in the local folder;

[0094] The open service module listens to a port on the local computer and generates a URL address to open an online service;

[0095] The file viewing module is used to view the HTML page through the URL address and view the files in the HTML page through the file list of the HTML page.

[0096] In this embodiment, preferably, the page setting module specifically: places the files to be shared into a local folder; generates a corresponding HTML page, which is a file list and includes links to all files in the local folder; and regularly checks the files in the local folder. If there are new files placed in the local folder, the HTML page is updated in real time.

[0097] In this embodiment, preferably, the open service module specifically opens a port of the local computer, starts the local HTTP server of the local computer to listen to the port, obtains a URL address by creating a UDP connection to the DNS server, and the URL address is used to open the online service.

[0098] In this embodiment, preferably, the file list groups files according to date and time.

[0099] Since the device described in the second embodiment of the present invention is used to implement the method of the first embodiment of the present invention, those skilled in the art will be able to understand the specific structure and variations of the device based on the method described in the first embodiment of the present invention, and therefore will not be described in detail here. All devices used in the method of the first embodiment of the present invention fall within the scope of protection of the present invention.

[0100] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.

[0101] Example 3

[0102] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.

[0103] Since the electronic device described in this embodiment is the device used to implement the method in Example 1 of this application, based on the method described in Example 1 of this application, those skilled in the art will be able to understand the specific implementation of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. As long as the device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection to be provided by this application.

[0104] Based on the same inventive concept, this application provides a storage medium corresponding to Example 1, see Example 4 for details.

[0105] Example 4

[0106] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any implementation method in the first embodiment can be implemented.

[0107] The technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0108] This embodiment can store reports in a local folder, provide online services through a local HTTP server, generate an accessible URL address, and automatically detect and update the HTML page when a new report is generated, providing an HTML page to display a list of all reports. Others can view the report list online and view the specific report content by accessing the service address.

[0109] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0111] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0113] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for viewing local computer files online, characterized by: The steps include: Step 1: Place the files to be shared into a local folder; generate a corresponding HTML page, which is a file list and includes links to all files in the local folder; Step 2: Monitor a port on the local computer and generate a URL address to open the online service; Step 3: View the HTML page through the URL address, and view the files in the HTML page through the file list.

2. The method for viewing local computer files online according to claim 1, characterized in that: The step 1 specifically includes: placing the files to be shared into a local folder; generating a corresponding HTML page, wherein the HTML page is a file list and includes links to all files in the local folder; The files in the local folder are checked regularly, and if there is a new file put into the local folder, the HTML page is updated in real time.

3. The method for viewing local computer files online according to claim 1, characterized in that: The step 2 specifically includes: opening a port of the local computer, starting the local HTTP server of the local computer to listen to the port, and obtaining a URL address by establishing a UDP connection to the DNS server, wherein the URL address is used to open the online service.

4. The method for viewing local computer files online according to claim 1, characterized in that: The file list groups files according to date and time.

5. A device for viewing local computer files online, characterized by: include: The page setting module places the files to be shared into a local folder; generates a corresponding HTML page, which is a file list and includes links to all files in the local folder; The open service module listens to a port on the local computer and generates a URL address to open an online service; The file viewing module is used to view the HTML page through the URL address and view the files in the HTML page through the file list of the HTML page.

6. The device for viewing local computer files online according to claim 5, characterized in that: The page setting module specifically includes: placing the files to be shared into a local folder; generating a corresponding HTML page, which is a file list and includes links to all files in the local folder; The files in the local folder are checked regularly, and if there is a new file put into the local folder, the HTML page is updated in real time.

7. The device for viewing local computer files online according to claim 5, characterized in that: The open service module specifically opens a port on the local computer, starts a local HTTP server on the local computer to listen to the port, and obtains a URL address by establishing a UDP connection to a DNS server. The URL address is used to open an online service.

8. The device for viewing local computer files online according to claim 5, characterized in that: The file list groups files according to date and time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.