CN109840200A - File size detection method, device, equipment and computer readable storage medium - Google Patents

File size detection method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109840200A
CN109840200A CN201811537720.6A CN201811537720A CN109840200A CN 109840200 A CN109840200 A CN 109840200A CN 201811537720 A CN201811537720 A CN 201811537720A CN 109840200 A CN109840200 A CN 109840200A
Authority
CN
China
Prior art keywords
file
response data
resource file
detection method
file size
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
CN201811537720.6A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811537720.6A priority Critical patent/CN109840200A/en
Publication of CN109840200A publication Critical patent/CN109840200A/en
Pending legal-status Critical Current

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

A kind of file size detection method, device, equipment and computer readable storage medium, the method includes constructing the application program with visualization interface;Visualization interface includes resource file;The characteristic information of resource file is obtained when detecting and submitting instruction;It calls and executes pre- submission Hook Function;It obtains and executes the pre- response data for submitting Hook Function to generate;Pre- submit in Hook Function further comprises Node script;Whether the size of data that Node script is used to detect resource file is more than predetermined dimension detection response data, and generates prompt information according to testing result.The size of data for the resource file that the present invention includes by the visualization interface of detection application program, improves the access speed of visualization interface, reduces the flow consumption of access visualization interface, realizes the operating experience optimization to terminal device.

Description

