CN110022368A - Time-out time control method, device, equipment and the storage medium of uploading pictures - Google Patents

Time-out time control method, device, equipment and the storage medium of uploading pictures Download PDF

Info

Publication number
CN110022368A
CN110022368A CN201910290048.3A CN201910290048A CN110022368A CN 110022368 A CN110022368 A CN 110022368A CN 201910290048 A CN201910290048 A CN 201910290048A CN 110022368 A CN110022368 A CN 110022368A
Authority
CN
China
Prior art keywords
upload
time
transmitting assembly
uploading pictures
target
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.)
Granted
Application number
CN201910290048.3A
Other languages
Chinese (zh)
Other versions
CN110022368B (en
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910290048.3A priority Critical patent/CN110022368B/en
Publication of CN110022368A publication Critical patent/CN110022368A/en
Application granted granted Critical
Publication of CN110022368B publication Critical patent/CN110022368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present disclosure discloses time-out time control method, device, equipment and the storage medium of a kind of uploading pictures.The described method includes: selecting at least target uploading pictures uploaded to be supplied to transmitting assembly user carries out picture upload, and start timer, timer has preset time-out time;The numerical relation between the uplink time and time-out time when target complete uploading pictures upload is completed according to transmitting assembly, control view controller display uploads successfully display interface or uploads failure display interface.The technical solution of the embodiment of the present disclosure, it realizes the outer layer in transmitting assembly new timer is separately provided and the time-out time of uploading pictures is configured, at the end of when the timer, if transmitting assembly remains unfulfilled the upload to target complete uploading pictures, will not then transmitting assembly be allowed to continue to execute upload service, and then under the premise of realizing the bottom code for not modifying transmitting assembly, flexibly, efficiently the time-out time of uploading pictures is controlled.

Description

Time-out time control method, device, equipment and the storage medium of uploading pictures
Technical field
The embodiment of the present disclosure is related to the time-out time control method of computer technology more particularly to a kind of uploading pictures, dress It sets, equipment and storage medium.
Background technique
As various social medias or the continuous of the network platform are popularized, user can upload one or more picture with single In (or video original image) to the platform of required sharing.The upload operation of picture is realized generally by the transmitting assembly of bottom. It is generally desirable to during transmitting assembly uploading pictures blocked user operation, with improve picture upload efficiency.
When the longest time-out that user can tolerate is arranged it is generally desirable to the upload operation for picture for application layer (display layer) Between, in the time-out time, transmitting assembly can normally execute the upload operation of picture, and after upload operation, restore The normal operating of user, picture uploads successfully at this time;Once the uplink time of picture has been more than the time-out time, it is necessary to stop The upload service of transmitting assembly, to restore the normal operating of user, picture uploads failure at this time.
In the prior art, time-out time when single picture uploads can be set in the code for writing transmitting assembly, and The time-out time is packaged in transmitting assembly, and the general code for not allowing other users directly to modify transmitting assembly, in addition, The time-out time encapsulated in transmitting assembly can not directly determine the time-out time that more pictures upload parallel, therefore, when application layer without It when method directly modifies the bottom code of transmitting assembly, cannot achieve to uploading pictures, especially multiple pictures uploaded parallel Time-out time is effectively controlled.
Summary of the invention
The embodiment of the present disclosure provides time-out time control method, device, equipment and the storage medium of a kind of uploading pictures, with It realizes under the premise of not modifying the bottom code of transmitting assembly, flexibly, efficiently has to the time-out time of uploading pictures Effect control.
In a first aspect, the embodiment of the present disclosure provides a kind of time-out time control method of uploading pictures, comprising:
It selects at least target uploading pictures uploaded to be supplied to transmitting assembly user and carries out picture upload, and start Timer, the timer have preset time-out time;
According to the transmitting assembly complete target complete uploading pictures upload when uplink time and the time-out time it Between numerical relation, control view controller display uploads successfully display interface or upload unsuccessfully display interface.
Second aspect, the embodiment of the present disclosure additionally provide a kind of time-out time control device of uploading pictures, the device packet It includes:
Picture uploads timing module, for selecting at least target uploading pictures uploaded to be supplied to upload group user Part carries out picture upload, and starts timer, and the timer has preset time-out time;
Display module is controlled, for completing uplink time when target complete uploading pictures upload according to the transmitting assembly With the numerical relation between the time-out time, controls view controller and show that uploading successfully display interface or upload unsuccessfully shows Interface.
The third aspect, the embodiment of the present disclosure additionally provide a kind of terminal device, which includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of places Manage the time-out time control method for the uploading pictures that device is realized as described in any in the embodiment of the present disclosure.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computer Program realizes the time-out time control of the uploading pictures as described in any in the embodiment of the present disclosure when program is executed by processing unit Method processed.
The technical solution of the embodiment of the present disclosure is by selecting the target uploading pictures uploaded to be supplied to transmitting assembly user Picture upload is carried out, and starts timer;When completing upload when target complete uploading pictures upload according to the transmitting assembly Between numerical relation between the time-out time in the timer, control view controller display upload successfully display interface or The mode for uploading failure display interface realizes the outer layer in transmitting assembly new timer is separately provided and comes to uploading pictures Time-out time is configured, at the end of in the timer, if it is determined that transmitting assembly, which remains unfulfilled, uploads target complete The upload of picture then will not allow the transmitting assembly to continue to execute upload service, and then realize and do not modifying transmitting assembly Under the premise of bottom code, flexibly, efficiently it control effectively to the time-out time of uploading pictures.
Detailed description of the invention
Fig. 1 is a kind of implementation flow chart of the time-out time control method for uploading pictures that the embodiment of the present disclosure one provides;
Fig. 2 is a kind of implementation flow chart of the time-out time control method for uploading pictures that the embodiment of the present disclosure two provides;
Fig. 3 is a kind of implementation flow chart of the time-out time control method for uploading pictures that the embodiment of the present disclosure three provides;
Fig. 4 is a kind of structural schematic diagram of the time-out time control device for uploading pictures that the embodiment of the present disclosure four provides;
Fig. 5 is a kind of hardware structural diagram for terminal device that the embodiment of the present disclosure five provides.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
In following each embodiments, optional feature and example are provided simultaneously in each embodiment, that records in embodiment is each A feature can be combined, and form multiple optinal plans, and the embodiment of each number should not be considered merely as to a technical solution.
Firstly, being better understood for the ease of the technical solution to the embodiment of the present invention, the present invention is implemented first The main realization details of example is briefly described.
In the prior art, the transmitting assembly of bottom is directly communicated with view controller (display interface), and can be Time-out time when uploading a picture is directly set in the bottom code of transmitting assembly.The transmitting assembly is usually not to interface Details is realized in programming personnel (application layer user) exposure, and therefore, interface programming personnel can be provided each by transmitting assembly Kind interface realizes the calling to the transmitting assembly.Above-mentioned realization based on the prior art, interface programming personnel are if it is intended to modification Time-out time when uploading a time-out time when picture, or being arranged picture that multiple upload parallel, requires connection bottom The programming personnel of layer identification code modifies to the bottom code of transmitting assembly, realizes very cumbersome.
In the present embodiment, what inventor was creative proposes in front of one transmitting assembly of construction and view controller Between component mentality of designing, which is communicated with transmitting assembly and view controller respectively, typically, can be with base The intermediate module is obtained in MVVM (Model-View-ViewModel, data model, view and view-model) frame, Transmitting assembly and view controller are decoupled.
Further, a timer can be set inside central frame, and according to interface programming in the timer Time-out time is arranged in the actual demand of personnel.Start one of upload user selection in transmitting assembly or when plurality of pictures, control It makes the timer and starts timing, central frame can detecte transmitting assembly for user in the communication process with transmitting assembly The picture of upload is selected all to upload status information when completing, if detecting the above-mentioned picture state that all upload is completed When information, the non-timing of the timer to time-out time then illustrates that the upload procedure of picture is less than time-out time, picture upload at Function;If it is determined that above-mentioned picture is still not detected and all uploads the status information completed, then illustrates at the end of when the timer The upload procedure of picture has been more than time-out time, then intermediate module no longer allows transmitting assembly to continue the upload of picture, is schemed Piece uploads failure.By the way that above-mentioned intermediate module is arranged, the specific bottom code in concern transmitting assembly may not need, it is only necessary to make When there is the timer of default time-out time with one, and completing the upload that whole uploading pictures upload according to the transmitting assembly Between numerical relation between the time-out time, it is corresponding to control view controller display and upload successfully display interface (on picture When passing successfully) or upload failure display interface (when picture uploads failure).
Embodiment one
Fig. 1 is a kind of implementation flow chart of the time-out time control method for uploading pictures that the embodiment of the present disclosure one provides. This method is applicable to control the time-out time of uploading pictures under the premise of not modifying transmitting assembly bottom code Situation, this method can be executed by the time-out time control device of uploading pictures provided in an embodiment of the present invention, which can It is realized, and can be generally integrated in all kinds of terminal devices that picture upload service is provided, example by the way of software and/or hardware Such as, mobile phone or tablet computer etc..The embodiment of the present invention specifically comprises the following steps:
S110, user is selected at least target uploading pictures uploaded be supplied to transmitting assembly progress picture upload, And starting timer, the timer has preset time-out time.
As previously mentioned, the method for the embodiment of the present invention can be executed by the intermediate module realized based on MVVM frame, it is described Intermediate module is communicated with the transmitting assembly and view controller respectively, to realize transmitting assembly and view controller It is decoupled.
Wherein, the transmitting assembly is for providing the service that one or plurality of pictures are uploaded to server, it is described on Component is passed by obtaining after being packaged the bottom code write in advance, and multiple call is provided previously in the transmitting assembly Interface, for intermediate module call use.
In the present embodiment, the intermediate module directly carries out information exchange with user, obtains user and selects upload one It opens or plurality of pictures is as target uploading pictures, specifically, beginning transmitting assembly can be selected to be triggered detect user When the upload request of generation, the pictorial information for each target uploading pictures for including in the request is extracted, and by the picture Information is supplied to the transmitting assembly, so that each target uploading pictures are uploaded to server by the transmitting assembly respectively.
Further, in the present embodiment, a timer is configured in intermediate module in advance, which can be in centre When target uploading pictures are supplied to transmitting assembly progress picture upload by component, start timing, to verify on the transmitting assembly It catches when stating target uploading pictures, if can be more than the time-out time of timing in timer.
Specifically, the preset time-out time that the timer has, the time-out time specifically refer to it is preset, it is complete The task institute patient longest time is uploaded at whole pictures of user's selection, in other words the waiting time.
In an optional embodiment of the present embodiment, after intermediate module starts timer, can further it control View controller processed shows the upload animation control for blocked user operation, for example, a hourglass animation control or one It turn-takes and waits control etc., the present embodiment is to this and is not limited.
The reason of being arranged in this way is: during upload operation carries out, generally require and occupy more cpu resource, in order to The upper transfer efficiency for improving upload operation, the user such as can operate effectively while blocking to user's operation Wait prompt.
S120, according to the transmitting assembly complete target complete uploading pictures upload when uplink time and it is described time-out when Between between numerical relation, control view controller display uploads successfully display interface or upload unsuccessfully display interface.
As previously mentioned, in the present embodiment, when can complete the upload of target complete uploading pictures according to the transmitting assembly Uplink time and the time-out time between numerical relation, determine picture upload successfully either picture upload failure, and When determining that target complete uploading pictures upload successfully, control view controller display uploads successfully display interface;And true When determining the upload failure of target complete uploading pictures, control view controller display uploads the display interface that fails.
Namely: when the transmitting assembly completes uplink time when target complete uploading pictures upload less than the time-out Between when, determine that target complete uploading pictures upload successfully;It is completed when target complete uploading pictures upload in the transmitting assembly When uplink time is greater than the time-out time, determine that target complete uploading pictures upload failure.
As previously mentioned, the intermediate module needs are led to the transmitting assembly and the view controller respectively Letter can typically be realized logical between intermediate module and view controller by Signal (Observer Pattern) design pattern Letter.Namely: the view controller observer registered in advance for the intermediate module, and then can be determined entirely when intermediate module When portion's target uploading pictures are uploaded successfully, generates upload pass signal and notify to the view controller for being registered as observer; When intermediate module determines that target complete uploading pictures upload failure, generates and upload failure signal and notify to being registered as observer's The view controller, so that the view controller shows different types of display according to the different types of notice received Interface.
For example, shown in display interface when view controller receives the notice for uploading pass signal " congratulate, on Pass successfully " printed words, and accordingly show and upload successfully icon;When view controller receives the notice for uploading failure signal, Display " uploading failure, please try again later " printed words in display interface, and accordingly show upload failure icon.
Namely: control view controller display uploads successfully display interface or uploads failure display interface, can specifically wrap It includes:
It generates upload failure signal to notify to the view controller, so that the view controller is shown and the upload The matched display interface of failure signal;Or
It generates upload pass signal to notify to the view controller, so that the view controller is shown and the upload The matched display interface of pass signal.
The technical solution of the embodiment of the present disclosure is by selecting the target uploading pictures uploaded to be supplied to transmitting assembly user Picture upload is carried out, and starts timer;When completing upload when target complete uploading pictures upload according to the transmitting assembly Between numerical relation between the time-out time in the timer, control view controller display upload successfully display interface or The mode for uploading failure display interface realizes the outer layer in transmitting assembly new timer is separately provided and comes to uploading pictures Time-out time is configured, at the end of in the timer, if it is determined that transmitting assembly, which remains unfulfilled, uploads target complete The upload of picture then will not allow the transmitting assembly to continue to execute upload service, and then realize and do not modifying transmitting assembly Under the premise of bottom code, flexibly, efficiently it control effectively to the time-out time of uploading pictures.
Embodiment two
Fig. 2 is a kind of implementation flow chart of the time-out time control method for uploading pictures that the embodiment of the present disclosure two provides. The present embodiment is embodied based on optinal plan each in above-described embodiment, provides the time-out of optional uploading pictures Duration control method;
Specifically uplink time when completing the upload of target complete uploading pictures according to the transmitting assembly is surpassed with described When the time between numerical relation, control view controller display uploads successfully display interface or upload fail display interface, have Body turns to: if before detecting and terminating in the timer, the transmitting assembly is completed to target complete uploading pictures It uploads, then shuts down the timer, and control the view controller display and upload successfully display interface;If detected in institute At the end of when stating timer, the transmitting assembly remains unfulfilled the upload to target complete uploading pictures, then shuts down on described The upload service of component is passed, and controls the view controller display and uploads failure display interface;
Meanwhile will test upload of the transmitting assembly completion to target complete uploading pictures, it is embodied as: detecting When the target complete uploading pictures fed back to the transmitting assembly upload the method terminated, it is complete to confirmly detect the transmitting assembly The upload of pairs of target complete uploading pictures.
Correspondingly, the method for the embodiment of the present invention specifically comprises the following steps:
S210, user is selected at least target uploading pictures uploaded be supplied to transmitting assembly progress picture upload, And starting timer, the timer has preset time-out time.
S220, judge before terminating in the timer, if detect the target complete of the transmitting assembly feedback Uploading pictures upload the method terminated: if so, executing S230;Otherwise, S240 is executed.
The present embodiment be primarily adapted for use in the transmitting assembly be packaged in advance target complete uploading pictures upload after When completion the case where call back function, and then it may be implemented to complete the upload task to target complete uploading pictures in transmitting assembly Afterwards, the method terminated is uploaded to intermediate module feedback target complete uploading pictures, so that intermediate module is according to the party detected Method confirmly detects upload of the transmitting assembly completion to target complete uploading pictures.
Therefore, if before terminating in the timer, detect that the target complete of the transmitting assembly feedback uploads Picture uploads the method terminated, then can determine that target complete uploading pictures upload successfully;If in the timer Before end, the target complete uploading pictures that the transmitting assembly feedback is not detected upload the method terminated and are detecting in other words At the end of in the timer, the target complete uploading pictures upload that the transmitting assembly feedback is still not detected terminates Method, then can determine that whole pictures upload failure.
S230, the timer is shut down, and controls the view controller display and uploads successfully display interface.
When determining that target complete uploading pictures upload successfully, the operation which uploads this picture is not necessarily to Timing is carried out again, can be accordingly timed the failure setting of device, can specifically be shut down the timer.Meanwhile intermediate module control It makes the view controller display and uploads successfully display interface.It notifies for example, generating and uploading pass signal to as intermediate module The view controller of observer, so that the view controller is shown and the matched display interface of the upload pass signal.
S240, the upload service for shutting down the transmitting assembly, and control the view controller display upload and unsuccessfully show Interface.
When determining that target complete uploading pictures upload failure, the transmitting assembly is without continuing to the mesh for not uploading completion Mark uploading pictures continue to upload, and the interface that can be accordingly provided previously by the transmitting assembly shuts down the upload of the transmitting assembly Service.Meanwhile intermediate module controls the view controller display and uploads failure display interface.Unsuccessfully believe for example, generating and uploading Number notice is unsuccessfully believed so that the view controller is shown with described upload to view controller as intermediate module observer Number matched display interface.
If the technical solution of the embodiment of the present invention is by before presetting and detecting and terminate in the timer, institute Upload of the transmitting assembly completion to target complete uploading pictures is stated, then shuts down the timer, and control the view controller Display uploads successfully display interface, and if the transmitting assembly is complete not yet at the end of detecting in the timer The upload of pairs of target complete uploading pictures, then shut down the upload service of the transmitting assembly, and control the view controller Display upload failure display interface mutual exclusion logic, realize intermediate module listen to the transmitting assembly whether feed back it is complete During portion's target uploading pictures upload the method terminated, simple Clocked operation is only carried out, can be realized to transmitting assembly Uploading pictures the technical effect that is controllably arranged of time-out time, realize it is simple, it is at low cost.
Embodiment three
Fig. 3 is a kind of flow diagram of the time-out time control method for uploading pictures that the embodiment of the present disclosure three provides. The present embodiment is embodied based on optinal plan each in the various embodiments described above, provides the super of optional uploading pictures When duration control method;
It specifically will test upload of the transmitting assembly completion to target complete uploading pictures, be embodied as: whenever When detecting that a target uploading pictures of the transmitting assembly feedback upload the method terminated, cumulative meter is carried out to counter Number;It is determined when selecting the total quantity of Target Photo uploaded consistent with the user in the count value for determining the counter Detect that the transmitting assembly completes the upload to target complete uploading pictures.
Meanwhile specifically at least target uploading pictures uploaded are being selected to be supplied to transmitting assembly and carry out figure user Before piece uploads, further includes: obtain the total quantity of the target uploading pictures;If the total quantity is less than or equal to preset Maximum concurrently upload number, then by user select upload an at least target uploading pictures be supplied to transmitting assembly carry out picture It uploads;If the total quantity is greater than the maximum and concurrently uploads number, the user is prompted to reselect with the maximum simultaneously Hair uploads the matched target uploading pictures of number.
Correspondingly, the method for the present embodiment specifically comprises the following steps:
S310, the total quantity that user selects at least one target uploading pictures uploaded is obtained.
Programming on bottom layer personnel generally during writing the bottom code of transmitting assembly, are added and concurrently upload number to maximum Setting, the maximum number of picture for concurrently uploading number, in particular to user's single uploading instructions, allowing while uploading Amount.And interface programming personnel are when actually using the transmitting assembly, it may be desirable to concurrently be uploaded to the maximum of the transmitting assembly Number is modified, since the bottom code of the transmitting assembly is not exposed to interface programming personnel, each time simultaneously to the maximum The modification that hair uploads number requires the encapsulation that programming on bottom layer personnel modify the bottom code of transmitting assembly and re-start component, behaviour Make cumbersome, inefficiency.
In the present embodiment, it is directly interacted due to designing intermediate module with user, can bottom be compiled Cheng personnel configured in transmitting assembly one it is biggish it is maximum concurrently upload number (for example, 100 or 1000 etc.), later can be A maximum actually required is configured in intermediate module concurrently uploads number, it is customized to the maximum to realize as needed Concurrently upload the effect that number is configured.
Correspondingly, intermediate module can be in the upload request for detecting that user selects beginning the triggered generation of transmitting assembly When, extract the pictorial information that the user for including in the upload request selects at least one target uploading pictures uploaded, and root According to the pictorial information, the total quantity that user selects at least one target uploading pictures uploaded is obtained.
S320, judge whether the total quantity is less than or equal to preset maximum and concurrently uploads number: if so, executing S330;Otherwise S340 is executed.
In the present embodiment, directly detect whether the total quantity is less than or equal to preset maximum simultaneously by intermediate module Hair uploads number, to realize the effect limited in intermediate module the target uploading pictures that user's single can be uploaded concurrently. Since the very big of number setting is concurrently uploaded to the maximum in transmitting assembly, as long as guaranteeing that user selects the target uploaded The total quantity of uploading pictures is less than the maximum being arranged in intermediate module and concurrently uploads number, which theoretically can It is uploaded with being uploaded component.
S330, user is selected at least target uploading pictures uploaded be supplied to transmitting assembly progress picture upload, And start timer, execute S350.
Wherein, the timer has preset time-out time.
S340, the prompt user are reselected and the maximum concurrently upload matched target uploading pictures of number.
It is concurrently uploaded if the user selects the total quantity of at least one target uploading pictures uploaded to be greater than the maximum Number then needs this upload operation to user to limit, and then the user can be prompted to reselect and the maximum Concurrently upload the matched target uploading pictures of number.
Optionally, can transfinite signal to the view controller offer quantity as observer, so that view controller The corresponding corresponding display interface of display, such as: " uploading pictures quantity is more than 5, is please uploaded again " is shown in the display page Deng.
S350, when a target uploading pictures for detecting transmitting assembly feedback upload the method terminated, it is right Counter carries out accumulated counts.
The present embodiment be primarily adapted for use in the transmitting assembly be packaged in advance either objective uploading pictures upload after When completion the case where call back function, so can transmitting assembly complete to the upload task of a target uploading pictures after, to Intermediate module feeds back a target uploading pictures and uploads the method terminated.
Since intermediate module obtains the total quantity that user once uploads the target uploading pictures of task choosing upload in advance, because This, intermediate module can upload the method terminated to each target uploading pictures that transmitting assembly is fed back and carry out accumulated counts, It, can be true when selecting the total quantity of Target Photo uploaded consistent with the user in the count value for determining the counter Regular inspection measures upload of the transmitting assembly completion to target complete uploading pictures.
In an optional embodiment of the present embodiment, the time-out time and/or the maximum concurrently upload number It first passes through in advance and is issued to the intermediate module using setting model file.
Wherein, application setting model file (HTS APP Setting Model) is specially to each in application program Parameter used in a component carries out the configuration file of initial configuration, correspondingly, can be in server end to the application setting mould It is that above-mentioned increased field configuration is corresponding after the increase of type file concurrently uploads the matched field of number with time-out time or maximum Field value (occurrence of time-out time and the maximum occurrence for concurrently uploading number), and application setting model file is issued Inside the application program installed to client, and then it may be implemented to when being configured in application program intermediate module and carrying out time-out Between, and/or the maximum dynamic configuration for concurrently uploading number.
S360, judge before terminating in the timer, if the count value for detecting the counter, with the use The total quantity for the Target Photo that family selection uploads is consistent: if so, executing S370;Otherwise, S380 is executed.
S370, the timer is shut down, and controls the view controller display and uploads successfully display interface.
S380, the upload service for shutting down the transmitting assembly, and control the view controller display upload and unsuccessfully show Interface.
The technical solution of the embodiment of the present invention passes through the time-out time and/or the maximum concurrently upload number is preparatory In such a way that application setting model file is issued to the intermediate module, server may be implemented in real time dynamically to using journey The above-mentioned parameter of intermediate module in sequence carries out dynamic configuration, after application issued, can also carry out in user terminal above-mentioned The modification of parameter further improves the practicability and application scenarios of the time-out time control method of uploading pictures.Furthermore lead to It crosses and accumulated counts is carried out to the method that each target uploading pictures of transmitting assembly feedback upload end to detect on described The mode whether component completes the upload to target complete uploading pictures is passed, further breaching needs the function of transmitting assembly It asks, and improves the realization flexibility of the embodiment of the present invention.
Example IV
Fig. 4 is a kind of structural schematic diagram of the time-out time control device for uploading pictures that the embodiment of the present disclosure four provides. With reference to Fig. 4, the time-out time control device of uploading pictures includes: that picture uploads timing module 410 and control display module 420, each module is specifically described below.
Picture uploads timing module 410, for selecting at least target uploading pictures uploaded to be supplied to user It passes component and carries out picture upload, and start timer, the timer has preset time-out time;
Display module 420 is controlled, for completing upload when target complete uploading pictures upload according to the transmitting assembly Numerical relation between time and the time-out time, control view controller display upload successfully display interface or upload failure Display interface.
The technical solution of the embodiment of the present disclosure is by selecting the target uploading pictures uploaded to be supplied to transmitting assembly user Picture upload is carried out, and starts timer;When completing upload when target complete uploading pictures upload according to the transmitting assembly Between numerical relation between the time-out time in the timer, control view controller display upload successfully display interface or The mode for uploading failure display interface realizes the outer layer in transmitting assembly new timer is separately provided and comes to uploading pictures Time-out time is configured, at the end of in the timer, if it is determined that transmitting assembly, which remains unfulfilled, uploads target complete The upload of picture then will not allow the transmitting assembly to continue to execute upload service, and then realize and do not modifying transmitting assembly Under the premise of bottom code, flexibly, efficiently it control effectively to the time-out time of uploading pictures.
On the basis of the various embodiments described above, control display module 420 be can specifically include:
Successfully display interface control display unit is uploaded, if for before detecting and terminating in the timer, institute Upload of the transmitting assembly completion to target complete uploading pictures is stated, then shuts down the timer, and control the view controller Display uploads successfully display interface;
It uploads failure display interface and controls display unit, if at the end of for detecting in the timer, institute It states transmitting assembly and remains unfulfilled upload to target complete uploading pictures, then shut down the upload service of the transmitting assembly, and control It makes the view controller display and uploads failure display interface.
On the basis of the various embodiments described above, successfully display interface control display unit is uploaded, specifically can be used for: examining When measuring the method for target complete uploading pictures upload end of the transmitting assembly feedback, the transmitting assembly is confirmly detected Complete the upload to target complete uploading pictures.
On the basis of the various embodiments described above, successfully display interface control display unit is uploaded, specifically can be used for: whenever When detecting that a target uploading pictures of the transmitting assembly feedback upload the method terminated, cumulative meter is carried out to counter Number;
In the count value for determining the counter, select the total quantity of Target Photo uploaded consistent with the user When, confirmly detect upload of the transmitting assembly completion to target complete uploading pictures.
It can also include: maximum concurrently upload number control module on the basis of the various embodiments described above;
The maximum concurrently upload number control module, for user to be selected at least target uploading pictures uploaded It is supplied to before transmitting assembly progress picture upload, obtains the total quantity of the target uploading pictures;
If the total quantity, which is less than or equal to preset maximum, concurrently uploads number, user is selected to upload at least One target uploading pictures is supplied to transmitting assembly and carries out picture upload;
If the total quantity, which is greater than the maximum, concurrently uploads number, the user is prompted to reselect and the maximum Concurrently upload the matched target uploading pictures of number.
It can also include: to upload animation control control display module on the basis of the various embodiments described above;
The upload animation control controls display module, for user to be selected blit in at least target uploaded Piece is supplied to transmitting assembly and carries out picture upload, and after starting timer, controls the view controller and show for blocking The upload animation control of user's operation.
On the basis of the various embodiments described above, described device is configured on the intermediate module realized based on MVVM frame, The intermediate module is communicated with the transmitting assembly and the view controller respectively, and the view controller is preparatory Be registered as the observer of the intermediate module;
The control display module 420 specifically can be used for:
It generates upload failure signal to notify to the view controller, so that the view controller is shown and the upload The matched display interface of failure signal;Or
It generates upload pass signal to notify to the view controller, so that the view controller is shown and the upload The matched display interface of pass signal.
On the basis of the various embodiments described above, the time-out time and/or the maximum concurrently upload number first pass through answer in advance The intermediate module is issued to setting model file.
Method provided by disclosure any embodiment can be performed in the said goods, has the corresponding functional module of execution method And beneficial effect.
Embodiment five
Below with reference to Fig. 5, it illustrates the structural representations for the terminal device 500 for being suitable for being used to realize the embodiment of the present disclosure Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.End shown in Fig. 5 End equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 5, terminal device 500 may include processing unit (such as central processing unit, graphics processor etc.) 501, random access can be loaded into according to the program being stored in read-only memory (ROM) 502 or from storage device 508 Program in memory (RAM) 503 and execute various movements appropriate and processing.In RAM 503, it is also stored with terminal device Various programs and data needed for 500 operations.Processing unit 501, ROM 502 and RAM 503 pass through the phase each other of bus 504 Even.Input/output (I/O) interface 505 is also connected to bus 504.
In general, following device can connect to I/O interface 505: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 506 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 507 of dynamic device etc.;Storage device 508 including such as tape, hard disk etc.;And communication device 509.Communication device 509, which can permit terminal device 500, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 5 shows tool There is the terminal device 500 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 509, or from storage device 508 It is mounted, or is mounted from ROM 502.When the computer program is executed by processing unit 501, the embodiment of the present disclosure is executed Method in the above-mentioned function that limits.
Namely: it when the computer program is executed by processing unit 501, realizes: user is selected at least one uploaded Target uploading pictures are supplied to transmitting assembly and carry out picture upload, and start timer, and the timer has preset time-out Time;It is completed according to the transmitting assembly between the uplink time and the time-out time when target complete uploading pictures upload Numerical relation, control view controller display upload successfully display interface or upload failure display interface.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned terminal device;It is also possible to individualism, and not It is fitted into the terminal device.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the end When end equipment executes, so that the terminal device is realized: selecting at least target uploading pictures uploaded to be supplied to user It passes component and carries out picture upload, and start timer, the timer has preset time-out time;According to the transmitting assembly The numerical relation between the uplink time and the time-out time when target complete uploading pictures upload is completed, view control is controlled Device display uploads successfully display interface or uploads failure display interface.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in the embodiment of the present disclosure involved module or unit can be realized by way of software, can also be with It is realized by way of hardware.Wherein, module or the title of unit are not constituted under certain conditions to the module or unit The restriction of itself, for example, video acquiring module is also described as " at least one of obtaining and paying close attention to user list Pay close attention to the module of the corresponding more new video of user ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (11)

1. a kind of time-out time control method of uploading pictures characterized by comprising
It selects at least target uploading pictures uploaded to be supplied to transmitting assembly user and carries out picture upload, and start timing Device, the timer have preset time-out time;
It is completed according to the transmitting assembly between the uplink time and the time-out time when target complete uploading pictures upload Numerical relation, control view controller display upload successfully display interface or upload failure display interface.
2. the method according to claim 1, wherein completing target complete uploading pictures according to the transmitting assembly The numerical relation between uplink time and time-out time when upload, control view controller display, which uploads, successfully shows boundary Face uploads failure display interface, comprising:
If detected before terminating in the timer, the transmitting assembly is completed to the upper of target complete uploading pictures It passes, then shuts down the timer, and control the view controller display and upload successfully display interface;
If detected in the timer, the transmitting assembly is remained unfulfilled to target complete uploading pictures It uploads, then shuts down the upload service of the transmitting assembly, and control the view controller display and upload failure display interface.
3. according to the method described in claim 2, it is characterized in that, detecting that the transmitting assembly is completed to upload target complete The upload of picture, comprising:
When detecting that the target complete uploading pictures of the transmitting assembly feedback upload the method terminated, confirmly detect described Transmitting assembly completes the upload to target complete uploading pictures.
4. according to the method described in claim 2, it is characterized in that, detecting that the transmitting assembly is completed to upload target complete The upload of picture, comprising:
When a target uploading pictures for detecting the transmitting assembly feedback upload the method terminated, counter is carried out Accumulated counts;
In the count value for determining the counter, when selecting the total quantity of Target Photo uploaded consistent with the user, really Regular inspection measures upload of the transmitting assembly completion to target complete uploading pictures.
5. the method according to claim 1, wherein user is selected blit in at least target uploaded Piece is supplied to before transmitting assembly progress picture upload, further includes:
Obtain the total quantity of the target uploading pictures;
If the total quantity, which is less than or equal to preset maximum, concurrently uploads number, user is selected at least one uploaded Target uploading pictures are supplied to transmitting assembly and carry out picture upload;
If the total quantity is greater than the maximum and concurrently uploads number, the user is prompted to reselect concurrent with the maximum Upload the matched target uploading pictures of number.
6. the method according to claim 1, wherein user is selected blit in at least target uploaded Piece is supplied to transmitting assembly and carries out picture upload, and after starting timer, further includes:
It controls the view controller and shows the upload animation control operated for blocked user.
7. method according to claim 1-6, which is characterized in that the method is by being realized based on MVVM frame Intermediate module executes, and the intermediate module is communicated with the transmitting assembly and the view controller respectively, and described The view controller observer registered in advance for the intermediate module;
Control view controller display uploads successfully display interface or uploads failure display interface, comprising:
It generates upload failure signal to notify to the view controller, fail so that the view controller is shown with the upload The display interface of Signal Matching;Or
It generates upload pass signal to notify to the view controller, be uploaded successfully so that the view controller is shown with described The display interface of Signal Matching.
8. according to the method described in claim 7, it is characterized by: the time-out time and/or the maximum concurrently upload number It first passes through in advance and is issued to the intermediate module using setting model file.
9. a kind of time-out time control device of uploading pictures characterized by comprising
Picture upload timing module, for by user select upload an at least target uploading pictures be supplied to transmitting assembly into Row picture uploads, and starts timer, and the timer has preset time-out time;
Display module is controlled, for completing uplink time and institute when target complete uploading pictures upload according to the transmitting assembly The numerical relation between time-out time is stated, control view controller display, which uploads successfully display interface or uploads, unsuccessfully shows boundary Face.
10. a kind of terminal device, which is characterized in that the equipment includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of processing fill Set the time-out time control method realized such as uploading pictures described in any one of claims 1-8.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that program dress processed Set the time-out time control method realized when execution such as uploading pictures described in any one of claims 1-8.
CN201910290048.3A 2019-04-11 2019-04-11 Method, device and equipment for controlling overtime time of uploaded pictures and storage medium Active CN110022368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290048.3A CN110022368B (en) 2019-04-11 2019-04-11 Method, device and equipment for controlling overtime time of uploaded pictures and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290048.3A CN110022368B (en) 2019-04-11 2019-04-11 Method, device and equipment for controlling overtime time of uploaded pictures and storage medium

Publications (2)

Publication Number Publication Date
CN110022368A true CN110022368A (en) 2019-07-16
CN110022368B CN110022368B (en) 2020-05-12

Family

ID=67191020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290048.3A Active CN110022368B (en) 2019-04-11 2019-04-11 Method, device and equipment for controlling overtime time of uploaded pictures and storage medium

Country Status (1)

Country Link
CN (1) CN110022368B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465872A (en) * 2007-12-17 2009-06-24 新奥特(北京)视频技术有限公司 Method for transmitting and managing document
CN101465873A (en) * 2007-12-17 2009-06-24 新奥特(北京)视频技术有限公司 Document transmission system based on FTP protocol
CN101567903A (en) * 2009-05-11 2009-10-28 北京中企开源信息技术有限公司 Method for uploading file and system based on Ajax technology
CN101594390A (en) * 2009-06-17 2009-12-02 中兴通讯股份有限公司 A kind of ftp client and its implementation
CN102638418A (en) * 2012-03-31 2012-08-15 上海量明科技发展有限公司 Method, client side and system for data transmission in instant messaging
US20150188720A1 (en) * 2013-12-30 2015-07-02 Alex Winter Method for Video Based Social Media Networking

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465872A (en) * 2007-12-17 2009-06-24 新奥特(北京)视频技术有限公司 Method for transmitting and managing document
CN101465873A (en) * 2007-12-17 2009-06-24 新奥特(北京)视频技术有限公司 Document transmission system based on FTP protocol
CN101567903A (en) * 2009-05-11 2009-10-28 北京中企开源信息技术有限公司 Method for uploading file and system based on Ajax technology
CN101594390A (en) * 2009-06-17 2009-12-02 中兴通讯股份有限公司 A kind of ftp client and its implementation
CN102638418A (en) * 2012-03-31 2012-08-15 上海量明科技发展有限公司 Method, client side and system for data transmission in instant messaging
US20150188720A1 (en) * 2013-12-30 2015-07-02 Alex Winter Method for Video Based Social Media Networking

Also Published As

Publication number Publication date
CN110022368B (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN110442608A (en) Information processing method, device, electronic equipment, medium and system
CN109995877A (en) Information-pushing method and device
CN105354090B (en) The management method and device of virtual unit
CN109801210A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN109788334A (en) Barrage processing method, device, electronic equipment and computer readable storage medium
CN109634599A (en) Display methods, device, equipment and the storage medium of page view
CN110096665A (en) Methods of exhibiting, device, equipment and the medium of picture category comment data
CN110532983A (en) Method for processing video frequency, device, medium and equipment
CN109618216A (en) Show method, apparatus, equipment and the storage medium of video stress state mark
CN111427576B (en) Method, device, storage medium and terminal for configuring application program interface
CN110007936A (en) Data processing method and device
CN109862076A (en) A kind of service data interaction methods, devices and systems
WO2024061088A1 (en) Display method and apparatus, electronic device, and storage medium
CN108959102A (en) Method and apparatus for generating test data, test application to be tested
WO2023221941A1 (en) Image processing method and apparatus, device, and storage medium
CN108052377A (en) Input processing method based on cloud, device, server and storage medium
CN110022368A (en) Time-out time control method, device, equipment and the storage medium of uploading pictures
BR112015014740B1 (en) METHOD FOR A POLICY ENGINE AND COMPUTING DEVICE
CN116302271A (en) Page display method and device and electronic equipment
CN116129501A (en) Face pose estimation method and device
CN109634866A (en) Data test method, apparatus, medium and electronic equipment
CN109672931A (en) Method and apparatus for handling video frame
CN107609852A (en) For handling the method and apparatus for paying request
CN103605792A (en) Method and device for providing service resources
CN109636724A (en) A kind of display methods of list interface, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant