CN110413931A - Data load method, device, computer equipment and storage medium - Google Patents

Data load method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110413931A
CN110413931A CN201910703453.3A CN201910703453A CN110413931A CN 110413931 A CN110413931 A CN 110413931A CN 201910703453 A CN201910703453 A CN 201910703453A CN 110413931 A CN110413931 A CN 110413931A
Authority
CN
China
Prior art keywords
data
loaded
encapsulation
control
label
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
CN201910703453.3A
Other languages
Chinese (zh)
Other versions
CN110413931B (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910703453.3A priority Critical patent/CN110413931B/en
Publication of CN110413931A publication Critical patent/CN110413931A/en
Application granted granted Critical
Publication of CN110413931B publication Critical patent/CN110413931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application involves a kind of data load method, device, computer equipment and storage mediums.The described method includes: obtaining the data to be loaded of displayed page;Obtain the corresponding attribute information of data to be loaded and data label;According to the attribute information of data to be loaded and data Tag Packaging data to be loaded, encapsulation of data is obtained;The local control that creation matches with encapsulation of data;Encapsulation of data is rendered by local control, the encapsulation of data after showing rendering.Local control is created according to the data type of data to be loaded, it directlys adopt local control to parse data, rather than data is parsed using web analysis mode, avoid the data conversion between webpage to local, the process flow for reducing data, to improve data-handling efficiency.

Description

Data load method, device, computer equipment and storage medium
Technical field
This application involves field of computer technology more particularly to a kind of data load method, device, computer equipment and deposit Storage media.
Background technique
At present data are passed through net using the loading method of shell browser by the data load business on application terminal The mode of page is rendered.I.e. application terminal downloading data, parsing data procedures, web page loading process use different programming languages Speech realizes that is, after the downloading data of application terminal, invoking web page interface parses data, and specified based on mobile terminal Language format carries out rendering and shows, programming language is needed to carry out intertranslation, and the intertranslation between different programming language, can expend a large amount of Time, it is low so as to cause data-handling efficiency.By taking IOS system as an example, in order to realize data load and user's interaction needs It is interacted by js with two kinds of programming language intermodulation realizations of objective-c, this kind of mode is needed to js and two kinds of objective-c Language carry out intermodulation, when being called mutually between js programming language and objective-c programming language, need to carry out js and Intertranslation between objective-c language causes the treatment effeciency of data low.
Summary of the invention
In order to solve the above-mentioned technical problem, it this application provides a kind of data load method, device, computer equipment and deposits Storage media.
In a first aspect, this application provides a kind of data load methods, comprising:
Obtain the data to be loaded of displayed page;
Obtain the corresponding attribute information of data to be loaded and data label;
According to data to be loaded described in the attribute information of data to be loaded and data Tag Packaging, encapsulation of data is obtained;
The local control that creation matches with encapsulation of data;
Encapsulation of data is rendered by local control;
Encapsulation of data after showing rendering.
Second aspect, this application provides a kind of data loading devices, comprising:
Data acquisition module obtains the corresponding attribute letter of data to be loaded for obtaining the data to be loaded of displayed page Breath and data label;
Package module is sealed for the attribute information and data Tag Packaging data to be loaded according to data to be loaded Fill data;
Control creation module, for creating the local control to match with encapsulation of data;
Rendering module, for rendering encapsulation of data by local control;
Display module, for showing the encapsulation of data after rendering.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage Computer program, the processor perform the steps of when executing the computer program
Obtain the data to be loaded of displayed page;
Obtain the corresponding attribute information of data to be loaded and data label;
According to data to be loaded described in the attribute information of data to be loaded and data Tag Packaging, encapsulation of data is obtained;
The local control that creation matches with encapsulation of data;
Encapsulation of data is rendered by local control;
Encapsulation of data after showing rendering.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain the data to be loaded of displayed page;
Obtain the corresponding attribute information of data to be loaded and data label;
According to data to be loaded described in the attribute information of data to be loaded and data Tag Packaging, encapsulation of data is obtained;
The local control that creation matches with encapsulation of data;
Encapsulation of data is rendered by local control;
Encapsulation of data after showing rendering.
Above-mentioned data load method, device, computer equipment and storage medium, which comprises obtain displayed page Data to be loaded;Obtain the corresponding attribute information of data to be loaded and data label;According to the attribute information of data to be loaded With data Tag Packaging data to be loaded, encapsulation of data is obtained;The local control that creation matches with encapsulation of data;Pass through local Control renders encapsulation of data;Encapsulation of data after showing rendering.Local control is created according to the data type of data to be loaded, directly It connects and data is parsed using local control, rather than data are parsed using web analysis mode, avoid from webpage To the data conversion between local, the process flow of data is reduced, to improve data-handling efficiency.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the applied environment figure of data load method in one embodiment;
Fig. 2 is the flow diagram of data load method in one embodiment;
Fig. 3 is the schematic diagram of the packaging information of encapsulation of data packaged in one embodiment;
Fig. 4 is that the backstage of data in one embodiment shows schematic diagram;
Fig. 5 is that the data of mobile terminal in one embodiment show schematic diagram;
Fig. 6 is the data address detailed schematic diagram of data to be loaded in one embodiment;
Fig. 7 is the structural block diagram of data loading device in one embodiment;
Fig. 8 is the internal structure chart of mobile terminal in one embodiment.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the application, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Fig. 1 is the applied environment figure of data load method in one embodiment.Referring to Fig.1, the data load method application In data load system.The data load system includes mobile terminal 110 and server 120.Mobile terminal 110 and server 120 pass through network connection.The data load system includes mobile mobile terminal 110 and server 120.Mobile mobile terminal 110 Pass through network connection with server 120.Mobile mobile terminal 110 is obtained obtains the to be loaded of displayed page from server 120 Data;Obtain the corresponding attribute information of data to be loaded and data label;According to the attribute information of data to be loaded and data mark Sealing fills data to be loaded, obtains encapsulation of data;The local control that creation matches with encapsulation of data;It is rendered by local control Encapsulation of data shows the encapsulation of data after rendering on mobile terminal 110.Mobile mobile terminal 110 specifically can be with mobile phone, plate At least one of computer, laptop etc..Server 120 can be formed with the either multiple servers of independent server Server cluster realize.
As shown in Fig. 2, in one embodiment, providing a kind of data load method.The present embodiment is mainly in this way It is illustrated applied to the mobile terminal 110 (or server 120) in above-mentioned Fig. 1.Referring to Fig. 2, data load method tool Body includes the following steps:
Step S201 obtains the data to be loaded of displayed page.
Specifically, data to be loaded refer to number that user uploads or that server downloading for showing on mobile terminals According to.Wherein data to be loaded are the part total data of initial data, and initial data refers to including with picture and/or text Content.
In one embodiment, the matched data to be loaded of display area with mobile terminal are obtained from initial data.
Specifically, the display area of mobile terminal refers to for showing the information for passing through local control and rendering encapsulation of data, Display area includes display location, display area size and resolution ratio etc..According to the display area size of display area and divide Resolution determines the content downloaded from initial data.Wherein matching can refer to and display area size and resolution ratio complete Match, it is also possible that the display area of the area size for the display area that the data to be loaded got are occupied and mobile terminal The difference of size is preset value.Downloading data is matched according to the display area of mobile terminal, the whole data institute of downloading can be reduced The time of occupancy to save Internet resources, and improves the loading velocity of webpage.
In one embodiment, before step S201, further includes: judge whether displayed page is to load for the first time, if It loads for the first time, obtains the corresponding page parameter of displayed page, obtain initial data corresponding with page parameter as number to be loaded According to.
Specifically, page parameter includes page presentation region, page presentation progress and page resolution etc..When displaying page When whether face is the displayed page loaded for the first time, page presentation progress can be set to 0, page presentation region and mobile terminal Display area matches.Data corresponding with page parameter are obtained as data to be loaded.It is obtained from initial data and according to page Face shows the data of progress, page presentation region and resolution match as data to be loaded.It is right when loading displayed page for the first time When the corresponding page presentation region of the required displayed page of initial data on mobile terminals is greater than page presentation region, only Downloading and the matched data of current page, promote webpage loading velocity, so that user experience is more preferably.
In one embodiment, before the data to be loaded for obtaining displayed page, judge whether displayed page is for the first time Load, if not being to load for the first time, the current page obtained in displayed page shows progress, shows that progress is true according to current page The next page determined in displayed page shows progress, shows that progress obtains corresponding initial data as to be added according to next page Carry data.
Specifically, when displayed page is not to load for the first time, declaratives initial data had been loaded, for having added The data carried do not need then to carry out repeated downloads.The page shown when current page, current page show that progress refers to The displaying progress of data.Next page shows that progress can be customized.Current page is such as shown into the sum of progress and preset height Progress is shown as next page, wherein preset height is customized according to demand, using page presentation height as preset height, or Preset height is used as by 1 centimetre, 2 centimetres or 5 centimetres etc..Preset height can also be according to corresponding each in initial data Displaying height adaptive needed for data label is determining, or determining etc. according to the slide of user.
Step S202 obtains the corresponding attribute information of data to be loaded and data label of displayed page.
Specifically, data label is the label for mark data type, and the data type of data to be loaded includes image At least one of with text, attribute information is for describing memory, picture address shared by paragraph where text data, text Different attribute informations is corresponded to information, different types of data such as dimension of pictures.The data label of text type is text, figure As the data label of type is image.
In one embodiment, the display area information of mobile terminal is obtained, display area information includes showing height, root At least one target data is determined according to the displaying height of the corresponding displaying sequence of each data label, control height and mobile terminal Label, using the corresponding data of each target data label as data to be loaded.
In one embodiment, the attribute information of data to be loaded includes displaying sequence and control height, and displaying sequence is Refer to data to be loaded in the displaying sequence of initial data.Control height refers to the corresponding data of each data label in mobile terminal Required height when upper displaying.The display area information of mobile terminal includes showing height, showing width etc..According to movement Terminal is corresponding to show height, the displaying sequence of each data label and control height, is determined to screen on mobile terminals The corresponding data of data label shown in curtain, or will be in the corresponding data of data label shown in screen.It will Corresponding data of the data label shown in screen and/or will be in the corresponding data conduct of data label shown in screen Target data, using target data as data to be loaded.Data to be loaded are determined by the displaying height of screen, are reduced under data Carrying capacity saves Internet resources and accelerates data load, to promote user experience.
As when loading for the first time, obtained the control height that displaying sequence is primary data label, as the first control height Degree;When primary control height, which is greater than or equal to, shows height, using the corresponding data label of the first control height as mesh Mark data label;When primary control height, which is less than, shows height, obtaining displaying sequence is deputy data label Control height, as the second control height, calculate the second control height and the first control height height and, when height and be greater than Or when being equal to displaying height, by the corresponding data of the corresponding data label of the first control height and the corresponding number of the second control height According to the data of label, as data to be loaded.
Specifically, displaying sequence is the corresponding data of primary data label, refers to and shows at first in initial data The corresponding data of data label, obtain the control height for being located at primary data label, as the first control height, judgement Whether the first control height is greater than or equal to displaying height, shows height when the first control height is greater than or equal to, by the first control The corresponding data of part height are as target data.Conversely, the control height for being located at primary data label is then obtained, as the Whether two control height judge the height of the first control height and the second control height and are greater than to show height, when the first control It is when whether height is with the height of the second control height and greater than height is shown, the first control height and the second control height is corresponding Data label as target data label, using the corresponding data of target data label as data to be loaded.
In one embodiment, when height and be less than show height when, further includes: obtain displaying sequence be third position number According to the third control height of label, calculate third control height, the second control height and the first control height height and;Until Obtain the corresponding control height of each data label height and be greater than show height when, by first make height and be greater than The control height for showing height is high by the control before current control height and current control height as current control height Corresponding data label is spent as target data label.
Specifically, when the height of the first control height and the second control height and be less than show height when, continue acquisition exhibition Show next control height of sequence, i.e. third control, calculate the sum of each control height of acquisition, obtain height and, until Height and be greater than or equal to show height, will so that height and, more than or equal to show height data label control height, As current control height, using the corresponding data label of control height before current control height and current control height as Target data label.If showing that height is 10cm, the first control height is 12cm, by the corresponding data label of the first control height As target data label.If the first control is 5cm, the second control height is 3cm, and third control height is 5cm, then third control Part is first control height for making height be greater than 10cm with (5+3+4=12cm), therefore using third control height as current Control height.Then the control height before third control height includes the first control height and the second control height.By the first control Part height, the second control height and the corresponding data label of third control height are as target data label.
In one embodiment, eventually according to the displaying of the corresponding data of each data label sequence, control height and movement The displaying height at end determines after at least one target data label, further includes: the control for calculating each target data label is high The sum of degree, as the first height and the first height of calculating and the difference for showing height;When difference is less than or equal to preset difference value When, when difference is less than or equal to preset difference value, obtain at least one the target data label being located at after target data label Corresponding data, by least one corresponding data of target data label and target data label after target data label The data of corresponding data composition, as first object data;Using the corresponding data of target data label as data to be loaded, It include: using first object data as data to be loaded.
Specifically, the sum for calculating the corresponding each control height of target data label obtains the first height and calculates first Height and the difference for showing height, the i.e. difference of the whole height of target data label and displaying height, if difference is greater than in advance The preset difference value of setting does not have to caching follow-up data then, when difference is less than or equal to preset difference value, indicates target data label It shows range and shows height relatively, a possibility that subsequent content is demonstrated is larger, can be at this point, in downloading data It downloads, i.e. the corresponding data of data label after acquisition target data label, wherein a data can be downloaded only more The corresponding data of label can also download the corresponding data of data label of multiple initial data, specifically download how many a data The corresponding data of label can be customized, can such as download the corresponding data of data label that control height is greater than preset height, Or downloading predetermined number is according to corresponding data of label etc..By the data label after target data label and target data label First object data label is formed together.Such as show height be 10cm, the height of the corresponding control height of target data label and For 15cm, preset difference value 2cm, then it is not necessarily to update target data label.If the height of the corresponding control height of target data label Degree and be 9cm, difference (10-9=1cm) be less than preset difference value (2cm), then next data are obtained from initial data.
In one embodiment, next data can directly download after the display data for having downloaded current page, can also Being downloaded after the data to be loaded of the current page of displaying.
In a specific embodiment, schematic diagram is shown referring to the backstage that Fig. 4, Fig. 4 are a data.Wherein, in figure Including control 410, control 420, control 430, control 440, control 450 and control 460, (the first display area of display area 470 471, the second display area 472, third display area 473 and the 4th display area 474).The control in the first display area 471 410 control height, which is less than, shows height, when obtaining data to be loaded, can only obtain the corresponding number to be loaded of control 410 According to, can also simultaneously the corresponding data to be loaded of control 420.Wherein the corresponding data to be loaded of control 420, which can also be, is obtaining It is obtained after taking control 410 to show.Control 430 is between the second display area 472 and third display area 473, if currently Display area is the second display area 472, then when obtaining data to be loaded, at least to obtain control 420 and control 430 is corresponding Data to be loaded.Similarly, it if current presentation region is third display area, at least to obtain control 440 and control 450 is corresponding Data to be loaded.
By taking the first display area 471 is the current presentation region of terminal as an example.It is the data of mobile terminal referring to Fig. 5, Fig. 5 Show schematic diagram.Fig. 5 A is the displaying schematic diagram of rollout, and Fig. 5 B is the displaying schematic diagram executed after slide.For the first time When displaying, the data to be loaded of control 410 are only obtained, when detecting slide on mobile terminals, according to slide Corresponding pre-determined distance determines the display location at the terminal of control 410, with the control bottom edge position 411 of control 410 For the display location at the terminal of control 410, preset when the bottom edge 4711 of the first display area of display location distance 471 is greater than Apart from when, the acquisition of the corresponding data to be loaded of trigger control 420.After sliding certain distance, shown in the first display area 471 The content shown is as shown in Figure 5 B.Wherein the display area of corresponding display data is 412 in control 410, to be added in control 410 It carries the corresponding region 413 of data and has slid out the first display area 471.
Step S203 obtains encapsulation number according to the attribute information of data to be loaded and data Tag Packaging data to be loaded According to.
Specifically, data encapsulation refers to is packaged according to the rendering demand of data, includes number to be loaded in encapsulation of data According to itself, corresponding data label and attribute information.
In one embodiment, it according to the attribute information of data to be loaded and data Tag Packaging data to be loaded, obtains At least two encapsulation of data.
Specifically, the type of encapsulation of data, i.e. image type or text type, attribute information are determined according to data label For determining the position etc. where encapsulation of data.
In a specific embodiment, paragraph is added in each paragraph element of the encapsulation of data of each paragraph after encapsulation Position, paragraph content indicate, for picture paragraph data, picture address URL and original image dimension information etc. is added.Reference Shown in Fig. 3, Fig. 3 is the schematic diagram of the packaging information of each packaged encapsulation of data.Order is represented to be sealed in each encapsulation of data The sequence of dress, that is, the position in this section of text/picture in array after encapsulating.Type represents the data element as text or figure Piece, 1 represents text, and 2 represent picture.Object is to look at, parse the data used tool to type prompts, represent the number of segment According to being a dictionary type, the field is not had in data.Image, text and data can pay close attention to first row and third column.Image is corresponding The address of image, the size of size correspondence image.
Step S204, the local control that creation matches with encapsulation of data.
Step S205 renders encapsulation of data by local control.
Step S206, the encapsulation of data after showing rendering.
Specifically, local control is for data to be loaded to be carried out with the included control of the mobile terminal of data processing.This Ground control includes local text control and local Image control, wherein local text control is for handling text data Control, local Image control is the control for being handled image data.Local text control can calculate text class The text of the data to be loaded of type is handled, and can also be calculated according to the attribute information of the data to be loaded of text type to be added Carry the loading area information of data.Local Image control can calculate the loading area of image according to the attribute information of image type Information.Wherein loading area information includes but is not limited to loading area, loading form and loading sequence etc..
Encapsulation of data is rendered according to the corresponding loading area information of data to be loaded, rendering and by local control.Exist Corresponding loading area passes through local control according to corresponding loading form and loading sequence and renders encapsulation of data, mobile whole The encapsulation of data after rendering is shown on the displayed page at end.
In one embodiment, when data to be loaded are text data, encapsulation of data, packet are rendered by local control It includes: whether comprising preset characters in detection text data, when in text data including preset characters, obtaining and preset characters pair The modification strategy answered modifies to text data according to modification strategy, obtains modified data to be loaded, after showing modification Data to be loaded.
Specifically, preset characters are preconfigured character, and the character of configuration can be customized according to business demand.It is different The character of type corresponds to different modification strategies, and modification strategy, which refers to, modifies to preset characters, is also possible to predetermined word The data processing method that data between symbol are modified.Preset characters include but is not limited to html label, twin-well number, asterisk, Specific character, optional network specific digit etc..According to the corresponding modification strategy of preconfigured each and/or each group preset characters to correspondence Text handled.Wherein modification strategy includes but is not limited to delete, label, increase link, increase particular image and replacement Data etc..
In one embodiment, including deleting and marking, preset characters include default deletion character and preset modification strategy Tab character modifies to text data according to modification strategy, obtains modified data to be loaded, comprising: when modification plan When slightly deleting, deleted from text data according to the default content to be deleted deleting character and determining, the text after being deleted Data obtain content to be marked corresponding with preset mark character and mark information, according to label when modification strategy is marks Label content is marked in information, the text data after being marked.
Specifically, presetting and deleting character is preconfigured for deleting the character of text, and preset mark character is preparatory The character for text to be marked being arranged.It such as deletes character and tab character can be customized.The word that can such as delete Symbol includes the self-defining characters such as html label, expression packet and asterisk.Preset mark character can be expression packet, twin-well number and asterisk Etc..Identical character can also determine corresponding modification strategy according to the position where character.Mark information is suitable for asking The information oneself being marked, wherein mark information can be colouring information, sytlized font, special font size etc..
In a specific embodiment, the filter operation of html label is carried out to text data, passes through regular expression " < [^ >] * > | ", remove corresponding html character in text.The content for including to twin-well number in text data is marked, such as will be double The content-label that pound sign includes is green.
In one embodiment, step S205, further includes: the current operation in the display area of data to be loaded is detected, Judge whether current operation matches with predetermined registration operation, when current operation is matched with predetermined registration operation, obtain with currently grasp it is matched The corresponding exhibition strategy of predetermined registration operation passes through local control according to exhibition strategy and renders encapsulation of data.
Wherein, the corresponding relationship of predetermined registration operation and display data is that local control is preconfigured.Passing through local control Before rendering encapsulation of data, it can configure various controls according to business demand and correspond to interactive operation, is i.e. configuration predetermined registration operation.It is opening up Registration operates display data after, detects current operation, and current operation is the behaviour being carrying out in display area Make.Predetermined registration operation is the common operation that user can execute interface, including but not limited to double-click, long-pressing and click etc..No The display data of same type can correspond to identical exhibition strategy using different operations, can also correspond to different displaying plans Slightly.Exhibition strategy executes the measurement of operation for display data, exhibition strategy include amplification to display data, diminution, shearing, Duplication etc..
In a specific embodiment, gesture and concrete operations processing are bound for text data and picture.To every section of text This binding long-pressing gesture, long-pressing text provide duplication pop-up for user, click duplication, the text in reproducible this section of text of user Word.For there is the text data of link, for its binding point hitter's gesture, user clicks on links text, the page will jump to chain Connect the details page linked where text.To every picture in long picture and text, picture is clicked to its binding point hitter's gesture, such as user It can jump to and check big diagram page.
In a specific embodiment, the data load time of the page is tested.Experiment includes traditional needs The data load method of language translation and the data load method of this case.
Wherein, experiment condition are as follows: 6Plus -11.5 IPhone, data: in feedID:102578100548, the feed It is opened comprising 28 sections of text, picture 21.Feed data address is shown in Fig. 6, and experimental result is as shown in table 1:
The load time of table 1 traditional data load method and this case data load method
Multiple data loading experiment has been carried out to data to be loaded, has chosen 10 groups of data therein as representing, from table Can significantly find out the load duration of shortest time length ratio this case record method in the load duration of traditional loading method It is 2 times more, therefore experimental data can be very good to prove that data loading speed can be improved using the data load method of this case, into And promote user experience.
Above-mentioned data load method, comprising: obtain the data to be loaded of displayed page;Obtain the corresponding category of data to be loaded Property information and data label;According to the attribute information of data to be loaded and data Tag Packaging data to be loaded, encapsulation number is obtained According to;The local control that creation matches with encapsulation of data;Encapsulation of data is rendered by local control, the encapsulation number after showing rendering According to.Wherein, page rendering and user's alternative events are directly passed through same programming language and realized by local control.With IOS system For, it is handed over to realize that data load and user's interaction need to realize by two kinds of programming language intermodulation of js and objective-c Mutually, this kind of mode needs to carry out js and objective-c bilingual intermodulation, and js programming language and objective-c are programmed When being called mutually between language, needs to carry out the intertranslation between js and objective-c language, cause the treatment effeciency of data low Under, and this case only passes through the step of realization of objective-c language reduces language translation, to accelerate page load speed Degree, and enrich user mutual behavior.Because text and picture are to carry out wash with watercolours using objective-c language, by local control Dye, therefore the gesture that objective-c is supported can be added to the long picture and text page, and without language translating operations, so that tying up It is simpler to determine event.
Fig. 2 is the flow diagram of data load method in one embodiment.Although should be understood that the process of Fig. 2 Each step in figure is successively shown according to the instruction of arrow, but these steps are not the inevitable sequence indicated according to arrow Successively execute.Unless expressly stating otherwise herein, there is no stringent sequences to limit for the execution of these steps, these steps can To execute in other order.Moreover, at least part step in Fig. 2 may include multiple sub-steps or multiple stages, These sub-steps or stage are not necessarily to execute completion in synchronization, but can execute at different times, these Sub-step perhaps the stage execution sequence be also not necessarily successively carry out but can be with the son of other steps or other steps Step or at least part in stage execute in turn or alternately.
In one embodiment, as shown in fig. 7, providing a kind of data loading device 200, comprising:
Data acquisition module 201 obtains the corresponding attribute of data to be loaded for obtaining the data to be loaded of displayed page Information and data label.
Package module 202 is obtained for the attribute information and data Tag Packaging data to be loaded according to data to be loaded Encapsulation of data.
Control creation module 203, for creating the local control to match with encapsulation of data.
Rendering module 204, for rendering encapsulation of data by local control.
Display module 205, for showing the encapsulation of data after rendering.
In one embodiment, data acquisition module 201 is also used to obtain the displaying with mobile terminal from initial data The data to be loaded of Region Matching.
In one embodiment, above-mentioned data loading device 200, further includes:
Judgment module is loaded, for judging whether displayed page is to load for the first time.
Parameter acquisition module, for obtaining the corresponding page parameter of displayed page if loading for the first time;
Data acquisition module 201 is also used to obtain initial data corresponding with page parameter as data to be loaded.
In one embodiment, above-mentioned data loading device 200, further includes:
Judgment module is loaded, for judging whether displayed page is to load for the first time.
Current schedules obtain module, for if not be to load for the first time, obtain the current page in displayed page show into Degree.
Next progress computing module, for showing that progress determines that the next page in displayed page is shown according to current page Progress.
Data acquisition module 201 is also used to show that progress obtains corresponding initial data as to be loaded according to next page Data.
In one embodiment, package module 202 is specifically used for attribute information and data label according to data to be loaded The data to be loaded are encapsulated, at least two encapsulation of data are obtained.
In one embodiment, control creation module 203, comprising:
Recognition unit, for the data label in encapsulation of data described in tag recognition.
Text control creating unit, for when recognizing the data label is text label, creating local text control Part.
Image control creating unit, for when recognizing the data label is image tag, creating local image control Part.
In one embodiment, above-mentioned data loading device 200, further includes:
Character machining module, for whether detecting in text data comprising preset characters.
Modification strategy obtains module, for obtaining corresponding with preset characters when in text data including preset characters Modification strategy.
Data update module obtains modified number to be loaded for modifying according to modification strategy to text data According to.
Fig. 8 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be Fig. 1 In mobile terminal 110 (or server 120).As shown in figure 8, it includes passing through to be that the computer equipment, which includes the computer equipment, Processor, memory, network interface, input unit and the display screen of bus of uniting connection.Wherein, memory includes non-volatile deposits Storage media and built-in storage.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with calculating Machine program when the computer program is executed by processor, may make processor to realize data load method.In the built-in storage Computer program can be stored, when which is executed by processor, processor may make to execute data load method.Meter The display screen for calculating machine equipment can be liquid crystal display or electric ink display screen, and the input unit of computer equipment can be The touch layer covered on display screen is also possible to the key being arranged on computer equipment shell, trace ball or Trackpad, can be with It is external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 8, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, data loading device provided by the present application can be implemented as a kind of shape of computer program Formula, computer program can be run in computer equipment as shown in Figure 8.Composition can be stored in the memory of computer equipment should Each program module of data loading device, for example, data acquisition module shown in Fig. 7 201, package module 202, control create Module 203, rendering module 204 and display module 205.The computer program that each program module is constituted makes processor execute sheet Step in the data load method of each embodiment of the application described in specification.
For example, computer equipment shown in Fig. 8 can pass through the data acquisition mould in data loading device as shown in Figure 7 Block 201 executes the data to be loaded for obtaining displayed page, obtains the corresponding attribute information of data to be loaded and data label.It calculates Machine equipment can execute the attribute information and data Tag Packaging number to be loaded according to data to be loaded by package module 202 According to obtaining encapsulation of data.Computer equipment can execute the sheet that creation matches with encapsulation of data by control creation module 203 Ground control.Computer equipment can be executed by rendering module 204 and render encapsulation of data by local control.Computer equipment can To execute the encapsulation of data after showing rendering by display module 205.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of acquisition and show page when executing computer program The data to be loaded in face;Obtain the corresponding attribute information of data to be loaded and data label;Believed according to the attribute of data to be loaded Breath and data Tag Packaging data to be loaded, obtain encapsulation of data;The local control that creation matches with encapsulation of data;Pass through this Ground control renders encapsulation of data, the encapsulation of data after showing rendering.
In one embodiment, data to be loaded are obtained, comprising: the show area with mobile terminal is obtained from initial data The matched data to be loaded in domain.
In one embodiment, also perform the steps of whether judge displayed page when processor executes computer program To load for the first time;If loading for the first time, the corresponding page parameter of displayed page is obtained;Obtain original number corresponding with page parameter According to as data to be loaded.
In one embodiment, also perform the steps of whether judge displayed page when processor executes computer program To load for the first time, if not being to load for the first time, the current page obtained in displayed page shows progress;It is shown according to current page Progress determines that the next page in displayed page shows progress;Show that progress obtains corresponding initial data and makees according to next page For data to be loaded.
In one embodiment, it according to the attribute information of data to be loaded and data Tag Packaging data to be loaded, obtains Encapsulation of data, comprising: according to the attribute information of data to be loaded and data Tag Packaging data to be loaded, obtain at least two envelopes Fill data.
In one embodiment, the local control to match with encapsulation of data is created, comprising: the number in identification encapsulation of data According to label;When recognizing data label is text label, local text control is created;It is image mark when recognizing data label When label, local Image control is created.
In one embodiment, when data to be loaded are text data, before rendering encapsulation of data by local control, Whether processor is also performed the steps of in detection text data when executing computer program comprising preset characters;Work as textual data When including preset characters in, modification strategy corresponding with preset characters is obtained;Text data is repaired according to modification strategy Change, obtains modified data to be loaded.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of the data to be loaded for obtaining displayed page when being executed by processor;It is corresponding to obtain data to be loaded Attribute information and data label;According to the attribute information of data to be loaded and data Tag Packaging data to be loaded, sealed Fill data;The local control that creation matches with encapsulation of data;Encapsulation of data is rendered by local control, the wash with watercolours after showing encapsulation Contaminate data.
In one embodiment, data to be loaded are obtained, comprising: the show area with mobile terminal is obtained from initial data The matched data to be loaded in domain.
In one embodiment, before the data to be loaded for obtaining displayed page, computer program is executed by processor When also perform the steps of and judge whether displayed page is to load for the first time;If loading for the first time, the corresponding page of displayed page is obtained Face parameter;Initial data corresponding with page parameter is obtained as data to be loaded.
In one embodiment, before the data to be loaded for obtaining displayed page, computer program is executed by processor When also perform the steps of and judge whether displayed page is to load for the first time;If not being to load for the first time, obtain in displayed page Current page shows progress;Show that progress determines that the next page in displayed page shows progress according to current page;Under One page presentation progress obtains corresponding initial data as data to be loaded.
In one embodiment, it according to the attribute information of data to be loaded and data Tag Packaging data to be loaded, obtains Encapsulation of data, comprising: according to the attribute information of data to be loaded and data Tag Packaging data to be loaded, obtain at least two envelopes Fill data.
In one embodiment, the local control to match with encapsulation of data is created, comprising: the number in identification encapsulation of data According to label;When recognizing data label is text label, local text control is created;It is image mark when recognizing data label When label, local Image control is created.
In one embodiment, when data to be loaded are text data, before rendering encapsulation of data by local control, It whether is also performed the steps of when computer program is executed by processor in detection text data comprising preset characters;Work as text When in data including preset characters, modification strategy corresponding with preset characters is obtained;Text data is carried out according to modification strategy Modification, obtains modified data to be loaded.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the relational terms of such as " first " and " second " or the like are used merely to one A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in the process, method, article or apparatus that includes the element.
The above is only a specific embodiment of the invention, is made skilled artisans appreciate that or realizing this hair It is bright.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and applied principle and features of novelty phase one herein The widest scope of cause.

Claims (10)

1. a kind of data load method, which is characterized in that the method is applied to mobile terminal, which comprises
Obtain the data to be loaded of displayed page;
Obtain the corresponding attribute information of the data to be loaded and data label;
According to data to be loaded described in the attribute information of the data to be loaded and data Tag Packaging, encapsulation of data is obtained;
The local control that creation matches with the encapsulation of data;
The encapsulation of data is rendered by the local control;
The encapsulation of data after showing rendering.
2. the method according to claim 1, wherein described obtain data to be loaded, comprising:
The matched data to be loaded of display area with the mobile terminal are obtained from initial data.
3. according to the method described in claim 2, it is characterized in that, it is described obtain displayed page data to be loaded before, The method also includes:
Judge whether the displayed page is to load for the first time;
If loading for the first time, the corresponding page parameter of the displayed page is obtained;
Initial data corresponding with the page parameter is obtained as data to be loaded.
4. according to the method described in claim 3, it is characterized in that, it is described obtain displayed page data to be loaded before, The method also includes:
Judge whether the displayed page is to load for the first time;
If not loading for the first time, the current page obtained in the displayed page shows progress;
Show that progress determines that the next page in the displayed page shows progress according to the current page;
Show that progress obtains corresponding initial data as data to be loaded according to the next page.
5. the method stated according to claim 1, which is characterized in that the attribute information and data according to the data to be loaded Data to be loaded, obtain encapsulation of data described in Tag Packaging, comprising: are sealed according to the attribute information of data to be loaded and data label The data to be loaded are filled, at least two encapsulation of data are obtained.
6. method according to claim 1 or 5, which is characterized in that the sheet that the creation matches with the encapsulation of data Ground control, comprising:
Identify the data label in the encapsulation of data;
When recognizing the data label is text label, local text control is created;
When recognizing the data label is image tag, local Image control is created.
7. described logical the method according to claim 1, wherein when the data to be loaded are text data It crosses before the data to be loaded that the local control renders in the encapsulation of data, further includes:
It whether detects in the text data comprising preset characters;
When in the text data including the preset characters, modification strategy corresponding with the preset characters is obtained;
It is modified according to the modification strategy to the text data, obtains modified data to be loaded.
8. a kind of data loading device, which is characterized in that described device includes:
Data acquisition module obtains the corresponding attribute letter of the data to be loaded for obtaining the data to be loaded of displayed page Breath and data label;
Package module is obtained for the data to be loaded according to the attribute information of the data to be loaded and data Tag Packaging To encapsulation of data;
Control creation module, for creating the local control to match with the encapsulation of data;
Rendering module, for rendering the encapsulation of data by the local control;
Display module, for showing the encapsulation of data after rendering.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any one of claims 1 to 7 institute when executing the computer program The step of stating method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201910703453.3A 2019-07-31 2019-07-31 Data loading method and device, computer equipment and storage medium Active CN110413931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910703453.3A CN110413931B (en) 2019-07-31 2019-07-31 Data loading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910703453.3A CN110413931B (en) 2019-07-31 2019-07-31 Data loading method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110413931A true CN110413931A (en) 2019-11-05
CN110413931B CN110413931B (en) 2022-07-12

Family

ID=68364920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910703453.3A Active CN110413931B (en) 2019-07-31 2019-07-31 Data loading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110413931B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051012A (en) * 2021-03-18 2021-06-29 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view
CN113867869A (en) * 2021-09-29 2021-12-31 上海哔哩哔哩科技有限公司 Interactive data display method and device
CN116302193A (en) * 2023-03-16 2023-06-23 北京易思汇商务服务有限公司 Method, device, equipment and storage medium for improving front-end table loading speed

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100332565A1 (en) * 2009-06-26 2010-12-30 Packetvideo Corp. System and method for managing and/or rendering internet multimedia content in a network
CN104462571A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Webpage loading method and device and browser client-side
CN104899212A (en) * 2014-03-05 2015-09-09 腾讯科技(深圳)有限公司 Webpage display method, server and system
CN107169007A (en) * 2017-03-31 2017-09-15 北京奇艺世纪科技有限公司 The display interface method to set up and device of a kind of mobile terminal
CN107274469A (en) * 2017-06-06 2017-10-20 清华大学 The coordinative render method of Virtual reality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100332565A1 (en) * 2009-06-26 2010-12-30 Packetvideo Corp. System and method for managing and/or rendering internet multimedia content in a network
CN104899212A (en) * 2014-03-05 2015-09-09 腾讯科技(深圳)有限公司 Webpage display method, server and system
CN104462571A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Webpage loading method and device and browser client-side
CN107169007A (en) * 2017-03-31 2017-09-15 北京奇艺世纪科技有限公司 The display interface method to set up and device of a kind of mobile terminal
CN107274469A (en) * 2017-06-06 2017-10-20 清华大学 The coordinative render method of Virtual reality

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANDROID_IS: "Android图片加载神器之Fresco,基于各种场景的讲解", 《CSDN》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051012A (en) * 2021-03-18 2021-06-29 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view
CN113051012B (en) * 2021-03-18 2022-12-02 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view
CN113867869A (en) * 2021-09-29 2021-12-31 上海哔哩哔哩科技有限公司 Interactive data display method and device
CN116302193A (en) * 2023-03-16 2023-06-23 北京易思汇商务服务有限公司 Method, device, equipment and storage medium for improving front-end table loading speed
CN116302193B (en) * 2023-03-16 2024-02-13 北京易思汇商务服务有限公司 Method, device, equipment and storage medium for improving front-end table loading speed

Also Published As

Publication number Publication date
CN110413931B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN103890727B (en) Web in Web browser using and the simulation of auxiliary equipment, Web application development tools and use their method
CN103814371B (en) Web in Web browser using and the simulation of auxiliary equipment, Web application development tools and use their method
CN110413931A (en) Data load method, device, computer equipment and storage medium
CN102902661B (en) Method for realizing hyperlinks of electronic books
CN111897817A (en) Visual form configuration method, device and system
CN109254773A (en) Skeleton page generation method, device, equipment and storage medium
Da Rocha Learn Chart. js: Create interactive visualizations for the web with chart. js 2
CN107908426A (en) Design method, device, mobile terminal and the storage medium of cross-platform program
CN106372040A (en) Difference comparison system of intelligent substation configuration file
CN108595697B (en) Webpage integration method, device and system
CN108459888A (en) multi-page switching method, device, terminal device and storage medium
CN107977205A (en) Gui interface automatically creates method and system
CN110780868A (en) Website development method, device, equipment and storage medium based on componentized template
CN114816404A (en) Method and device for dynamically rendering view page, computer equipment and storage medium
US20170212735A1 (en) Replicating a web technology
CN109933751A (en) Graphic rendering method, apparatus, computer readable storage medium and computer equipment
US9619445B1 (en) Conversion of content to formats suitable for digital distributions thereof
CN110309457A (en) Web data processing method, device, computer equipment and storage medium
CN111222069A (en) Report component adjusting method and device and related equipment
CN109857662B (en) Use case data processing method and device, computer equipment and storage medium
CN115577683B (en) HTML rich text content conversion method, device, equipment and medium
CN109002292B (en) Method and system for realizing pop-up frame based on webpage pop-up layer
CN111914524A (en) Method and device for automatically generating table data
CN103246662B (en) The treating method and apparatus of area data content in Webpage
CN114565915B (en) Sample text image acquisition method, text recognition model training method and device

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