CN103365864A - Front-end website data positioning method - Google Patents

Front-end website data positioning method Download PDF

Info

Publication number
CN103365864A
CN103365864A CN2012100869588A CN201210086958A CN103365864A CN 103365864 A CN103365864 A CN 103365864A CN 2012100869588 A CN2012100869588 A CN 2012100869588A CN 201210086958 A CN201210086958 A CN 201210086958A CN 103365864 A CN103365864 A CN 103365864A
Authority
CN
China
Prior art keywords
array
strings
target
keyword string
target strings
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
CN2012100869588A
Other languages
Chinese (zh)
Other versions
CN103365864B (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.)
SHANGHAI SHOPEX NETWORK TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI SHOPEX NETWORK TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI SHOPEX NETWORK TECHNOLOGY Co Ltd filed Critical SHANGHAI SHOPEX NETWORK TECHNOLOGY Co Ltd
Priority to CN201210086958.8A priority Critical patent/CN103365864B/en
Publication of CN103365864A publication Critical patent/CN103365864A/en
Application granted granted Critical
Publication of CN103365864B publication Critical patent/CN103365864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a front-end website data positioning method. A first data array, a second data array having elements as many as those in the first data array, and a target data array are provided. The method includes the steps of a, allowing pointers, for pointing the elements in the data arrays, in the first and second data arrays to point to respective first elements; b, sequentially connecting the elements in the target data array into target strings, and converting the target strings into character strings; c, acquiring first keywords from the first data array and second keywords from the second data array according to pointing of the pointers; d, connecting the first keywords and the second keywords into keyword strings, and converting the keyword strings into character strings; and e, checking whether the keyword strings exist in the target strings or not by an regular expression, and recording the checking results according to a preset strategy.

Description

A kind of method of webpage front end locator data
Technical field
The present invention relates to a kind of data enquire method, especially a kind of method of webpage front end locator data.
Background technology
Along with the development of internet technique, the popularity of network is more and more higher, and the website has also obtained significant progress as the main contents supplier of internet.The website no longer is satisfied with content that unified standard only is provided but is wished can be more and user interaction and then can realize providing content service by user's demand.
A lot of websites provide the data, services of data form class for the user, and number of site also can provide some simple query functions for the Interactive Experience that strengthens the user on this basis.Because the visit capacity of website is larger; these simple queries functions for domestic consumer realize for the script that the bulk velocity that does not affect the website generally all adopts front end to explain; simultaneously in order to reduce the expense of database; this class simple queries function generally all leaves in possible Query Result in the array in advance; simultaneously querying condition also is put in the array with existing, carries out the array orientation problem so these query functions can be converted into usually by the script of browser-interpreted.Customary way is the relation of inclusion that checks by circulating between array, but may occur in the situation of or many condition queries many at array element because systemic circulation causes the front end torpor or cause front reaction slow because circulation is nested, and then affect browsing of user.
Summary of the invention
For the problems referred to above that existing webpage front-end array data locator meams exists, the invention provides a kind of be intended to reduce because carrying out cycling produce the slowly method of webpage front end locator data of front reaction.
The technical scheme that technical solution problem of the present invention adopts is:
A kind of method of webpage front end locator data comprises the first array, with the first array the second array and the target array of identical element is arranged, and wherein, specifically comprises the steps;
Step a, with pointed first element separately of described the first array and described the second array indication array interior element;
Step b, described target array interior element is in turn connected into target strings in order, and with described target strings changed string form;
Step c, be instructed in according to described pointer and obtain the first key word in the first array and in the second array, obtain simultaneously the second key word;
Steps d, described the first key word and described the second key word are connected into keyword string, and with described keyword string changed string form;
Step e, utilize regular expression to check whether described keyword string is present in the described target strings, and with predetermined policy record check result;
The pointed of the pointer of step f, described the first array and described the second array is the next element of order of place array separately;
Whether the array element of the pointed of step g, described the first array of inspection exists, and withdraws from as not existing then, then returns step c continuation execution as existing.
The method of above-mentioned webpage front end locator data, wherein, predetermined policy described in the described step e does not then return vacation for keyword string as described is not present in the described target strings, as described keyword string exist with described target strings in then resolve part that described target strings reduction comprises described keyword string in the position of described target array interior element, return element corresponding to this position and return true.
The method of above-mentioned webpage front end locator data, wherein, described step a extremely described step g carries out by the script that is embedded in the hypertext document.
The method of above-mentioned webpage front end locator data, wherein, described predetermined policy is carried out by the script that is embedded in the hypertext document.
The invention has the beneficial effects as follows:
Check character string by the cycling array being changed into regular expression, avoided the issuable problem of cycling, reduced the front end system expense, improved user's surfing.
Description of drawings
Fig. 1 is the FB(flow block) of the method for a kind of webpage front end of the present invention locator data.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as limiting to the invention.
The method of a kind of webpage front end of the present invention locator data, comprise the first array, with the first array the second array and the target array of identical element are arranged, store respectively querying condition in the first array and the second array, store the Query Result of expection in the target array, wherein, as shown in Figure 1, specifically comprise the steps;
Step a, the pointer of the first array and the second array indication array interior element is pointed to respectively separately the first element;
Step b, target array interior element is in turn connected into target strings in order, and with target strings changed string form;
Step c, be instructed in according to the pointer of the first array and obtain the first key word in the first array and obtain the second key word in the second array according to being instructed in of the second array pointer simultaneously;
Steps d, the first key word and the second key word are connected into keyword string, and with keyword string changed string form;
Step e, utilize regular expression to check whether keyword string is present in the target strings, and with predetermined policy record check result;
The pointed of the pointer of step f, the first array and the second array is the next element of order of place array separately;
Whether the array element of the pointed of step g, inspection the first array exists, and withdraws from as not existing then, then returns step c continuation execution as existing.
Further, wherein, predetermined policy does not then return vacation for not being present in such as keyword string among the step e in the target strings, as keyword string exist with target strings in then resolve part that the target strings reduction comprises keyword string in the position of target array interior element, return element corresponding to this position and return very.
Further, wherein, step a carries out by the script that is embedded in the hypertext document to step g and above-mentioned predetermined policy, and wherein script can be write formation by JavaScript, VBScript or other scripts.
The above only is preferred embodiment of the present invention; be not so limit claim of the present invention; so the means that the equivalent structure that all utilizations instructions of the present invention and diagramatic content have been done changes and those skilled in the art habitually practise are replaced, and all are included in protection scope of the present invention.

