CN-122020636-A - Feedback report data export method, device and equipment of browser and storage medium
Abstract
The embodiment of the invention provides a method, a device, equipment and a storage medium for deriving feedback report data of a browser, wherein the method comprises the steps of when feedback information is received, coding the feedback information according to a preset message protocol to obtain the feedback report data; and the call report processing interface processes the feedback report data according to the received instruction type, when the instruction type is the export instruction, the call catalog setting plug-in receives a target catalog path set by a user based on a sandbox authority proxy mechanism, and calls the data processing interface through the export plug-in, analyzes the feedback report data to generate a target file, and stores the generated target file into the target catalog path on the premise of not breaking through the limit of a browser sandbox. The invention multiplexes the generation logic of the feedback report, derives the feedback information which can be directly checked on the basis of considering the complexity of the code and the development cost, and ensures the safety of the local file system through a sandbox authority agent mechanism.
Inventors
- WANG QING
- YU YIN
- HUANG WENJUN
Assignees
- 龙芯中科(合肥)技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251216
Claims (14)
- 1. A feedback report data export method of a browser, applied to a browser running in a sandbox environment, comprising: when feedback information input by a user in a feedback interface of a browser is received, coding the feedback information according to a preset message protocol to obtain structured feedback report data; And calling a report processing interface to process the feedback report data according to the received instruction type, calling a directory setting plug-in integrated in the browser to receive a target directory path set by a user based on a sandbox authority proxy mechanism when the instruction type is a export instruction, calling a data processing interface through the export plug-in integrated in the browser, analyzing the feedback report data to generate a target file, and storing the generated target file into the target directory path on the premise of not breaking the limit of a browser sandbox.
- 2. The method of claim 1, wherein the directory settings plug-in and the export plug-in cooperate based on a plug-in communication protocol of the browser.
- 3. The method of claim 1, wherein the directory setting plug-in ensures that a user has write permission for a target directory path selected by the user by a secondary confirmation prompt after receiving the target directory path.
- 4. The method of claim 1, wherein parsing the feedback report data to generate a target file comprises: When the feedback report data comprises text data, serializing the text data into text strings and storing the text strings into a text file; When the feedback report data comprises a binary large object for storing the current interface image of the browser, analyzing the binary large object into an image file; And compressing the text file and the image file to obtain the target file.
- 5. The method of claim 4, wherein parsing the blob into an image file in a target format, comprises: converting the binary large object into binary data represented by sixty-four characters; removing redundant data from the binary data, and then decoding to obtain a decoding character string; Converting the decoded string into an image codeword stream via a pixel bitmap, an immutable image; and storing the image coding word throttle into the image file.
- 6. The method of claim 5, wherein the text file comprises a file storing exception information, a file storing browser performance parameters, a file storing browser system information and a running log, and the image file comprises a file storing a current page image.
- 7. The method according to any one of claims 1 to 6, further comprising: And when the instruction type is a sending instruction, the report processing interface calls the data processing interface through a sending plug-in integrated in the browser, and sends the feedback report data to a server.
- 8. The method according to any one of claims 1 to 6, further comprising: when the instruction type is a sending instruction, the report processing interface acquires network state parameters of the browser; When the network state parameter is smaller than or equal to a preset parameter threshold, the report processing interface sets the target directory path as a default directory, calls a data processing interface through a export plug-in integrated in the browser, analyzes the feedback report data to generate a target file, and stores the generated target file into the default directory on the premise of not breaking through the limit of a browser sandbox.
- 9. The method of claim 8, wherein the method further comprises: the report processing interface deletes the target file in the default catalog when receiving the successful sending information of the feedback report data; And when receiving the sending failure information of the feedback report data, the report processing interface calls a directory setting plug-in integrated in the browser to receive a target directory path set by a user based on a sandbox authority agent mechanism, and moves the target file from the default directory to the target directory path.
- 10. The method of claim 8, wherein the method further comprises: And controlling the display state of the export control and/or the display state of the sending control according to the network state parameters of the browser, wherein the export control is used for receiving the export instruction, and the sending control is used for receiving the sending instruction.
- 11. A feedback report data derivation device of a browser, applied to a browser running in a sandboxed environment, comprising: the feedback receiving module is used for carrying out coding processing on the feedback information according to a preset message protocol to obtain structured feedback report data when receiving the feedback information input by a user in a feedback interface of the browser; And the feedback processing module is used for calling a report processing interface to process the feedback report data according to the received instruction type, calling a directory setting plug-in integrated in the browser to receive a target directory path set by a user based on a sandbox authority agent mechanism when the instruction type is a export instruction, calling the data processing interface through the export plug-in integrated in the browser, analyzing the feedback report data to generate a target file, and storing the generated target file into the target directory path on the premise of not breaking the sandbox limit of the browser.
- 12. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for: when feedback information input by a user in a feedback interface of a browser is received, coding the feedback information according to a preset message protocol to obtain structured feedback report data; And calling a report processing interface to process the feedback report data according to the received instruction type, calling a directory setting plug-in integrated in the browser to receive a target directory path set by a user based on a sandbox authority proxy mechanism when the instruction type is a export instruction, calling a data processing interface through the export plug-in integrated in the browser, analyzing the feedback report data to generate a target file, and storing the generated target file into the target directory path on the premise of not breaking the limit of a browser sandbox.
- 13. A readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a feedback report data derivation method of a browser according to one or more of the method claims 1 to 10.
- 14. A computer program product comprising a computer program for implementing a feedback report data derivation method for a browser according to one or more of the method claims 1 to 10.
Description
Feedback report data export method, device and equipment of browser and storage medium Technical Field The present invention relates to the field of computer software technologies, and in particular, to a method, an apparatus, a device, and a storage medium for exporting feedback report data of a browser. Background The user feedback mechanism of existing browsers typically only supports uploading feedback information to the server side, and does not provide the ability to locally generate and save feedback report data. Especially under the limitation of a browser sandbox, a technical scheme for safely and controllably generating readable feedback report data locally for a user is lacking, so that the user cannot view feedback information locally or is used for offline investigation. Disclosure of Invention In view of the foregoing, embodiments of the present invention have been developed to provide a method for deriving feedback report data for a browser that overcomes or at least partially solves the foregoing problems, to locally save and view feedback information. Correspondingly, the embodiment of the invention also provides a feedback report data export device of the browser, electronic equipment and a storage medium, which are used for ensuring the realization and application of the method. In order to solve the above problems, an embodiment of the present invention discloses a method for exporting feedback report data of a browser, which is applied to a browser running in a sandbox environment, and includes: When receiving feedback information input by a user in a feedback interface of a browser, coding the feedback information according to a preset message protocol to obtain structured feedback report data, calling a report processing interface to process the feedback report data according to a received instruction type, calling a directory setting plug-in integrated in the browser to receive a target directory path set by the user based on a sandbox authority agent mechanism when the instruction type is a export instruction, calling a data processing interface through the export plug-in integrated in the browser, analyzing the feedback report data to generate a target file, and storing the generated target file into the target directory path on the premise of not breaking through the sandbox limit of the browser. Optionally, the directory setting plug-in cooperates with the export plug-in based on a plug-in communication protocol of the browser. Optionally, after receiving the target directory path selected by the user, the directory setting plug-in ensures that the user has write-in authority on the target directory path through a secondary confirmation prompt. Optionally, parsing the feedback report data to generate a target file includes: When the feedback report data comprises text data, the text data is serialized into text strings and stored in a text file, when the feedback report data comprises a binary large object for storing the current interface image of the browser, the binary large object is analyzed into an image file, and the text file and the image file are compressed to obtain the target file. Optionally, parsing the blob into an image file in a target format includes: The binary large object is converted into binary data represented by sixty-four characters, the binary data is decoded after redundant data are removed to obtain a decoding character string, the decoding character string is converted into an image coding word throttle through a pixel bitmap and an invariable image, and the image coding word throttle is stored in the image file. Optionally, the text file comprises a file for storing abnormal information, a file for storing browser performance parameters, a file for storing browser system information and a running log, and the image file comprises a file for storing a current page image. Optionally, the method further comprises: And when the instruction type is a sending instruction, the report processing interface calls the data processing interface through a sending plug-in integrated in the browser, and sends the feedback report data to a server. Optionally, the method further comprises: When the network state parameter is smaller than or equal to a preset parameter threshold, the report processing interface sets the target directory path as a default directory, calls a data processing interface through a export plug-in integrated in the browser, analyzes the feedback report data to generate a target file, and stores the generated target file into the default directory on the premise of not breaking the limit of a browser sandbox. Optionally, the method further comprises: And when receiving the transmission failure information of the feedback report data, the report processing interface calls a catalog setting plug-in integrated in the browser to receive a target catalog path set by a user based on a sandbox authority agent mechanism, and moves the target file fro