Detailed Description
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification may be combined with each other without conflict.
Referring to FIG. 1, a system diagram is implemented for a load component. The system comprises the intelligent terminal and the server, wherein a user starts and uses an application program at the intelligent terminal, and the application program refers to an application program with a component loading function, such as various popular instant messaging APPs (such as WeChat, microblog and the like) at present. When a user triggers a data updating operation (for example, the latest microblog content is updated through a pull-down operation in a microblog), the intelligent terminal immediately requests the server to load data; and then, the server sends the updated data to the intelligent terminal, and in the data transmission process, the intelligent terminal prompts the meaning of 'loading data' to the user in a mode of displaying a loading component.
In a first aspect, an embodiment of the present disclosure provides a method for controlling a loading assembly, please refer to fig. 2, including:
s201: and after receiving a trigger signal of a user to the loading component, initiating a data loading request to the server.
When the user performs the operation of loading data, the user receives a trigger signal of the user to load the component. For example, as described above, in general, when a user performs a "pull-down" operation, the intelligent terminal receives a trigger signal of the user to the recording component, and then the intelligent terminal initiates a request to the server; in addition, sometimes when a page is newly created and loading is slow, the user may also perform a trigger to load the component (less often).
S202: the speed at which data is currently received from the server is determined.
In the process of receiving data from the server, the intelligent terminal can judge the speed (also called data transmission speed) of receiving data from the server currently through flow monitoring.
S203: and determining the loading component movement speed corresponding to the current data receiving speed according to the corresponding relation between the preset data receiving speed and the loading component movement speed.
In order to control the display of the loading component according to the loading component movement speed corresponding to the data transmission speed, the corresponding relationship between the received data speed and the loading component movement speed may be preset, and the corresponding loading component movement speed is matched according to the current data transmission speed determined in step S202.
For example, a "received data velocity versus load assembly motion velocity" gradient mapping scheme is pre-established, assuming: if the received data speed is 0-50Kb/s, determining that the corresponding loading component has a slow motion speed; if the received data speed is 50-100Kb/s, determining the corresponding movement speed of the loading assembly to be 'middle'; and if the received data speed is more than 100Kb/s, determining that the corresponding loading assembly moves at a high speed. It should be noted that the above "slow, medium and fast" is described for visual representation, and in actual operation, the above "slow, medium and fast" may be embodied by setting a specific value/range of the movement speed of the loading assembly.
S204: and controlling the display loading assembly at the determined loading assembly movement speed.
The loading assembly includes, but is not limited to, a circular member, a progress bar member, an object member, and the like. Taking a circular member as an example, the rotation speed of the circular member is controlled according to the movement speed of the loading assembly determined in the foregoing step S203. In addition, it can be understood that, by the above manner, the movement speed of the loading component can be dynamically adjusted, that is, if the data transmission speed is fast or slow, the movement speed of the loading component displayed to the user is also fast or slow.
In the embodiment of the present specification, the loading component is controlled and displayed at the loading component movement speed corresponding to the data transmission speed according to the data receiving speed of the intelligent terminal from the server, and it can be understood that if the data transmission speed is fast, the loading component movement speed may be controlled to be fast (for example, the circular loading component rotation speed is fast), and otherwise, the loading component movement speed may be controlled to be slow. Therefore, the user can be given an intuitive feeling: by judging the movement speed of the loading assembly, the data transmission speed can be roughly judged, and the user can conveniently estimate the time length of data loading operation.
In an alternative mode, the loading assembly is a circular or similar circular display component, the circular or similar circular display component comprises one or more components, and the loading assemblies of various modes are distinguished through the components with different numbers; the loading assembly movement speed refers to the rotational speed of a circular or circular-like display member. For example, a circular member includes two portions (dividing a circle into two), or a circular member includes four portions (dividing a circle into four portions), and so on. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the quantity of transmission data can be conveniently reflected by the loading components of different styles in a selectable mode.
In an optional mode, the loading assemblies are progress bar members, and the loading assemblies of different styles are distinguished through the progress bar members with different lengths; the speed of movement of the loading assembly refers to the speed of advancement of the progress bar member. For example, progress bars with different lengths can be set so as to distinguish loading assemblies with different styles, for example, some progress bars are 5cm long, and some progress bars are 8cm long, and of course, loading assemblies with different styles can also be distinguished by setting the length-width ratio of the progress bars. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the quantity of transmission data can be conveniently reflected by the loading components of different styles in a selectable mode.
In an optional mode, the loading assemblies are object members, and the loading assemblies in different styles are distinguished through different types of object members; the loading assembly movement speed refers to the advancing or filling speed of the object member. For example, object components include, but are not limited to, vehicle components, aircraft components, shopping cart components, bag components, and the like. They are not listed, but they may be indicated visually by the moving speed of the object member. For example, the vehicle member visually indicates the speed of data transmission by displaying the speed of the vehicle member, and for example, visually indicates the speed of data transmission by displaying the speed of the shopping cart member. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the quantity of transmission data can be conveniently reflected by the loading components of different styles in a selectable mode.
In an alternative, the above method further comprises the following steps (1) - (3).
(1) The amount of data currently received from the server is analyzed.
Specifically, the amount of data currently received from the server may be determined by traffic monitoring or by parsing the data packets.
(2) And determining the loading component style corresponding to the currently received data according to the corresponding relation between the preset data quantity and the loading component style.
The corresponding relation between the data quantity and the loading assembly style is preset, taking a circular component as an example of the loading assembly, when the data quantity is greater than 10, the circular component formed by the most components (for example, a circular component formed by 8 components) corresponds, when the data quantity is greater than 5 and less than 10, the circular component formed by the next multi-components (for example, a circular component formed by 4 components) corresponds, and when the data quantity is less than 5, the circular component formed by the least components (for example, a circular component formed by 2 components) corresponds.
(3) And displaying the loading component in the determined loading component style.
In order to achieve the purpose of controlling the loading of the component style through the data quantity, firstly, the quantity of the data currently received from the server needs to be analyzed and determined in the process of receiving the data from the server, and as mentioned above, the method can also be implemented in a flow monitoring mode; secondly, a corresponding relation between the data quantity and the loading component style needs to be preset, the quantity of the data currently received from the server is matched in the corresponding relation, and the loading component style corresponding to the currently received data is determined; finally, the loading component is displayed in the determined recording component style.
For example, the loading assembly is a circular member, and as mentioned above, different models of loading assemblies can be distinguished by the number of portions that make up the circular member. If the amount of data currently transmitted is large, a circular member composed of a plurality of parts, for example, a circular member composed of four parts (see fig. 3), may be displayed, and if the amount of data currently transmitted is small, a circular member composed of a small number of parts, for example, a circular member composed of two parts (see fig. 4), may be displayed.
In the above manner, on the basis of controlling the movement speed of the loading assembly according to the data transmission speed, the style of the loading assembly is further controlled through the data quantity, so that the effect of displaying the loading assembly to a user in a richer and more three-dimensional manner is achieved.
In a second aspect, based on the same inventive concept, an embodiment of the present specification provides a method for controlling a loading assembly, please refer to fig. 5, including:
s501: and after receiving a trigger signal of a user to the loading component, initiating a data loading request to the server.
When the user performs the operation of loading data, the user receives a trigger signal of the user to load the component. For example, as described above, in general, when a user performs a "pull-down" operation, the intelligent terminal receives a trigger signal of the user to the recording component, and then the intelligent terminal initiates a request to the server; in addition, sometimes when a page is newly created and loading is slow, the user may also perform a trigger to load the component (less often).
S502: the amount of data currently received from the server is analyzed.
Specifically, the amount of data currently received from the server may be determined by traffic monitoring or by parsing the data packets.
S503: and determining the loading component style corresponding to the currently received data according to the corresponding relation between the preset data quantity and the loading component style.
The corresponding relation between the data quantity and the loading assembly style is preset, taking a circular component as an example of the loading assembly, when the data quantity is greater than 10, the circular component formed by the most components (for example, a circular component formed by 8 components) corresponds, when the data quantity is greater than 5 and less than 10, the circular component formed by the next multi-components (for example, a circular component formed by 4 components) corresponds, and when the data quantity is less than 5, the circular component formed by the least components (for example, a circular component formed by 2 components) corresponds.
S504: and displaying the loading component in the determined loading component style.
It can be seen that, in order to achieve the above purpose of controlling the loading of the component style by the data quantity, firstly, the quantity of the data currently received from the server needs to be analyzed and determined in the process of receiving the data from the server, and as mentioned above, the method can also be implemented in a traffic monitoring manner; secondly, a corresponding relation between the data quantity and the loading component style needs to be preset, the quantity of the data currently received from the server is matched in the corresponding relation, and the loading component style corresponding to the currently received data is determined; finally, the loading component is displayed in the determined recording component style.
For example, the loading assembly is a circular member, and different types of loading assemblies can be distinguished by the number of parts forming the circular member. If the amount of data currently transmitted is large, a plurality of parts of the circular member may be displayed, for example, a four-part circular member (see fig. 3), and if the amount of data currently transmitted is small, a smaller number of parts of the circular member may be displayed, for example, a two-part circular member (see fig. 4).
In the embodiment of the present specification, the loading components are controlled and displayed in the manner of loading components corresponding to the data quantity according to the quantity of data received by the intelligent terminal from the server, and it can be understood that if the data quantity is larger, the loading components may be controlled to be dense or longer (for example, a circular component composed of a plurality of parts, or a longer progress bar component). Therefore, the user can be given an intuitive feeling: by judging the style of the loading component, the size of the transmission data can be roughly judged, and the user can conveniently estimate the time length of the data loading operation.
In an alternative, the method further comprises the steps of:
(a) the speed at which data is currently received from the server is determined.
In the process of receiving data from the server, the intelligent terminal can judge the speed (also called data transmission speed) of receiving data from the server currently through flow monitoring.
(b) And determining the loading component movement speed corresponding to the current data receiving speed according to the corresponding relation between the preset data receiving speed and the loading component movement speed.
In order to control the display of the loading assembly according to the movement speed of the loading assembly corresponding to the data transmission speed, the corresponding relation between the data receiving speed and the movement speed of the loading assembly can be preset, and the movement speed of the corresponding loading assembly is matched according to the current data transmission speed determined in the step (a).
For example, a "received data velocity versus load assembly motion velocity" gradient mapping scheme is pre-established, assuming: if the received data speed is 0-50Kb/s, determining that the corresponding loading component has a slow motion speed; if the received data speed is 50-100Kb/s, determining the corresponding movement speed of the loading assembly to be 'middle'; and if the received data speed is more than 100Kb/s, determining that the corresponding loading assembly moves at a high speed. It should be noted that the above "slow, medium and fast" is described for visual representation, and in actual operation, the above "slow, medium and fast" may be embodied by setting a specific value/range of the movement speed of the loading assembly.
(c) And controlling the display loading assembly at the determined loading assembly movement speed.
The loading assembly includes, but is not limited to, a circular member, a progress bar member, an object member, and the like. Taking a circular member as an example, controlling the rotation speed of the circular member according to the movement speed of the loading assembly determined in the step (b). In addition, it can be understood that, by the above manner, the movement speed of the loading component can be dynamically adjusted, that is, if the data transmission speed is fast or slow, the movement speed of the loading component displayed to the user is also fast or slow.
In the above manner, on the basis of controlling the style of the loading assembly according to the data volume, the movement speed of the loading assembly is further controlled through the data transmission speed, so that the effect of displaying the loading assembly to a user in a richer and more three-dimensional manner is achieved.
In an alternative mode, the loading assembly is a circular or similar circular display component, the circular or similar circular display component comprises one or more components, and the loading assemblies of various modes are distinguished through the components with different numbers; the loading assembly movement speed refers to the rotational speed of a circular or circular-like display member. For example, a circular member includes two portions (dividing a circle into two), or a circular member includes four portions (dividing a circle into four portions), and so on. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the loading components of different styles can be used for reflecting the quantity of transmission data conveniently.
In an optional mode, the loading assemblies are progress bar members, and the loading assemblies of different styles are distinguished through the progress bar members with different lengths; the speed of movement of the loading assembly refers to the speed of advancement of the progress bar member. For example, progress bars with different lengths can be set so as to distinguish loading assemblies with different styles, for example, some progress bars are 5cm long, and some progress bars are 8cm long, and of course, loading assemblies with different styles can also be distinguished by setting the length-width ratio of the progress bars. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the loading components of different styles can be used for reflecting the quantity of transmission data conveniently.
In an optional mode, the loading assemblies are object members, and the loading assemblies in different styles are distinguished through different types of object members; the loading assembly movement speed refers to the advancing or filling speed of the object member. For example, object components include, but are not limited to, vehicle components, aircraft components, shopping cart components, bag components, and the like. They are not listed, but they may be indicated visually by the moving speed of the object member. For example, the vehicle member visually indicates the speed of data transmission by displaying the speed of the vehicle member, and for example, visually indicates the speed of data transmission by displaying the speed of the shopping cart member. Therefore, the loading components of various styles are distinguished, the display forms of the loading components are enriched, and the loading components of different styles can be used for reflecting the quantity of transmission data conveniently.
In a third aspect, based on the same inventive concept, an embodiment of the present specification provides a control apparatus for a loading assembly, please refer to fig. 6, including:
a trigger signal receiving unit 601, configured to receive a trigger signal of a user to load a component;
a data loading request unit 602, configured to initiate a data loading request to a server after the trigger signal receiving unit receives the trigger signal;
a data receiving speed judging unit 603 for judging a speed at which the data is currently received from the server;
a speed presetting unit 604, configured to preset a corresponding relationship between a received data speed and a movement speed of the loading component;
a motion speed determining unit 605, configured to determine, according to the preset correspondence between the data receiving speed and the loading component motion speed, a loading component motion speed corresponding to the speed at which the data is currently received;
and a display control unit 606 for controlling the display of the loading assembly at the determined loading assembly movement speed.
In an alternative mode, the loading assembly is a circular or similar circular display member, the circular or similar circular display member comprises one or more components, and the loading assemblies in various modes are distinguished through different numbers of components; the loading assembly movement speed refers to the rotation speed of a circular or similar circular display member.
In an optional mode, the loading assembly is a progress bar component, and loading groups of various styles are distinguished through different types of object components; the loading assembly movement speed refers to the advancing speed of the progress bar component.
In one optional mode, the loading assembly is an object component, and the loading assemblies of all models are distinguished through the object advancing or filling speed; the loading assembly movement speed refers to the advancing or filling speed of the object member.
In an alternative, the apparatus further includes a data quantity analysis unit 607, a quantity preset unit 608, and a component style determination unit 609;
the data amount analysis unit 607, configured to analyze the amount of the data currently received from the server;
the quantity presetting unit 608 is configured to preset a corresponding relationship between the data quantity and the loaded component style;
the component style determining unit 609 is configured to determine a loading component style corresponding to currently received data according to a corresponding relationship between the data quantity preset by the quantity presetting unit and the loading component style;
the display control unit 606 is further configured to display the loading component according to the determined loading component style.
In a fourth aspect, based on the same inventive concept, an embodiment of the present specification provides a control apparatus for a loading assembly, please refer to fig. 7, including:
a trigger signal receiving unit 701, configured to receive a trigger signal of a user to load a component;
a data loading request unit 702, configured to initiate a data loading request to a server after the trigger signal receiving unit receives the trigger signal;
a data amount analysis unit 703 for analyzing the amount of the data currently received from the server;
a quantity presetting unit 704 for presetting a corresponding relationship between the data quantity and the loaded component style;
a component style determining unit 705, configured to determine, according to a corresponding relationship between the data quantity preset by the quantity presetting unit and a loaded component style, a loaded component style corresponding to currently received data;
and the display control unit 706 is used for displaying the loading component according to the determined loading component style.
In an alternative, the apparatus further includes a data reception speed judgment unit 707, a speed preset unit 708, and a movement speed determination unit 509;
the data receiving speed judging unit 707 for judging the speed at which the data is currently received from the server
The speed presetting unit 708 is configured to preset a corresponding relationship between a data receiving speed and a loading component movement speed;
the motion speed determining unit 709 is configured to determine, according to a corresponding relationship between the preset data receiving speed and a loading component motion speed, a loading component motion speed corresponding to a current data receiving speed;
the display control unit 506 is further configured to control and display the loading assembly at the determined loading assembly movement speed
In an alternative mode, the loading assembly is a circular or similar circular display member, the circular or similar circular display member comprises one or more components, and the loading assemblies in various modes are distinguished through different numbers of components; the loading assembly movement speed refers to the rotation speed of a circular or similar circular display member.
In an optional mode, the loading assemblies are progress bar members, and the loading assemblies in different styles are distinguished through the progress bar members with different lengths; the loading assembly movement speed refers to the advancing speed of the progress bar component.
In an optional mode, the loading assembly is an object component, and the loading groups of all the patterns are distinguished through different types of object components; the loading assembly movement speed refers to the advancing or filling speed of the object member.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present specification without departing from the spirit and scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims of the present specification and their equivalents, the specification is intended to include such modifications and variations.