Claims (4)

1. the method for a webpage front end locator data comprises the first array, with the first array the second array and the target array of identical element is arranged, and it is characterized in that, specifically comprises the steps;
Step a, with pointed first element separately of described the first array and described the second array indication array interior element;
Step b, described target array interior element is in turn connected into target strings in order, and with described target strings changed string form;
Step c, be instructed in according to described pointer and obtain the first key word in the first array and in the second array, obtain simultaneously the second key word;
Steps d, described the first key word and described the second key word are connected into keyword string, and with described keyword string changed string form;
Step e, utilize regular expression to check whether described keyword string is present in the described target strings, and with predetermined policy record check result;
The pointed of the pointer of step f, described the first array and described the second array is the next element of order of place array separately;
Whether the array element of the pointed of step g, described the first array of inspection exists, and withdraws from as not existing then, then returns step c continuation execution as existing.
2. the method for webpage front end locator data as claimed in claim 1, it is characterized in that, predetermined policy described in the described step e does not then return vacation for keyword string as described is not present in the described target strings, as described keyword string exist with described target strings in then resolve part that described target strings reduction comprises described keyword string in the position of described target array interior element, return element corresponding to this position and return true.
3. the method for webpage front end locator data as claimed in claim 1 is characterized in that, described step a carries out by the script that is embedded in the hypertext document to described step g.
4. the method for webpage front end locator data as claimed in claim 2 is characterized in that, described predetermined policy is carried out by the script that is embedded in the hypertext document.
CN201210086958.8A 2012-03-28 2012-03-28 A kind of method of webpage front-end positioning data Active CN103365864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210086958.8A CN103365864B (en) 2012-03-28 2012-03-28 A kind of method of webpage front-end positioning data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210086958.8A CN103365864B (en) 2012-03-28 2012-03-28 A kind of method of webpage front-end positioning data

Publications (2)

Publication Number Publication Date
CN103365864A true CN103365864A (en) 2013-10-23
CN103365864B CN103365864B (en) 2016-06-08

Family

ID=49367235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210086958.8A Active CN103365864B (en) 2012-03-28 2012-03-28 A kind of method of webpage front-end positioning data

