Webpage display control method and device and storage medium
By displaying and controlling the server's files on the web page, it solves the compatibility problem between devices and platforms, enables convenient viewing and modification of files, improves efficiency and convenience, and ensures the accuracy and consistency of the content.
Patent Information
- Application Number
- CN202410698584.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-13
AI Technical Summary
Traditional file viewing methods have compatibility issues between devices and platforms, making it inconvenient to view and edit files, making it difficult to meet the efficiency and convenience requirements of modern society.
By displaying and controlling the binary files and text files of the server on the web page, sending viewing requests to the server according to user operations, receiving and parsing the file content, and displaying it on the web page in a preset format, supporting file modification and code generation, and realizing content A focused and format-friendly presentation.
Conveniently view and modify server files on any client, improving the convenience of file viewing and editing, ensuring the accuracy and consistency of content, and supporting version management and code generation.
Smart Images

Figure CN118642800A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of web page control, and in particular to a method, device and storage medium for controlling web page display. Background Art
[0002] With the development of computer science and technology and its application in all walks of life, more and more files need to be viewed and processed. Whether it is enterprise management, scientific research projects, education and teaching, or personal life, there are a lot of file management needs. These files are in various forms, including documents, pictures, videos and data files, and are distributed on different devices and storage media.
[0003] The traditional way of viewing files mainly relies on local storage and manual operation, which is implemented through the tools provided by the operating system and some basic software. File compatibility issues between different devices and platforms also occur from time to time, resulting in inconvenience in viewing and editing files. It is difficult to meet the requirements of modern society for efficiency and convenience.
[0004] Therefore, how to view files more conveniently becomes an issue that needs to be solved urgently. Summary of the invention
[0005] The purpose of this application is to provide a method, storage medium and computer program product for controlling web page display, aiming to solve the technical problem of how to view files more conveniently.
[0006] To achieve the above objectives, the present application proposes a method for controlling web page display, the method comprising:
[0007] Sending a viewing request to a server according to a user operation, so that the server sends a corresponding file according to the viewing request;
[0008] Receiving the file and parsing the file to obtain the file content;
[0009] The file content is displayed on a web page in a preset format.
[0010] In one embodiment, after the step of displaying the file content in a preset format on a web page, the method further includes:
[0011] Responding to a modification request from a user, and determining modification content according to the modification request;
[0012] When the modified content belongs to a preset range, verifying the modified content within the preset range to obtain a verification result;
[0013] When there is an abnormality in the verification result, the abnormality information is displayed on the webpage and the modified content is revoked.
[0014] In one embodiment, the step of responding to a modification request from a user and determining the modification content according to the modification request includes:
[0015] Responding to a modification request from a user, and determining a target control instruction according to the modification request;
[0016] The modification content is determined based on the target control instruction.
[0017] In one embodiment, when the modified content belongs to a preset range, after the step of verifying the modified content within the preset range and obtaining the verification result, the step further includes:
[0018] When there is no abnormality in the verification result, modify the file content based on the modification content to obtain modified file content;
[0019] The modified file content is displayed on the web page in a preset format.
[0020] In one embodiment, when there is no abnormality in the verification result, after the step of modifying the file content based on the modification content to obtain the modified file content, the step further includes:
[0021] Recording user information and the modified content;
[0022] According to the modified content, the file content before the modification and the file content after the modification are saved.
[0023] In one embodiment, when there is no abnormality in the verification result, after the step of modifying the file content based on the modification content to obtain the modified file content, the step further includes:
[0024] Format the modified file content to obtain a preset format string;
[0025] Sending the preset format string to the server, so that the server verifies the preset format string, saves and overwrites the corresponding file in the server, and feeds back the saving result;
[0026] The saved result is displayed on the web page.
[0027] In one embodiment, after the step of displaying the file content in a preset format on a web page, the method further includes:
[0028] Recognize the voice information input by the user and obtain the voice command;
[0029] Obtaining an operation instruction according to the voice instruction;
[0030] The file content is operated according to the operation instruction.
[0031] In one embodiment, after the step of displaying the file content in a preset format on a web page, the method further includes:
[0032] In response to a code generation request from a user, the code generation request is sent to the server, so that the server runs a code generation program according to the code generation request, reads and parses the file according to the code generation program, generates code according to the code generation program and the parsed data, and feeds back the result;
[0033] The code generation result sent by the server is received and displayed.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a device for web page display control, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the method for web page display control as described above.
[0035] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the web page display control method described above are implemented.
[0036] One or more technical solutions proposed in this application have at least the following technical effects:
[0037] The application sends a viewing request to a server according to a user operation, so that the server sends a corresponding file according to the viewing request; receives the file and parses the file to obtain the file content; displays the file content on a web page in a preset format, and by displaying and controlling the server's binary files, text files and other files on the web page, the server's binary files, text files and other files can be viewed on any client, and the content is concentrated and the format is friendly, which improves the convenience of file viewing. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart diagram of a method for controlling web page display provided in Embodiment 1 of the present application;
[0041] Figure 2 A web page display flow chart provided for the first embodiment of the method for controlling web page display of the present application;
[0042] Figure 3 A flowchart diagram of the second embodiment of the method for controlling web page display of the present application is provided;
[0043] Figure 4 A modified flow chart provided for the second embodiment of the method for controlling web page display of the present application;
[0044] Figure 5 A code generation flow chart provided for the second embodiment of the method for controlling web page display of the present application;
[0045] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the method for controlling web page display in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] At present, the communication between many modules or hardware is based on 1 byte. It is necessary to formulate a communication protocol to indicate the meaning of the transmitted content. Therefore, there is a special protocol document to record it for the communication parties to review and revise. Generally, for the convenience of reading, Word or Excel is used as the management form, but Word and Excel are binary files and cannot record the content of each modification. Version management is difficult. Converting to text files can solve this problem, but the content of text files is not concentrated enough, and it is not convenient to view the protocol.
[0050] The main solution of the embodiment of the present application is: by sending a viewing request to the server according to the user operation, so that the server sends the corresponding file according to the viewing request; receiving the file, and parsing the file to obtain the file content; displaying the file content on the web page in a preset format. This embodiment displays and controls the server's binary files, text files and other files on the web page, so that any client can view the server's binary files, text files and other files, and the content is concentrated and the format is friendly, which improves the convenience of viewing protocol files.
[0051] It should be noted that the execution subject of the embodiment of the present application may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a personal computer as an example to illustrate this embodiment and the following embodiments.
[0052] Based on this, the embodiment of the present application provides a method for controlling web page display, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for controlling web page display of the present application.
[0053] In this embodiment, the web page display control method includes steps S10 to S30:
[0054] Step S10, sending a viewing request to the server according to the user operation, so that the server sends the corresponding file according to the viewing request;
[0055] It should be noted that user operations include clicking on a file link to view it, entering a URL and specifying a file in the URL to view it, etc.; the server is used to interact with the front-end web page and provide the front-end web page code. In this embodiment, it is a background program that runs Python files and can run on mainstream computers; files include various text files and binary files such as documents, pictures, videos and data files. In this embodiment, the file is a text file converted from a binary file, such as a JSON file, an XML file, etc., taking the JSON file converted from an Excel file as an example.
[0056] It is understandable that the user enters a URL in the front end of the web page, and the URL specifies a file to view. The back end server receives the JSON file viewing request, reads the JSON file, and sends the read JSON string to the front end of the web page.
[0057] Step S20, receiving the file and parsing the file to obtain the file content;
[0058] It should be noted that the file content includes text, pictures, codes, etc. The file content in this embodiment takes the communication protocol as an example, and the communication protocol includes attribute name, protocol number, protocol subject, byte length, processing function and annotation description; parsing the file includes the following steps: 1) Select a suitable parsing library or tool according to the file type; 2) Use the file operation function to read the file content; 3) Use the corresponding parsing method according to the file format to convert the file content into a processable data structure; 4) Further process and analyze the parsed data.
[0059] It is understandable that after receiving the JSON file, the web front end parses the JSON file to obtain a JSON string, and the JSON string contains multiple communication protocol information.
[0060] Step S30, displaying the file content on a web page in a preset format.
[0061] It should be noted that the preset formats include Word document format, Excel table format, Markdown format, etc., and the Excel table format is taken as an example in this embodiment.
[0062] It is understandable that the web front end obtains multiple communication protocol information based on the JSON string, and then obtains the attribute name, protocol number, protocol subject, byte length, processing function and annotation of each communication protocol, and displays it in a table, with concentrated content. In addition, for cells that select multiple options, a drop-down box selection function is provided, which improves the convenience of viewing protocol files. For example, a JSON file storing communication protocols is parsed to obtain a JSON string, and then it is displayed in a table on the web page, and the reading effect is similar to Excel.
[0063] Reference Figure 2 , Figure 2 This is a web page display flow chart of the first embodiment of the method for controlling web page display of the present application. This figure shows a web page display process of front-end and back-end interaction. First, the user opens the website through the browser, and the front-end web page sends a request and starts to display. On the front-end web page, the user's request is passed to the back-end server. After receiving the request, the server opens the file and reads the data, and then passes the data to the JSON protocol file for processing. The processed data is returned to the front-end web page through the code generation program. After the front-end web page receives the data, it will parse the JSON data and convert it into a table format for display. In addition, the front-end web page also provides some function buttons, such as adding submission, sorting, splitting and proxy generation, for users to interact. The entire process covers the complete process from the user operating on the front-end web page, to the back-end server reading and processing the data, and then to the front-end web page parsing and displaying the data, reflecting the collaborative work between the front and back ends.
[0064] The present embodiment provides a method for controlling web page display, by sending a viewing request to a server according to a user operation, so that the server sends a corresponding file according to the viewing request; receiving the file, and parsing the file to obtain the file content; displaying the file content on a web page in a preset format. The present embodiment displays and controls the server's binary files, text files and other files on a web page, so that any client can view the server's binary files, text files and other files, and the content is concentrated and the format is friendly, thereby improving the convenience of file viewing.
[0065] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 3 , Figure 3 This is a flow chart of the second embodiment of the web page display control method of the present application. After step S30, the web page display control method further includes steps S31 to S35:
[0066] Step S31, responding to the user's modification request and determining the modification content according to the modification request;
[0067] It should be noted that a modification request refers to an operation in which a user modifies the content of a displayed file on a front-end web page.
[0068] It can be understood that, as an example, in response to a user's modification request, the step of determining the modification content according to the modification request specifically includes: responding to the user's modification request, determining a target control instruction according to the modification request, and determining the modification content based on the target control instruction.
[0069] The modification request includes the adding operation, deleting operation, modifying operation, filtering operation, sorting operation, folding operation and canceling operation performed by the user on the content of the displayed file on the front-end webpage, which respectively correspond to the adding instruction, deleting instruction, modifying instruction, filtering instruction, sorting instruction, folding instruction and canceling instruction in the target control instruction. According to the adding instruction, the content input by the user is added to the content, and the modified content is the content input by the user; according to the deleting instruction, the content selected by the user is deleted, and the modified content is the content deleted by the user; according to the modifying instruction, the content input by the user replaces the content selected by the user, and the modified content is the content replaced by the user; according to the filtering instruction, the preset filtering algorithm and the conditions selected or input by the user, the content is filtered and the content meeting the conditions is displayed, and the modified content is the content filtered by the user; according to the sorting instruction, the preset sorting algorithm and the content selected by the user, the content is sorted by the user; according to the folding instruction, the content selected by the user is expanded or hidden, and the modified content is the content expanded or hidden by the user; according to the canceling instruction, the adding, deleting, modifying, filtering, sorting, folding or filtering operation is canceled, and the modified content is the content involved in the operation canceled by the user.
[0070] Step S32, when the modified content belongs to a preset range, verifying the modified content within the preset range to obtain a verification result;
[0071] It should be noted that there are two types of preset ranges. One is the preset range for duplicate checking. Modifications within this range require duplicate checking of the modified content, such as the primary key columns in an Excel table. The content of the same column in these columns cannot have duplicate content; the other is the preset range for grammar checking, spelling checking, format checking, fact checking, sensitive content checking, compliance checking, security checking, etc. For example, if a user adds a piece of text to the content displayed on a web page, the web page automatically performs grammar checking on the added content to see if there are grammatical errors such as tense, and also performs format checking to see if the correct font and font size are used, as well as other checks such as compliance checking.
[0072] It can be understood that when the content modified by the user falls within the preset range of duplicate checking (such as the primary key column in a table), the content modified by the user is compared with other content in the primary key column to determine whether it is repeated and obtain the result; when the content modified by the user falls within the preset range of format checking (such as any column in a table), the format of the content modified by the user is compared with the pre-set format to determine whether they are the same and obtain the result.
[0073] Please refer to Figure 4 , Figure 4This is a modification flow chart of the second embodiment of the method for web page display control of the present application. This figure shows a modification / submission function flow of front-end and back-end interaction. The user manually adds or modifies the form through the front-end web page, and clicks the Submit button after completing the modification. The front-end web page formats the modified data into JSON format and passes it to the back-end server. After the server receives the data, it first performs a data check. After the check passes, it opens the file and writes the data, and then returns the processing result to the front end. After the front-end web page receives the result, a pop-up window will be displayed to notify the user of the submission result. The entire process shows the complete process from the user modifying and submitting the data on the front-end web page, to the back-end server checking and writing the data, and then to the front-end web page displaying the submission result, reflecting the close cooperation between the front and back ends.
[0074] Step S33, when there is an abnormality in the verification result, displaying abnormal information on the webpage and revoking the modified content;
[0075] It should be noted that the abnormality in the verification result means that when performing repeated verification, the content modified by the user is compared with other content in the primary key column and the same content is obtained, that is, the content of a cell modified by the user is the same as the content of a cell in other content; during format verification, the format of the content modified by the user is different from the pre-set format, etc. Abnormal information means that during repeated verification, there is repeated content; during format verification, there is content with a format different from the pre-set format, etc.
[0076] It is understandable that when there is an abnormality in the result of the duplicate check, the repeated content or its position will be displayed in a pop-up window, such as "The content of the third row and third column is the same as the content of the eighth row and third column, please modify it again", to remind the user, and undo the changes to the repeated content; when there is an abnormality in the result of the format check, the content or its position with a format different from the preset format will be displayed in a pop-up window, such as "The content of the third to ninth columns of the fifth row is incorrect in format, please modify it again", to remind the user, and undo the changes to the incorrectly formatted content, and so on.
[0077] Step S34, when there is no abnormality in the verification result, modify the file content based on the modification content to obtain modified file content;
[0078] It should be noted that the absence of abnormality in the verification result means that when repeated verification is performed, the content modified by the user is compared with other content in the primary key column and there is no completely identical content, that is, the content of a cell modified by the user is different from the content of a cell in other content; during format verification, the format of the content modified by the user is the same as the pre-set format, etc. Modifying the content of the file means adding the content entered by the user to the file, deleting the content selected by the user, replacing the content selected by the user with the content entered by the user, filtering the content according to the conditions selected or entered by the user, and displaying the content that meets the conditions, sorting the content selected by the user, and expanding or hiding the content selected by the user; canceling the adding, deleting, modifying, filtering, sorting, folding or filtering operations.
[0079] It is understandable that when there is no problem with the content modified by the user, the user's modification is retained, thereby obtaining the file content modified by the user.
[0080] This embodiment also records user information and the modified content, the user information includes user account, user name, etc., for auditing and problem tracking. According to the modified content, the file content before and after the modification are saved for version control, supporting detailed comparison of different versions of files, and being able to restore to any historical version at any time to prevent data loss caused by misoperation.
[0081] This embodiment also formats the modified file content to obtain a preset format string; sends the preset format string to the server, so that the server verifies the preset format string and saves and overwrites the corresponding file in the server, and feeds back the saving result; displays the saving result on the web page. Taking the JSON format in the text file as an example, the file content modified by the user is formatted into a JSON string, and then sent to the server. The server verifies the JSON string. After the verification is correct, the JSON string is overwritten and saved to the JSON format file sent by the server according to the viewing request. After the successful saving, the successful saving result is fed back. If the verification result is abnormal, the abnormal information of the verification result is fed back. If the saving fails, the saving is repeated twice. If the saving still fails, the message "Failed to save, please resubmit" is fed back.
[0082] Step S35, displaying the modified file content on the web page in a preset format.
[0083] It should be noted that the preset formats include text format, table format, list format, image format, code block format, timeline format, card format, column format, label format, folding format, etc. This embodiment takes the table format as an example.
[0084] It is understandable that after the user modifies the file content displayed in the table format on the web page, the web page saves the modified information and displays the modified file content to the user in the table format, so that the content is centralized and easy to read.
[0085] This embodiment also recognizes the voice information input by the user, obtains the voice instruction; obtains the operation instruction according to the voice instruction; and operates the file content according to the operation instruction. The user can click the voice input button to modify the file content displayed on the web page through voice, for example, "Please modify the content of the second row and third column to WRITE_MBSN", the web page recognizes the voice information, obtains the modification instruction, the location of the modified content and the modified content, and then replaces the content at the modification location with the modified content according to the modification instruction.
[0086] This embodiment also responds to the user's code generation request, sends the code generation request to the server, so that the server runs the code generation program according to the code generation request, reads and parses the file according to the code generation program, generates code according to the code generation program and the parsed data, and feeds back the result; receives the code generation result sent by the server and displays it. The user can click the code generation button, the webpage sends the code generation request to the server, the server runs the code generation program, and reads the file with the same content as the file displayed on the webpage (for example, a JSON protocol file, the JSON file content displayed on the webpage is the JSON file sent by the server according to the viewing request, and the server stores the original file), and the code generation program (for example, a Python code generation script) generates code according to the content in the file, for example, reads the protocol in the JSON protocol file, and generates a new modified business code file (for example, a C++ program file) according to the protocol, wherein the business code can be compiled into an executable program, which is the final target file. After the server generates the code, it feeds back the generation result, and the webpage displays the code generation result, for example, "code generation is successful" or "code generation fails, please regenerate".
[0087] Please refer to Figure 5 , Figure 5This is a code generation flow chart for the second embodiment of the method for web page display control of this application. This figure shows the front-end and back-end interaction process of the one-click automatic code generation function. When the user completes the submission on the front-end web page, clicks the Generate Code button, and the front-end web page sends a request to the back-end server. After receiving the request, the back-end server runs the code generation program. The code generation program will automatically open the file and read the data, and then parse the data and generate code. After the code is generated, the program returns the result to the front-end web page. After the front-end web page receives the result, a pop-up window will be displayed to notify the user of the generation result. The entire process shows the complete process from the user initiating a code generation request on the front-end web page, to the back-end server reading the data, parsing the data to generate code, and then displaying the generation result on the front-end web page, reflecting the close collaboration between the front and back ends.
[0088] The present embodiment responds to a modification request from a user, determines the modification content according to the modification request; when the modification content belongs to a preset range, verifies the modification content within the preset range to obtain a verification result; when there is an abnormality in the verification result, displays abnormal information on the web page and cancels the modification content; when there is no abnormality in the verification result, modifies the file content based on the modification content to obtain the modified file content; displays the modified file content on the web page in a preset format; recognizes the voice information input by the user to obtain a voice instruction; obtains an operation instruction according to the voice instruction; operates the file content according to the operation instruction; responds to a code generation request from the user, sends the code generation request to the server, so that the server runs a code generation program according to the code generation request, reads and parses the file according to the code generation program, generates code according to the code generation program and the parsed data and feeds back the result; receives the code generation result sent by the server and displays it. This embodiment displays the file contents of the server, such as text files and binary files, in a preset format that is centralized and easier to read through a web page, and supports modifying and saving the file contents directly on the web page, thereby improving the convenience of viewing and modifying files. Moreover, this embodiment also verifies the content modified by the user to ensure that the user's modification operation is legal, thereby ensuring the accuracy, completeness, consistency, validity, security, and compliance of the file content. In addition, this embodiment also supports code generation based on file content, and combined with a convenient file modification method, realizes the modification of server files on a web page and instructs the server to generate code based on the modified file content, thereby improving the convenience of code generation.
[0089] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method of controlling the display of web pages of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0090] The present application provides a device for controlling web page display, the device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for controlling web page display in the first embodiment.
[0091] Reference below Figure 6 , which shows a schematic diagram of the structure of a device suitable for implementing the web page display control of the embodiment of the present application. The device for web page display control in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The web page display control device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0092] like Figure 6As shown, the web page display control device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the web page display control device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the web page display control device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a web page display control device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0093] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0094] The web page display control device provided by the present application adopts the web page display control method in the above embodiment, which can solve the technical problem of how to view files more conveniently. Compared with the prior art, the beneficial effects of the web page display control device provided by the present application are the same as the beneficial effects of the web page display control method provided by the above embodiment, and other technical features in the web page display control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0095] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0097] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for controlling web page display in the above-mentioned embodiment.
[0098] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0099] The computer-readable storage medium may be included in the device for controlling the display of a web page; or may exist independently without being assembled into the device for controlling the display of a web page.
[0100] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a device for controlling the display of a web page, the device for controlling the display of a web page: sends a viewing request to a server according to a user operation, so that the server sends a corresponding file according to the viewing request; receives the file and parses the file to obtain the file content; and displays the file content on a web page in a preset format.
[0101] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0104] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for controlling web page display, and can solve the technical problem of how to view files more conveniently. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the method for controlling web page display provided by the above-mentioned embodiment, and will not be described in detail here.
[0105] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for controlling web page display, characterized in that: The method comprises: Sending a viewing request to a server according to a user operation, so that the server sends a corresponding file according to the viewing request; Receiving the file and parsing the file to obtain the file content; The file content is displayed on a web page in a preset format.
2. The method according to claim 1, characterized in that After the step of displaying the file content on a web page in a preset format, the method further includes: Responding to a modification request from a user, and determining modification content according to the modification request; When the modified content belongs to a preset range, verifying the modified content within the preset range to obtain a verification result; When there is an abnormality in the verification result, the abnormality information is displayed on the webpage and the modified content is revoked.
3. The method according to claim 2, characterized in that The step of responding to the modification request of the user and determining the modification content according to the modification request comprises: Responding to a modification request from a user, and determining a target control instruction according to the modification request; The modification content is determined based on the target control instruction.
4. The method according to claim 2, characterized in that When the modified content belongs to the preset range, after the step of verifying the modified content within the preset range and obtaining the verification result, the method further includes: When there is no abnormality in the verification result, modify the file content based on the modification content to obtain modified file content; The modified file content is displayed on the web page in a preset format.
5. The method according to claim 4, characterized in that After the step of modifying the file content based on the modification content to obtain the modified file content when there is no abnormality in the verification result, the method further includes: Recording user information and the modified content; According to the modified content, the file content before the modification and the file content after the modification are saved.
6. The method according to claim 4, characterized in that After the step of modifying the file content based on the modified content to obtain the modified file content when there is no abnormality in the verification result, the method further includes: Format the modified file content to obtain a preset format string; Sending the preset format string to the server, so that the server verifies the preset format string, saves and overwrites the corresponding file in the server, and feeds back the saving result; The saved result is displayed on the web page.
7. The method according to claim 1, characterized in that After the step of displaying the file content on a web page in a preset format, the method further includes: Recognize the voice information input by the user and obtain the voice command; Obtaining an operation instruction according to the voice instruction; The file content is operated according to the operation instruction.
8. The method according to claim 1, characterized in that After the step of displaying the file content on a web page in a preset format, the method further includes: In response to a code generation request from a user, the code generation request is sent to the server, so that the server runs a code generation program according to the code generation request, reads and parses the file according to the code generation program, generates code according to the code generation program and the parsed data, and feeds back the result; The code generation result sent by the server is received and displayed.
9. A device for controlling web page display, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for controlling web page display according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for controlling web page display according to any one of claims 1 to 8 are implemented.
