CN103823886A - Method and device for processing fields of webpage - Google Patents

Method and device for processing fields of webpage Download PDF

Info

Publication number
CN103823886A
CN103823886A CN201410083437.6A CN201410083437A CN103823886A CN 103823886 A CN103823886 A CN 103823886A CN 201410083437 A CN201410083437 A CN 201410083437A CN 103823886 A CN103823886 A CN 103823886A
Authority
CN
China
Prior art keywords
field
mark
recorded
fields
webpage
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
CN201410083437.6A
Other languages
Chinese (zh)
Other versions
CN103823886B (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 Jingdong three hundred and sixty degree e-commerce Co., Ltd.
Original Assignee
Beijing Jingdong Shangke Information 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 Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Shangke Information Technology Co Ltd
Priority to CN201410083437.6A priority Critical patent/CN103823886B/en
Publication of CN103823886A publication Critical patent/CN103823886A/en
Application granted granted Critical
Publication of CN103823886B publication Critical patent/CN103823886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/986Document structures and storage, e.g. HTML extensions

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 Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for processing fields of a webpage, which is beneficial to improving the processing speed under the condition of needing to increase the fields of the page. The method for processing the fields of the webpage comprises the following steps of recording the available mode of each field in multiple fields by using multiple ordered elements, wherein the elements correspond to the fields one by one; when a field is increased, traversing all the elements in sequence, and stopping traversing when the element with the field recorded to be available is traversed, adding the mark of the element to the mark of the added field, and changing the record of the element to be an unavailable field; when a field is deleted, the multiple elements are traversed in sequence, changing the record of an element is changed to be an available field when the specified element is traversed, wherein the mark of the deleted field comprises the mark of the specified element.

Description

A kind of method and apparatus of the field of processing webpage
Technical field
The present invention relates to field of computer technology, relate to especially a kind of method and apparatus of the field of processing webpage.
Background technology
In page development, often we can run into all very complicated business demands, as: need dynamically to increase and delete field, and finally can verification and obtain the value of corresponding field, we also need to guarantee that user can not increase at most how many fields and show to be that dynamic field has the individual value of reaching the standard grade at the page simultaneously.The field here mainly comprises dynamic page elements, such as button, input frame, form, row, column etc.
JavaScript technology is JavaScript front end script development language, is the common technology in page development, and the service logic control exploitation, the front end page dynamic effect that are mainly used in front end are shown exploitation, the realization of front end special efficacy etc.While adopting JavaScript realize the increase of the page and delete field, first with a zone bit information flag of JavaScript statement; And state that one allows the maximum field of user's increase to count MAX_TOTAL_NUM; An and field buffer memory variable totalNum that current page has had of statement.Identifying code is as follows:
The zone bit of field id: flag is distinguished in one, // statement
var?flag=0;
The field that the maximum user of permission of // statement increases is counted constant: MAX_TOTAL_NUM
var?MAX_TOTAL_NUM=20;
The current field number variable having had of // statement buffer memory: totalNum
var?totalNum=0;
In the time that needs dynamically increase page field, first judge whether the quantity that the page has had is greater than maximum quantity.If be greater than maximum quantity, point out user not increase again, otherwise increase field to the page, id is flag+1, after completing, zone bit flag is from adding one simultaneously.Identifying code is as follows:
Figure BDA0000474295040000021
In the time that needs are deleted field, flag information is not processed.While getting the value of field, from 0 to flag mark, carry out cycle criterion, if there is corresponding field, obtain corresponding numerical value.Identifying code is as follows:
Figure BDA0000474295040000022
Figure BDA0000474295040000031
Can find out from above processing mode, flag information flag is not processed owing to need to deleting field when, therefore flag will constantly increase until maximal value.And in the time increasing field, calculate the field sum that current page has had, and the number of times of program loop is flag value, and therefore cycle index is more, and treatment effeciency is lower.
Summary of the invention
In view of this, the invention provides a kind of method and apparatus of the field of processing webpage, contribute to improve treatment effeciency in the situation that needs increase page field.
For achieving the above object, according to an aspect of the present invention, provide a kind of method of the field of processing webpage.
The method of the field of processing webpage of the present invention comprises: use orderly multiple elements to record the upstate of each field in multiple fields, wherein element is corresponding one by one with field; Increasing when field, travel through in order described multiple element, traverse be recorded as field can with element time stop traversal and add the mark of this element in the mark of the field increasing, and revise this element to be recorded as field unavailable; Deleting when field, travel through in order described multiple element, while traversing designed element, revise being recorded as field and can using of this element, the mark of deleted field comprises the mark of described designed element.
Alternatively, described orderly multiple elements are the elements in same array.
Alternatively, also comprise: when to field value, travel through in order described multiple element, traverse while being recorded as the disabled element of field, export the mark of the field that this element is corresponding, this mark comprises default character string and the mark of this element.
A kind of device of the field of processing webpage is provided according to a further aspect in the invention,
The device of the field of processing webpage of the present invention comprises: logging modle, and for using orderly multiple elements to record the upstate of multiple each fields of field, wherein element is corresponding one by one with field; Increase field module, for travel through in order described multiple element, traverse be recorded as field can with element time stop traversal and add the mark of this element in the mark of the field increasing, and revise this element to be recorded as field unavailable; Delete field module, for traveling through in order described multiple element, revise being recorded as field and can using of this element while traversing designed element, the mark of deleted field comprises the mark of described designed element.
Alternatively, described logging modle is also for being used array to record the upstate of multiple each fields of field.
Alternatively, also comprise value module, for traveling through in order described multiple element, traverse while being recorded as the disabled element of field, export the mark of the field that this element is corresponding, this mark comprises default character string and the mark of this element.
According to technical scheme of the present invention, use orderly multiple elements to record the upstate of field, in the time increasing field, travel through the plurality of element, run into available field and stop immediately traversal, avoid circulating and judging by the maximum number of field, improved treatment effeciency, thereby improved the reaction velocity of the page, and no matter how user operates additions and deletions field and can not affect execution efficiency, increase safety and the stability of program.
Accompanying drawing explanation
Accompanying drawing, for understanding the present invention better, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is according to the increase of the embodiment of the present invention and deletes the schematic diagram of the flow process of field;
Fig. 2 is according to the schematic diagram of the original state of the array that records field upstate of the embodiment of the present invention;
Fig. 3 is according to the schematic diagram of the array of the embodiment of the present invention state;
Fig. 4 is according to the schematic diagram of the flow process of the field value to webpage of the embodiment of the present invention;
Fig. 5 is according to the schematic diagram of the basic structure of the device of the field of the processing webpage of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, one exemplary embodiment of the present invention is explained, to help understanding, they should be thought to be only exemplary comprising the various details of the embodiment of the present invention.Therefore, those of ordinary skills will be appreciated that, can make various changes and modification to the embodiments described herein, and can not deviate from scope and spirit of the present invention.Equally, for clarity and conciseness, in following description, omitted the description to known function and structure.
Fig. 1 is according to the increase of the embodiment of the present invention and deletes the schematic diagram of the flow process of field.As shown in Figure 1, in the time processing the increase of field or delete, carry out as follows:
Step S10: use orderly multiple elements to record the upstate of each field in multiple fields, wherein element is corresponding one by one with field.Can adopt common array to carry out record, the element in array is corresponding one by one with field.To adopt array to be described as example, the default value of array element is 1 below, represents that the field that this element is corresponding can use.With reference to figure 2, Fig. 2 is according to the schematic diagram of the original state of the array that records field upstate of the embodiment of the present invention.Wherein array FLAG_ARR comprises N element, and under original state, the value of each element is 1, and expression field can be used, and can increase field newly, otherwise represents existing field, and field is unavailable, can not increase field newly.The in the situation that of newly-increased field, enter step S11, in the situation that deleting field, enter step S12.
Step S11: by order of elements, array is traveled through, judge whether array element value is 1.If so, enter step S13, otherwise enter step S15.Referring to figs. 2 and 3, Fig. 3 is according to the schematic diagram of the array of the embodiment of the present invention state.As shown in Figure 2, the array under original state is traveled through, while traversing first element, find that its value is 1, stop traversal, enter step S13.Under general state, be the page treated the business demand of a period of time, there is variation in each element of array, example is state as shown in Figure 3, now newly field will be increased time, start traversal from first element equally, while traversing the 6th element, find that its value is 1, stop traversal, enter step S13.
Step S13: element value is revised as to 0 by 1, and increases field, and give dynamic marks to field.Element value is that the field of 0 expression correspondence is unavailable.The mark of field can be dynamic, adopts the random character string generating, the mark of the mark containing element of field in addition, because be array, the mark of element is the subscript of array (i.e. position in array).Can learn from the mark of field the array element that it is corresponding like this.
Step S15: judge whether to travel through complete, if so, enter step S17, otherwise wait for the situation of newly-increased field next time.
Step S17: output information.Information is used for pointing out the current maximum field number that arrived, and can not add field again.
Step S12: the mark according to deleted field finds array element, is revised as 1 by this array element value.As previously mentioned, the mark of field comprises array index, so can find array element according to the mark of field.Take Fig. 3 as example, the field that delete, corresponding to the 3rd element, is revised as 1 by the value of the 3rd element by 0 in figure.
Fig. 4 is according to the schematic diagram of the flow process of the field value to webpage of the embodiment of the present invention.Press the flow process shown in Fig. 4, travel through in order array, when element that the value of traversing is 0, represent its corresponding field existing, field is unavailable, now exports the mark of the corresponding field of this element, can generate a character string, thereby add the mark of the subscript formation field of this element.Traversal to maximum lower target array element circulates complete afterwards.
Fig. 5 is according to the schematic diagram of the basic structure of the device of the field of the processing webpage of the embodiment of the present invention.As shown in Figure 5, the device 50 of the field of processing webpage mainly comprises logging modle 51, increases field module 52 and deletes field module 53.
Logging modle 51 is for being used orderly multiple elements to record the upstate of multiple each fields of field, and wherein element is corresponding one by one with field; Increase field module 52 for travel through in order multiple elements, traverse be recorded as field can with element time stop traversal and add the mark of this element in the mark of the field increasing, and revise this element to be recorded as field unavailable; Delete field module 53 for traveling through in order multiple elements, revise being recorded as field and can using of this element while traversing designed element, the mark of deleted field comprises the mark of designed element.Logging modle 51 also can be used for using array to record the upstate of each field in multiple fields.
The device 50 of processing the field of webpage also can comprise value module, for traveling through in order above-mentioned multiple element, traverse while being recorded as the disabled element of field, export the mark of the field that this element is corresponding, this mark comprises default character string and the mark of this element.
According to the technical scheme of the embodiment of the present invention, use orderly multiple elements to record the upstate of field, in the time increasing field, travel through the plurality of element, run into available field and stop immediately traversal, avoid circulating and judging by the maximum number of field, improved treatment effeciency, thereby improved the reaction velocity of the page, and no matter how user operates additions and deletions field and can not affect execution efficiency, increase safety and the stability of program.
Ultimate principle of the present invention has below been described in conjunction with specific embodiments, but, it is to be noted, for those of ordinary skill in the art, can understand whole or any steps or the parts of method and apparatus of the present invention, can be in the network of any calculation element (comprising processor, storage medium etc.) or calculation element, realized with hardware, firmware, software or their combination, this is that those of ordinary skills use their basic programming skill just can realize in the situation that having read explanation of the present invention.
Therefore, object of the present invention can also realize by move a program or batch processing on any calculation element.Described calculation element can be known fexible unit.Therefore, object of the present invention also can be only by providing the program product that comprises the program code of realizing described method or device to realize.That is to say, such program product also forms the present invention, and the storage medium that stores such program product also forms the present invention.Obviously, described storage medium can be any storage medium of developing in any known storage medium or future.
Also it is pointed out that in apparatus and method of the present invention, obviously, each parts or each step can decompose and/or reconfigure.These decomposition and/or reconfigure and should be considered as equivalents of the present invention.And, carry out the step of above-mentioned series of processes and can order naturally following the instructions carry out in chronological order, but do not need necessarily to carry out according to time sequencing.Some step can walk abreast or carry out independently of one another.
Above-mentioned embodiment, does not form limiting the scope of the invention.Those skilled in the art should be understood that, depend on designing requirement and other factors, various modifications, combination, sub-portfolio can occur and substitute.Any modification of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection domain of the present invention.

Claims (6)

1. a method of processing the field of webpage, is characterized in that, comprising:
Use orderly multiple elements to record the upstate of each field in multiple fields, wherein element is corresponding one by one with field;
Increasing when field, travel through in order described multiple element, traverse be recorded as field can with element time stop traversal and add the mark of this element in the mark of the field increasing, and revise this element to be recorded as field unavailable;
Deleting when field, travel through in order described multiple element, while traversing designed element, revise being recorded as field and can using of this element, the mark of deleted field comprises the mark of described designed element.
2. method according to claim 1, is characterized in that, described orderly multiple elements are the elements in same array.
3. method according to claim 1, is characterized in that, also comprises:
When to field value, travel through in order described multiple element, traverse while being recorded as the disabled element of field, export the mark of the field that this element is corresponding, this mark comprises default character string and the mark of this element.
4. a device of processing the field of webpage, is characterized in that, comprising:
Logging modle, for using orderly multiple elements to record the upstate of multiple each fields of field, wherein element is corresponding one by one with field;
Increase field module, for travel through in order described multiple element, traverse be recorded as field can with element time stop traversal and add the mark of this element in the mark of the field increasing, and revise this element to be recorded as field unavailable;
Delete field module, for traveling through in order described multiple element, revise being recorded as field and can using of this element while traversing designed element, the mark of deleted field comprises the mark of described designed element.
5. device according to claim 4, is characterized in that, described logging modle is also for being used array to record the upstate of multiple each fields of field.
6. device according to claim 4, is characterized in that, also comprises value module, for traveling through in order described multiple element, traverse while being recorded as the disabled element of field, export the mark of the field that this element is corresponding, this mark comprises default character string and the mark of this element.
CN201410083437.6A 2014-03-07 2014-03-07 A kind of method and apparatus of the field for processing webpage Active CN103823886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410083437.6A CN103823886B (en) 2014-03-07 2014-03-07 A kind of method and apparatus of the field for processing webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410083437.6A CN103823886B (en) 2014-03-07 2014-03-07 A kind of method and apparatus of the field for processing webpage

Publications (2)

Publication Number Publication Date
CN103823886A true CN103823886A (en) 2014-05-28
CN103823886B CN103823886B (en) 2017-07-07

Family

ID=50758950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410083437.6A Active CN103823886B (en) 2014-03-07 2014-03-07 A kind of method and apparatus of the field for processing webpage

Country Status (1)

Country Link
CN (1) CN103823886B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1373437A (en) * 2001-02-28 2002-10-09 杨承喜 Site management system for network trade
US20030020746A1 (en) * 2001-01-31 2003-01-30 Computer Associates Think, Inc. System and method for dynamically generating a web page
CN1395201A (en) * 2001-07-06 2003-02-05 博客来数位科技股份有限公司 Immediate display management system for on-line comodity stocks and its method
CN1642161A (en) * 2004-01-08 2005-07-20 上海环达计算机科技有限公司 System and method for correcting selection of database column site through network page
CN101119560A (en) * 2007-09-21 2008-02-06 中兴通讯股份有限公司 Terminal condition express method and display method
CN101196885A (en) * 2006-12-06 2008-06-11 鸿富锦精密工业(深圳)有限公司 Web page data auto-filling system and method
CN101470748A (en) * 2007-12-29 2009-07-01 一零四资讯科技股份有限公司 Job hunting website structure applying whole page editing frame and its application method
CN101808134A (en) * 2010-03-16 2010-08-18 青岛海信移动通信技术股份有限公司 Control method and terminal for displaying dynamic content distribution business data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030020746A1 (en) * 2001-01-31 2003-01-30 Computer Associates Think, Inc. System and method for dynamically generating a web page
CN1373437A (en) * 2001-02-28 2002-10-09 杨承喜 Site management system for network trade
CN1395201A (en) * 2001-07-06 2003-02-05 博客来数位科技股份有限公司 Immediate display management system for on-line comodity stocks and its method
CN1642161A (en) * 2004-01-08 2005-07-20 上海环达计算机科技有限公司 System and method for correcting selection of database column site through network page
CN101196885A (en) * 2006-12-06 2008-06-11 鸿富锦精密工业(深圳)有限公司 Web page data auto-filling system and method
CN101119560A (en) * 2007-09-21 2008-02-06 中兴通讯股份有限公司 Terminal condition express method and display method
CN101470748A (en) * 2007-12-29 2009-07-01 一零四资讯科技股份有限公司 Job hunting website structure applying whole page editing frame and its application method
CN101808134A (en) * 2010-03-16 2010-08-18 青岛海信移动通信技术股份有限公司 Control method and terminal for displaying dynamic content distribution business data

Also Published As

Publication number Publication date
CN103823886B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
US10165069B2 (en) Provisioning personalized content recommendations
US11748557B2 (en) Personalization of content suggestions for document creation
WO2018200294A1 (en) Parser for schema-free data exchange format
US20120311589A1 (en) Systems and methods for processing hierarchical data in a map-reduce framework
AU2018253478A1 (en) Testing insecure computing environments using random data sets generated from characterizations of real data sets
US20160092566A1 (en) Clustering repetitive structure of asynchronous web application content
CN106649788A (en) Database data transmission method and device
US9971811B2 (en) Dynamic stream computing topology
US20130198240A1 (en) Social Network Analysis
US10210194B2 (en) Ingestion plan based on table uniqueness
JP2017532675A (en) Guided data exploration
Saputelli Technology focus: Petroleum data analytics
Iacus Automated data collection with R-a practical guide to web scraping and text mining
WO2013186588A2 (en) K-ary tree to binary tree conversion through complete height balanced technique
Li et al. New results on delay-dependent robust stability of uncertain time delay systems
CN103823886A (en) Method and device for processing fields of webpage
US10671644B1 (en) Adaptive column set composition
Gadke et al. NASP report of graduate education in school psychology: 2016–2017
US9697276B2 (en) Large taxonomy categorization
CN106776636A (en) Data processing method and device
US10102197B2 (en) Classifier designer—a graphical system for designing classifiers using visual representations of example content
US10445415B1 (en) Graphical system for creating text classifier to match text in a document by combining existing classifiers
US9330130B1 (en) Get row index of record in dynamic data table
US9471715B2 (en) Accelerated regular expression evaluation using positional information
Wu et al. A filled function method for quadratic programs with binary constraints

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191203

Address after: 100176 room 222, 2f, building C, No. 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee after: Beijing Jingdong three hundred and sixty degree e-commerce Co., Ltd.

Address before: 11 East Building No. 65 West Park District 100080 Beijing City Shan creative Haidian District xingshikou Road West of the 1-4 layer 1-4 layer

Patentee before: Beijing Jingdong Shangke Information Technology Co., Ltd.