Country Status (1)

Country Link
CN (1) CN103365864B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760290B (en) * 2014-12-17 2018-11-13 阿里巴巴集团控股有限公司 The problem of being tested based on webpage front-end localization method and relevant apparatus, system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308495A (en) * 2007-10-24 2008-11-19 河北全通通信有限公司 Office data checking and manufacture method
CN101853301A (en) * 2010-05-25 2010-10-06 华为技术有限公司 Regular expression matching method and system
US20110320397A1 (en) * 2010-06-24 2011-12-29 Alexander Podkolzin Impulse regular expression matching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308495A (en) * 2007-10-24 2008-11-19 河北全通通信有限公司 Office data checking and manufacture method
CN101853301A (en) * 2010-05-25 2010-10-06 华为技术有限公司 Regular expression matching method and system
US20110320397A1 (en) * 2010-06-24 2011-12-29 Alexander Podkolzin Impulse regular expression matching

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
李旻 等: "正则表达式在数据库查询中的应用", 《计算机工程与设计》, vol. 27, no. 12, 30 June 2006 (2006-06-30), pages 2303 - 2305 *
胡军伟 等: "正则表达式在Web信息抽取中的应用", 《北京信息科技大学学报》, vol. 26, no. 6, 31 December 2011 (2011-12-31), pages 86 - 89 *
起航了: "Java中使用正则表达式实现字符串匹配", 《HTTP://WAP.YESKY.COM/DEV/486/2194986.SHTML》, 15 November 2005 (2005-11-15), pages 1 - 3 *
马俊: "基于正则表达式技术的信息搜索引擎应用研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 31 December 2006 (2006-12-31), pages 138 - 1555 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760290B (en) * 2014-12-17 2018-11-13 阿里巴巴集团控股有限公司 The problem of being tested based on webpage front-end localization method and relevant apparatus, system

Also Published As

Publication number Publication date
CN103365864B (en) 2016-06-08

Similar Documents

Publication Publication Date Title
US8661335B2 (en) Methods and systems for identifying content elements
US9098481B2 (en) Increasing accuracy in determining purpose of fields in forms
US8468145B2 (en) Indexing of URLs with fragments
US9836438B2 (en) Methods and systems of outputting content of interest
JP6203374B2 (en) Web page style address integration
CN104881608A (en) XSS vulnerability detection method based on simulating browser behavior
CN104881607A (en) XSS vulnerability detection method based on simulating browser behavior
US10810181B2 (en) Refining structured data indexes
CN102880679B (en) A kind of info web storage means and device
CN101146040B (en) Analyzing web site traffic method and device
CN102567521B (en) Webpage data capturing and filtering method
US20140059419A1 (en) Method and system of searching composite web page elements and annotations presented by an annotating proxy server
CN103164446A (en) Webpage request information response method and webpage request information response device
CN105447198A (en) Convenient page script importing method and device
WO2015046035A1 (en) Page/site server for immediately displaying noteworthy places in page content, program, and method
KR101511267B1 (en) Method and system for searchable Web services
EP3238105B1 (en) Application partial deep link to a corresponding resource
CN103309954A (en) Html webpage based data extracting system
CN103365864A (en) Front-end website data positioning method
EP2431891A1 (en) Methods and systems of outputting content of interest
CN104063506A (en) Method and device for identifying repeated web pages
CA2752860C (en) Methods and systems for identifying content elements
Nelli Pandas: reading and writing data
CN104965924B (en) A kind of date storage method and device
KR20110123027A (en) Searching method using smart toolbar system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Method for Locating Data in the Front End of Web Pages

Effective date of registration: 20230712

Granted publication date: 20160608

Pledgee: Industrial Bank Co.,Ltd. Shanghai Jinqiao Branch

Pledgor: SHANGHAI SHOPEX NETWORK TECHNOLOGY Co.,Ltd.|SHOPEX SOFTWARE CO.,LTD.

Registration number: Y2023310000365

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20231007

Granted publication date: 20160608

Pledgee: Industrial Bank Co.,Ltd. Shanghai Jinqiao Branch

Pledgor: SHANGHAI SHOPEX NETWORK TECHNOLOGY Co.,Ltd.|SHOPEX SOFTWARE CO.,LTD.

Registration number: Y2023310000365

PC01 Cancellation of the registration of the contract for pledge of patent right