File size detection method, device, equipment and computer readable storage medium
Technical field
The invention mainly relates to fields of communication technology, specifically, being related to a kind of file size detection method, device, setting Standby and computer readable storage medium.
Background technique
With the continuous development of software industry, software newly developed becomes increasingly complex.Software with visualization interface exists In development process, front-end person who complete Functional Design after by application code submit to back-end software tester carry out it is soft Part test.It is big in the data of picture or other resource files due to may include picture or other resource files in visualization interface When small excessive, the access speed of visualization interface will affect, while also increasing the flow consumption of access visualization interface.
Summary of the invention
The main object of the present invention is to provide a kind of file size detection method, device, equipment and computer-readable storage Medium, it is intended to solve to prevent visualization interface includes during interface resource file is excessive to ask in the prior art Topic.
To achieve the above object, the present invention provides a kind of file size detection method, the file size detection method packet Include following steps:
Construct the application program with visualization interface;Visualization interface includes resource file;
The characteristic information of resource file is obtained when detecting and submitting instruction;
It calls and executes pre- submission Hook Function;
It obtains and executes the pre- response data for submitting Hook Function to generate;Pre- submit in Hook Function further comprises Node foot This;Node script is for detecting whether the size of data of resource file is more than predetermined dimension;
Response data is detected, and generates prompt information according to testing result.
Preferably, judge whether response data is the first predetermined information;
If response data is the first predetermined information, then it represents that the size of data of resource file is greater than predetermined dimension, stops holding Row, which is submitted, to be instructed and generates warning message.
Preferably, the file size detection method further comprises:
If the response data is not the first predetermined information, judge whether response data is the second predetermined information;
If response data is the second predetermined information, then it represents that the size of data of resource file meets predetermined dimension requirement, holds Row, which is submitted to instruct and generate, submits successfully prompt information.
Preferably, the file size detection method further comprises:
If response data is not the second predetermined information, detection failure prompt information is generated.
Preferably, the first predetermined information is predetermined character string;Second predetermined information is predetermined value.
Preferably, warning message includes the size of identifier, current file size and predetermined dimension.
Preferably, identifier is to the resource file title or the road for exceeding predetermined dimension in the coding of application program Diameter is highlighted.
In addition, to achieve the goals above, the present invention also proposes a kind of file size detection device, the file size inspection Surveying device includes:
Module is constructed, for constructing the application program with visualization interface;Visualization interface includes resource file;
First obtains module, for obtaining the characteristic information of resource file when detecting and submitting instruction;
Calling module, for calling and executing pre- submission Hook Function;
Second obtains module, executes the pre- response data for submitting Hook Function to generate for obtaining;
Detection module for detecting response data, and generates prompt information according to testing result;
If response data is the first predetermined information, then it represents that the size of data of resource file is greater than predetermined dimension, detects mould Block, which stops executing submitting, to be instructed and generates warning message.
In addition, to achieve the goals above, the present invention also proposes that a kind of equipment, equipment include processor and memory, place Following steps are realized when reason device when executing the computer program stored in memory for executing:
Construct the application program with visualization interface;Visualization interface includes resource file;
The characteristic information of resource file is obtained when detecting and submitting instruction;
It calls and executes pre- submission Hook Function;
It obtains and executes the pre- response data for submitting Hook Function to generate;Pre- submit in Hook Function further comprises Node foot This;Node script is for detecting whether the size of data of resource file is more than predetermined dimension;
Response data is detected, and generates prompt information according to testing result.
In addition, to achieve the goals above, the present invention also proposes a kind of computer readable storage medium, and the computer can It reads storage medium and is stored at least one instruction, at least one described instruction realizes following steps when being executed by processor:
Construct the application program with visualization interface;Visualization interface includes resource file;
The characteristic information of resource file is obtained when detecting and submitting instruction;
It calls and executes pre- submission Hook Function;Pre- submit in Hook Function further comprises Node script;Node script Whether the size of data for detecting resource file is more than predetermined dimension;
It obtains and executes the pre- response data for submitting Hook Function to generate;
Response data is detected, and generates prompt information according to testing result.
Compared with prior art, when the resource file that the visualization interface of application program includes is excessive, suspend this It submits and operates and prompt the resource file of visual page described in user excessive, the response speed of the visualization interface can be improved Degree realizes flow optimization, promotes user experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow diagram of file size detection method of the present invention.
Fig. 2 is the refinement flow diagram of step S15 in Fig. 1.
Fig. 3 is the functional block diagram of file size detection device of the present invention.
Fig. 4 is the device structure schematic diagram of the hardware running environment of the embodiment of the present invention.
Main element symbol description
File size detection device 1
Construct module 10
First obtains module 20
Calling module 30
Second obtains module 40
Detection module 50
Memory 102
Communication bus 104
Processor 106
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
Description and claims of this specification and term " first " in above-mentioned attached drawing, " second " and " third " etc. are For distinguishing different objects, not for description particular order.In addition, term " includes " and their any deformations, it is intended that Non-exclusive include in covering.Such as it contains series of steps or the process, method, system, product or equipment of module and does not have It is defined in listed step or module, but optionally further comprising the step of not listing or module, or optionally further comprising For these process, methods, product or equipment intrinsic other steps or module.
Referring to Fig. 1, it is the flow chart of file size detection method of the present invention.The flow chart according to different requirements, The sequence of middle step can change, and certain steps can be omitted.
S11, building have the application program of visualization interface.
In at least one embodiment of the present invention, this document volume detection method is applied to an at least terminal device and service In the software development system that device is constituted.The terminal device is connect with the server by network communication.It is of the invention extremely In few one embodiment, carried out data transmission between the terminal device and the server according to preset protocol.Preferably, institute State preset protocol include, but are not limited to it is following any one: http protocol (Hyper Text Transfer Protocol, surpass Text transfer protocol), HTTPS agreement (Hyper Text Transfer Protocol over Secure Socket Layer, safely for the http protocol of target) etc..In at least one embodiment of the present invention, the server can be single Server, or the server zone collectively constituted by several function servers.The terminal device can be any tool There is the terminal of network connecting function, for example, the terminal device can be personal computer, tablet computer, smart phone, individual Digital assistants (PersonalDigital Assistant, PDA), game machine, Interactive Internet TV (Internet Protocol Television, IPTV), intellectual wearable device, navigation device etc. movable equipment or desk-top Computer, number TV etc. fixed equipment.The terminal device includes memory 102.The memory 102 can be readable storage Medium, such as flash memory, hard disk, multimedia card, SD memory, random access storage device (RAM), static random-access memory (ROM), the non-volatile memory mediums such as disk, CD.
In at least one embodiment of the present invention, the terminal device has visual in the building of software development and design interface Change the application program at interface.The software development and design interface is for editing and designing the application program.The application program Including a visualization interface.The visualization interface may include resource file.The resource file is used for can described in the display It is loaded and is shown when depending on changing interface.The resource file can be buffered in memory 102.In at least one reality of the invention It applies in example, the resource file can be picture, text file or audio/video file.
The software development and design interface and the visualization interface are visualized graphs user interface (Graphical User Interface, GUI), and it is both included as human-computer interaction interface.The software development and design interface and the visualization Interface can be equipment interface or web interface.User can be by carrying out operation realization on the equipment interface or web interface Data interaction is carried out between the server.
S12, the characteristic information that the resource file is obtained when detecting and submitting and instruct.
In at least one embodiment of the present invention, the submission instruction will after completing Functional Design for front end developer The application program submits to the instruction that rear end developer is tested.The submission instruction can be user in the software It develops on design interface and is generated by specifically operation.Specifically, the operation of the user includes, but are not limited to: slide, Clicking operation (such as: single-click operation, double click operation).Specifically, the programmable button can be on the terminal device Physical button, be also possible to virtual key on the terminal device etc. (such as: the virtual key can be the terminal Virtual icon on the display of equipment etc.), the present invention is herein with no restrictions.
In at least one embodiment of the present invention, characteristic information file path, size and the title of the resource file Information etc..
S13, calling simultaneously execute pre- submission Hook Function.
In at least one embodiment of the present invention, a plurality of types of Hook Functions are stored in the memory 102.Institute It states in the hooks subdirectory that Hook Function stores under GIT catalogue in the memory.The Hook Function is in specific thing The custom script being called after part triggering.The Hook Function includes equipment Hook Function.The equipment hook is produced by equipment The operations such as raw submission, merging triggering.The equipment Hook Function may include submitting workflow class Hook Function, Email Workflow class script and other all the elements classes.Wherein, submitting workflow class hook is hook relevant to operation is submitted Subfunction.In at least one embodiment of the present invention, submitting workflow class Hook Function includes pre- submission hook (pre- Commit) function.The pre- submission Hook Function is for detecting the characteristic information of the resource file.
In at least one embodiment of the present invention, further comprise in pre- submission hook (pre-commit) function Node script.The Node script is for detecting whether the size of data of the resource file is more than predetermined dimension.
S14, the response data for executing pre- submission Hook Function generation is obtained.
In at least one embodiment of the present invention, the response data passes through between the equipment and the server Data interaction and obtain.
S15, the detection response data, and prompt information is generated according to testing result.
Referring to Figure 2 together, at least one embodiment of the present invention, the response data is detected, and according to detection As a result generating prompt information further comprises:
S151, judge whether the response data is the first predetermined information;
If S152, the response data are first predetermined information, then it represents that the size of data of the resource file is big In predetermined dimension, stops executing and submit instruction and generate warning message in the software development and design interface;
If S153, the response data are not first predetermined informations, judge whether the response data is first pre- Determine information;
If S154, the response data are the second predetermined information, then it represents that the size of data of the resource file meets pre- Determine specification requirement, executes to submit instruction and generate in the software development and design interface and submit successfully prompt information;
If S155, the response data are not second predetermined informations, then it represents that detection failure, and generate detection failure Prompt information.
In at least one embodiment of the present invention, the predetermined dimension is 1MB.In other embodiments, described predetermined Specification can customize setting.First predetermined information and second predetermined information all can be predetermined values, scheduled word Symbol string or scheduled text.In at least one embodiment of the present invention, the first predetermined information is predetermined character string, such as "test failed".In at least one embodiment of the present invention, the second predetermined information is predetermined value, such as " 1 ".
In at least one embodiment of the present invention, the warning message and described submit successfully that prompt information can be with For text prompt, voice prompting, pop-up prompt etc..In at least one embodiment of the present invention, the warning message and It is described that submit successful prompt information may include the size of identifier, current file size and predetermined dimension.Of the invention In at least one embodiment, the identifier can be for the money for exceeding predetermined dimension in the coding of the application program Source file title or path are highlighted.
In at least one embodiment of the present invention, the resource file is committed to the clothes by way of asynchronous schedule Business device.The asynchronous schedule mode refers to after equipment and server establish connection for the equipment, be not immediately into Row submits operation, but submission opportunity is determined according to the service condition of the upstream bandwidth of the server.Therefore the equipment produces The raw time for submitting operation and the server, which received between the time of the resource file, has the regular hour poor, this Way of submission becomes asynchronous schedule.
As seen from the above embodiment, when the resource file that the visualization interface of application program includes is excessive, suspend this It submits and operates and prompt the resource file of visual page described in user excessive, the response speed of the visualization interface can be improved Degree realizes flow optimization, promotes user experience.
Referring to figure 3., the present invention provides a kind of file size detection device 1, is applied in one or more equipment.At this In one embodiment of invention, the file size detection device 1 includes:
Module 10 is constructed, for constructing the application program with visualization interface.The visualization interface may include resource File.The resource file is for being loaded and being shown when showing the visualization interface.In at least one of the invention In embodiment, the resource file can be picture, text file or audio/video file.
In at least one embodiment of the present invention, this document volume detection device 1 is applied at least a terminal device and clothes It is engaged in the software development system that device is constituted.The terminal device is connect with the server by network communication.Of the invention In at least one embodiment, carried out data transmission between the terminal device and the server according to preset protocol.Preferably, The preset protocol include, but are not limited to it is following any one: http protocol (Hyper Text Transfer Protocol, Hypertext transfer protocol), HTTPS agreement (Hyper Text Transfer Protocol over Secure Socket Layer, safely for the http protocol of target) etc..In at least one embodiment of the present invention, the server can be single Server, or the server zone collectively constituted by several function servers.The terminal device can be any tool There is the terminal of network connecting function, for example, the terminal device can be personal computer, tablet computer, smart phone, individual Digital assistants (PersonalDigital Assistant, PDA), game machine, Interactive Internet TV (Internet Protocol Television, IPTV), intellectual wearable device, navigation device etc. movable equipment or desk-top Computer, number TV etc. fixed equipment.The terminal device includes memory 102.The memory 102 can be readable storage Medium, such as flash memory, hard disk, multimedia card, SD memory, random access storage device (RAM), static random-access memory (ROM), the non-volatile memory mediums such as disk, CD.
In at least one embodiment of the present invention, the terminal device has visual in the building of software development and design interface Change the application program at interface.The software development and design interface is for editing and designing the application program.The resource file It can be buffered in memory 102.
The software development and design interface and the visualization interface are visualized graphs user interface (Graphical User Interface, GUI), and it is both included as human-computer interaction interface.The software development and design interface and the visualization Interface can be equipment interface or web interface.User can be by carrying out operation realization on the equipment interface or web interface Data interaction is carried out between the server.
First obtains module 20, for obtaining the characteristic information of the resource file when detecting and submitting and instruct.
In at least one embodiment of the present invention, the submission instruction will after completing Functional Design for front end developer The application program submits to the instruction that rear end developer is tested.The submission instruction can be user in the software It develops on design interface and is generated by specifically operation.Specifically, the operation of the user includes, but are not limited to: slide, Clicking operation (such as: single-click operation, double click operation).Specifically, the programmable button can be on the terminal device Physical button, be also possible to virtual key on the terminal device etc. (such as: the virtual key can be the terminal Virtual icon on the display of equipment etc.), the present invention is herein with no restrictions.
In at least one embodiment of the present invention, characteristic information file path, size and the title of the resource file Information etc..
Calling module 30, for calling and executing pre- submission Hook Function.
In at least one embodiment of the present invention, a plurality of types of Hook Functions are stored in the memory 102.Institute It states in the hooks subdirectory that Hook Function stores under GIT catalogue in the memory.The Hook Function is in specific thing The custom script being called after part triggering.The Hook Function includes equipment Hook Function.The equipment hook is produced by equipment The operations such as raw submission, merging triggering.The equipment Hook Function may include submitting workflow class Hook Function, Email Workflow class script and other all the elements classes.Wherein, submitting workflow class hook is hook relevant to operation is submitted Subfunction.In at least one embodiment of the present invention, submitting workflow class Hook Function includes pre- submission hook (pre- Commit) function.The pre- submission Hook Function is for detecting the characteristic information of the resource file.
In at least one embodiment of the present invention, further comprise in pre- submission hook (pre-commit) function Node script.The Node script is for detecting whether the size of data of the resource file is more than predetermined dimension.
Second obtains module 40, for obtaining the response data for executing pre- submission Hook Function and generating.
In at least one embodiment of the present invention, the response data passes through between the equipment and the server Data interaction and obtain.
Detection module 50 for detecting the response data, and generates prompt information according to testing result.
The detection module 50 further judges whether the response data is the first predetermined information.
If the response data is first predetermined information, then it represents that the size of data of the resource file is greater than predetermined Specification, the detection module 50, which stops executing, to be submitted instruction and generates warning prompt letter in the software development and design interface Breath.
If the response data is not first predetermined information, the detection module 50 further judges the response Whether data are the second predetermined information.
If the response data is second predetermined information, then it represents that the size of data of the resource file meets predetermined Specification requirement, the detection module 50 further execute submission instruction and generate submission in the software development and design interface Success prompt information.
If the response data is not second predetermined information, the detection module 50 further generates detection failure Prompt information.
In at least one embodiment of the present invention, the predetermined dimension is 1MB.In other embodiments, described predetermined Specification can customize setting.First predetermined information and second predetermined information all can be predetermined values, scheduled word Symbol string or scheduled text.In at least one embodiment of the present invention, the first predetermined information is predetermined character string, such as "test failed".In at least one embodiment of the present invention, the second predetermined information is predetermined value, such as " 1 ".
In at least one embodiment of the present invention, the warning message and described submit successfully that prompt information can be with For text prompt, voice prompting, pop-up prompt etc..In at least one embodiment of the present invention, the warning message and It is described that submit successful prompt information may include the size of identifier, current file size and predetermined dimension.Of the invention In at least one embodiment, the identifier can be for the money for exceeding predetermined dimension in the coding of the application program Source file title or path are highlighted.
In at least one embodiment of the present invention, the resource file is committed to the clothes by way of asynchronous schedule Business device.The asynchronous schedule mode refers to after equipment and server establish connection for the equipment, be not immediately into Row submits operation, but submission opportunity is determined according to the service condition of the upstream bandwidth of the server.Therefore the equipment produces The raw time for submitting operation and the server, which received between the time of the resource file, has the regular hour poor, this Way of submission becomes asynchronous schedule.
As seen from the above embodiment, when the resource file that the visualization interface of application program includes is excessive, suspend this It submits and operates and prompt the resource file of visual page described in user excessive, the response speed of the visualization interface can be improved Degree realizes flow optimization, promotes user experience.
Referring to Fig. 4, it is a kind of computer readable storage medium of the embodiment of the present invention.The computer-readable storage Computer instruction is stored on medium.The computer instruction can be stored on memory 102, and be worked as by one or more When managing the execution of device 106, to realize the file size detection method as described in embodiment of the method above.
The memory 102 is for storing program code.The memory 102 can be in integrated circuit without material object shape The circuit with store function of formula, such as RAM (Random-Access Memory, random access memory), FIFO (First In First Out) etc..Alternatively, the memory 102 is also possible to the memory with physical form, such as memory bar, TF card (Trans-flash Card), smart media card (smart media card), safe digital card (secure digital Card), the storage facilities such as flash memory cards (flash card).The memory 102 can pass through communication bus 104 and processing Device 106 carries out data communication.It may include operating system, network communication module and interface testing journey in the memory 102 Sequence.Operating system is to manage and control the program of interface testing equipment hardware and software resource, and file size is supported to detect program And the operation of other softwares and/or program.Network communication module is for realizing between the 102 each component in inside of memory Communication, and communicated between hardware and softwares other in interface testing equipment.
The processor 106 may include one or more microprocessor, digital processing unit.The processor 106 can Call the program code stored in the memory 102 to execute relevant function.For example, modules described in Fig. 1 are The program code being stored in the memory 102, and as performed by the processor 106, to realize a kind of file size inspection Survey class method.The processor 106 is also known as central processing unit (CPU, Central Processing Unit), is one piece of super large The integrated circuit of scale is arithmetic core (Core) and control core (Control Unit).
The processor 106 is for executing the multiple computer instructions stored in the memory 102 to realize file body Multiple instruction can be performed to perform the steps of in product detection method, the processor 106
S11, building have the application program of visualization interface.
In at least one embodiment of the present invention, this document volume detection method is applied to an at least terminal device and service In the software development system that device is constituted.The terminal device is connect with the server by network communication.It is of the invention extremely In few one embodiment, carried out data transmission between the terminal device and the server according to preset protocol.Preferably, institute State preset protocol include, but are not limited to it is following any one: http protocol (Hyper Text Transfer Protocol, surpass Text transfer protocol), HTTPS agreement (Hyper Text Transfer Protocol over Secure Socket Layer, safely for the http protocol of target) etc..In at least one embodiment of the present invention, the server can be single Server, or the server zone collectively constituted by several function servers.The terminal device can be any tool There is the terminal of network connecting function, for example, the terminal device can be personal computer, tablet computer, smart phone, individual Digital assistants (PersonalDigital Assistant, PDA), game machine, Interactive Internet TV (Internet Protocol Television, IPTV), intellectual wearable device, navigation device etc. movable equipment or desk-top Computer, number TV etc. fixed equipment.The terminal device includes memory 102.The memory 102 can be readable storage Medium, such as flash memory, hard disk, multimedia card, SD memory, random access storage device (RAM), static random-access memory (ROM), the non-volatile memory mediums such as disk, CD.
In at least one embodiment of the present invention, the terminal device has visual in the building of software development and design interface Change the application program at interface.The software development and design interface is for editing and designing the application program.The application program Including a visualization interface.The visualization interface may include resource file.The resource file is used for can described in the display It is loaded and is shown when depending on changing interface.The resource file can be buffered in memory 102.In at least one reality of the invention It applies in example, the resource file can be picture, text file or audio/video file.
The software development and design interface and the visualization interface are visualized graphs user interface (Graphical User Interface, GUI), and it is both included as human-computer interaction interface.The software development and design interface and the visualization Interface can be equipment interface or web interface.User can be by carrying out operation realization on the equipment interface or web interface Data interaction is carried out between the server.
S12, the characteristic information that the resource file is obtained when detecting and submitting and instruct.
In at least one embodiment of the present invention, the submission instruction will after completing Functional Design for front end developer The application program submits to the instruction that rear end developer is tested.The submission instruction can be user in the software It develops on design interface and is generated by specifically operation.Specifically, the operation of the user includes, but are not limited to: slide, Clicking operation (such as: single-click operation, double click operation).Specifically, the programmable button can be on the terminal device Physical button, be also possible to virtual key on the terminal device etc. (such as: the virtual key can be the terminal Virtual icon on the display of equipment etc.), the present invention is herein with no restrictions.
In at least one embodiment of the present invention, characteristic information file path, size and the title of the resource file Information etc..
S13, calling simultaneously execute pre- submission Hook Function.
In at least one embodiment of the present invention, a plurality of types of Hook Functions are stored in the memory 102.Institute It states in the hooks subdirectory that Hook Function stores under GIT catalogue in the memory.The Hook Function is in specific thing The custom script being called after part triggering.The Hook Function includes equipment Hook Function.The equipment hook is produced by equipment The operations such as raw submission, merging triggering.The equipment Hook Function may include submitting workflow class Hook Function, Email Workflow class script and other all the elements classes.Wherein, submitting workflow class hook is hook relevant to operation is submitted Subfunction.In at least one embodiment of the present invention, submitting workflow class Hook Function includes pre- submission hook (pre- Commit) function.The pre- submission Hook Function is for detecting the characteristic information of the resource file.
In at least one embodiment of the present invention, further comprise in pre- submission hook (pre-commit) function Node script.The Node script is for detecting whether the size of data of the resource file is more than predetermined dimension.
S14, the response data for executing pre- submission Hook Function generation is obtained.
In at least one embodiment of the present invention, the response data passes through between the equipment and the server Data interaction and obtain.
S15, the detection response data, and prompt information is generated according to testing result.
In at least one embodiment of the present invention, the response data is detected, and generates prompt letter according to testing result Breath further comprises:
S151, judge whether the response data is the first predetermined information;
If S152, the response data are first predetermined information, then it represents that the size of data of the resource file is big In predetermined dimension, stops executing and submit instruction and generate warning message in the software development and design interface;
If S153, the response data are not first predetermined informations, judge whether the response data is first pre- Determine information;
If S154, the response data are the second predetermined information, then it represents that the size of data of the resource file meets pre- Determine specification requirement, executes to submit instruction and generate in the software development and design interface and submit successfully prompt information;
If S155, the response data are not second predetermined informations, then it represents that detection failure, and generate detection failure Prompt information.
In at least one embodiment of the present invention, the predetermined dimension is 1MB.In other embodiments, described predetermined Specification can customize setting.First predetermined information and second predetermined information all can be predetermined values, scheduled word Symbol string or scheduled text.In at least one embodiment of the present invention, the first predetermined information is predetermined character string, such as "test failed".In at least one embodiment of the present invention, the second predetermined information is predetermined value, such as " 1 ".
In at least one embodiment of the present invention, the warning message and described submit successfully that prompt information can be with For text prompt, voice prompting, pop-up prompt etc..In at least one embodiment of the present invention, the warning message and It is described that submit successful prompt information may include the size of identifier, current file size and predetermined dimension.Of the invention In at least one embodiment, the identifier can be for the money for exceeding predetermined dimension in the coding of the application program Source file title or path are highlighted.
In at least one embodiment of the present invention, the resource file is committed to the clothes by way of asynchronous schedule Business device.The asynchronous schedule mode refers to after equipment and server establish connection for the equipment, be not immediately into Row submits operation, but submission opportunity is determined according to the service condition of the upstream bandwidth of the server.Therefore the equipment produces The raw time for submitting operation and the server, which received between the time of the resource file, has the regular hour poor, this Way of submission becomes asynchronous schedule.
As seen from the above embodiment, when the resource file that the visualization interface of application program includes is excessive, suspend this It submits and operates and prompt the resource file of visual page described in user excessive, the response speed of the visualization interface can be improved Degree realizes flow optimization, promotes user experience.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the module, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple module or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or module, It can be electrical or other forms.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical module, it can and it is in one place, or may be distributed over multiple On network module.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in various embodiments of the present invention can integrate in a processor It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.
If the integrated module is realized in the form of software function module and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.
It should also be noted that, herein, term " including ", " including " or its any other variant are intended to non- It is exclusive to include, so that the process, method, article or the device that include a series of elements not only include those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or device Some elements.In the absence of more restrictions, the element limited by sentence " including one ... ", it is not excluded that including There is also other identical elements in the process, method of the element, article or device.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the range for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of file size detection method, which is characterized in that the file size detection method includes:
Construct the application program with visualization interface;The visualization interface includes resource file;
The characteristic information that the resource file is obtained when instruction is submitted detecting;
It calls and executes pre- submission Hook Function;
It obtains and executes the pre- response data for submitting Hook Function to generate;Further comprise in the pre- submission Hook Function Node script;The Node script is for detecting whether the size of data of the resource file is more than predetermined dimension;
The response data is detected, and generates prompt information according to testing result.
2. file size detection method as described in claim 1, it is characterised in that: the file size detection method is further Include:
Judge whether the response data is the first predetermined information;
If the response data is first predetermined information, then it represents that the size of data of the resource file is greater than pre- set pattern Lattice stop executing the submission instruction and generate warning message.
3. file size detection method as claimed in claim 2, it is characterised in that: the file size detection method is further Include:
If the response data is not first predetermined information, judge whether the response data is the second predetermined information;
If the response data is second predetermined information, then it represents that the size of data of the resource file meets predetermined dimension Successfully prompt information is submitted it is required that executing the submission instruction and generating.
4. file size detection method as claimed in claim 3, it is characterised in that: the file size detection method is further Include:
If the response data is not second predetermined information, detection failure prompt information is generated.
5. file size detection method as claimed in claim 3, it is characterised in that: first predetermined information is predetermined character String;Second predetermined information is predetermined value.
6. file size detection method as claimed in claim 2, it is characterised in that: the warning message includes identifier Number, the size of current file size and predetermined dimension.
7. file size detection method as claimed in claim 6, it is characterised in that: the identifier is to apply journey to described The resource file title or path in the coding of sequence beyond predetermined dimension are highlighted.
8. a kind of file size detection device, which is characterized in that the file size detection device includes:
Module is constructed, for constructing the application program with visualization interface;The visualization interface includes resource file;
First obtains module, for obtaining the characteristic information of the resource file when detecting and submitting and instruct;
Calling module, for calling and executing pre- submission Hook Function;It further comprise Node in the pre- submission Hook Function Script;The Node script is for detecting whether the size of data of the resource file is more than predetermined dimension;
Second obtains module, executes the pre- response data for submitting Hook Function to generate for obtaining;
Detection module for detecting the response data, and generates prompt information according to testing result.
9. a kind of equipment, which is characterized in that the equipment includes processor and memory, and the processor is for executing described deposit File size detection method as claimed in any of claims 1 to 7 in one of claims is realized when the computer program stored in reservoir.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has at least one Instruction, at least one described instruction realize that file size is examined as described in any one of claim 1 to 7 when being executed by processor Survey method.
CN201811537720.6A 2018-12-15 2018-12-15 File size detection method, device, equipment and computer readable storage medium Pending CN109840200A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811537720.6A CN109840200A (en) 2018-12-15 2018-12-15 File size detection method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811537720.6A CN109840200A (en) 2018-12-15 2018-12-15 File size detection method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109840200A true CN109840200A (en) 2019-06-04

Family

ID=66883250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811537720.6A Pending CN109840200A (en) 2018-12-15 2018-12-15 File size detection method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109840200A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314183A (en) * 2020-04-09 2020-06-19 网易(杭州)网络有限公司 Flow information detection method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
US20170357805A1 (en) * 2016-06-08 2017-12-14 Cylance Inc. Macro-Script Execution Control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170357805A1 (en) * 2016-06-08 2017-12-14 Cylance Inc. Macro-Script Execution Control
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314183A (en) * 2020-04-09 2020-06-19 网易(杭州)网络有限公司 Flow information detection method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110096429A (en) Test report generation method, device, equipment and storage medium
WO2019196274A1 (en) Web page testing method and apparatus, electronic device, and medium
CN107729475B (en) Webpage element acquisition method, device, terminal and computer-readable storage medium
US9015666B2 (en) Updating product documentation using automated test scripts
WO2018136460A1 (en) Trace management
CN109739855B (en) Method and system for realizing data sheet splicing and automatically training machine learning model
CN110109817A (en) Automatic interface testing method, device, equipment and storage medium
WO2014003885A1 (en) Extension to the expert conversation builder
CN103597469A (en) Live browser tooling in an integrated development environment
CN111913998B (en) Data processing method, device, equipment and storage medium
Xu et al. A pilot study of an inspection framework for automated usability guideline reviews of mobile health applications
CN109634570A (en) Front and back end integrated development method, device, equipment and computer readable storage medium
US20150089308A1 (en) Keyboard, video and mouse switch identifying and displaying nodes experiencing a problem
CN109634579A (en) Code generating method, device, computer installation and storage medium
CN112949973A (en) AI-combined robot process automation RPA process generation method
CN112346947A (en) Performance detection method and device, electronic equipment and computer readable medium
CN111507405A (en) Picture labeling method and device, electronic equipment and computer readable storage medium
CN106170790A (en) Service picture library user interface presents
CN109840200A (en) File size detection method, device, equipment and computer readable storage medium
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
WO2017044926A1 (en) Network visualization for access controls
CN113778542B (en) Service configuration table generation method and device
Akpınar et al. Heuristic role detection of visual elements of web pages
CN105095071B (en) A kind of scene performance information methods, devices and systems for being used to obtain application
Pocatilu Developing an M-Learning Application for iOS.

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190604

RJ01 Rejection of invention patent application after publication