CN110457616B - Method for displaying web page consistency under heterogeneous CPU system - Google Patents

Method for displaying web page consistency under heterogeneous CPU system Download PDF

Info

Publication number
CN110457616B
CN110457616B CN201910670915.6A CN201910670915A CN110457616B CN 110457616 B CN110457616 B CN 110457616B CN 201910670915 A CN201910670915 A CN 201910670915A CN 110457616 B CN110457616 B CN 110457616B
Authority
CN
China
Prior art keywords
code
cpu system
cpu
webpage
mark
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.)
Active
Application number
CN201910670915.6A
Other languages
Chinese (zh)
Other versions
CN110457616A (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.)
WONDERS INFORMATION CO Ltd
Original Assignee
WONDERS INFORMATION 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 WONDERS INFORMATION CO Ltd filed Critical WONDERS INFORMATION CO Ltd
Priority to CN201910670915.6A priority Critical patent/CN110457616B/en
Publication of CN110457616A publication Critical patent/CN110457616A/en
Application granted granted Critical
Publication of CN110457616B publication Critical patent/CN110457616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a method for displaying web page consistency under a heterogeneous CPU system. The method solves the problem of inconsistent webpage display under the heterogeneous CPU system on the premise of not increasing the webpage complexity, is beneficial to the migration of the B/S architecture information system to various CPU systems, is beneficial to solving the problems of webpage complexity and readability caused by webpage compatibility, and is beneficial to saving the time for reconstructing codes.

Description

Method for displaying web page consistency under heterogeneous CPU system
Technical Field
The invention relates to the field of browsers, in particular to a method for enabling web pages to be displayed consistently through code marking and dynamic replacement under different CPU (Central processing Unit) architectures (comprising different operating systems and different browsers).
Background
With the development of computer CPU technology, desktop computers have been gradually expanded from x86 architecture to various architectures including ARM, MIPS, SW and the like, and gradually replaced the x86 architecture, the operating system has been expanded from Windows to various Linux kernel-based operating systems, and the browser has been expanded from microsoft Internet Explorer to various browsers such as Firefox, chrome and 360, so that the inconsistency of web page display of the conventional B/S architecture application systems on these desktop computers is brought, and thus, service system codes need to make multiple customized versions for different CPU architectures.
Under different CPU architectures, different browsers are incompatible with the display of the webpage, including the size and the position of an HTML component, CSS style, javascript grammar and the like, a large number of branch sentences are required to be added into the webpage to realize compatibility, so that the complexity of the webpage is greatly increased, the readability is poor, and a simple and efficient processing method is not provided.
Disclosure of Invention
The purpose of the invention is that: on the premise of not increasing the complexity of the webpage, the webpage content is replaced by the content suitable for different CPU systems, so that the compatibility of the webpage is improved, and the method is suitable for environments with various CPU systems.
In order to achieve the above purpose, the technical scheme of the invention is to provide a method for displaying the consistency of web pages under a heterogeneous CPU system, which is characterized by comprising the following steps:
step 1, respectively carrying out webpage display on webpage codes written in a CPU system I and a CPU system II, comparing webpage display results, and identifying code fragments which are in the webpage codes and enable the webpage display results to be inconsistent, wherein the CPU system II is a heterogeneous CPU system different from the CPU system I;
step 2, adding code marks on the code segments identified in the step 1, wherein the code marks comprise mark ids, and different code segments have different mark ids;
step 3, when the client webpage is analyzed, reading all code marks and corresponding code fragments, and carrying out associated coding on the code marks, the specific contents of the corresponding code fragments and corresponding CPU system information, wherein the CPU system information is information of a CPU system II;
step 4, the client side sequentially sends the data coded in the step 3 to the server side through AJAX asynchronous call;
step 5, the server receives the encoded data and decodes the encoded data to restore the code marks, the specific contents of the corresponding code fragments and the corresponding CPU system information;
step 6, the server replaces the specific content of the code segment with the code segment suitable for the second CPU system according to the code mark and the CPU system information;
step 7, the server side encodes the code mark and the specific content of the replaced code segment obtained in the step 6, and returns the encoded data to the client side;
and 8, the client decodes the encoded data received from the server, restores the specific content of the code mark and the replaced code segment, and replaces the corresponding code segment in the webpage code written by the CPU system with the new code segment through the code mark.
Preferably, in step 2, the code mark is added before and after the code segment.
Preferably, in step 3, the CPU architecture information includes a CPU model and version, an operating system model and version, and a browser model and version, and when performing association encoding, the encoding format includes a tag id field, a specific content field of the code segment, a CPU model and version field, an operating system model and version field, and a browser model and version field, and adjacent fields are separated by ASCII codes 9.
The method solves the problem of inconsistent webpage display under the heterogeneous CPU system on the premise of not increasing the webpage complexity, is beneficial to the migration of the B/S architecture information system to various CPU systems, is beneficial to solving the problems of webpage complexity and readability caused by webpage compatibility, and is beneficial to saving the time for reconstructing codes.
Detailed Description
The invention will be further illustrated with reference to specific examples. It is to be understood that these examples are illustrative of the present invention and are not intended to limit the scope of the present invention. Further, it is understood that various changes and modifications may be made by those skilled in the art after reading the teachings of the present invention, and such equivalents are intended to fall within the scope of the claims appended hereto.
An existing web page originally used in a Wintel desktop computer needs to be displayed under a Loongson CPU (MIPS architecture) desktop computer.
If the display effect of the webpage on the Wintel platform is inconsistent with that of the Loongson platform, the code branches of the Wintel platform and the code branches of the Loongson platform are required to be written into the webpage simultaneously by adopting a traditional method, and the complexity is greatly increased.
If the method provided by the invention is used, the consistency of webpage display is finished on the premise of not increasing the complexity of the webpage through code marking and code replacement.
Assuming that the web page to be processed is list. Jsp, the method for displaying the web page consistency under the heterogeneous CPU system provided by the invention comprises the following steps:
step 1, respectively displaying web page codes written in a Wintel platform on the Wintel platform and a Loongson platform, comparing web page display results, and finding that the line feed of the form is inconsistent, wherein the code segment is < td >.
Step 2, adding a code tag < id=webepXXXXXXX > to each < td > code, wherein webep is the head of a specific character string for tag id, and XXXXXXX is a unique character string in the information system. Here exemplified by < id=webbg 20190701112028139001>, the code segment is < td >.
And 3, when the client webpage is analyzed, reading all code marks and code fragments beginning with webep for encoding. Here, for example, the tag id is webbg 20190701112028139001, the code segment is < td >, and the encoded data is: webbg 20190701112028139001, phr kpg= =, loongson3000A, neoKylin, firefox45, and the fields are separated by ASCII code 9. The Loongson3000A, neoKylin, firefox45 correspond to CPU model and version, operating system model and version, browser model and version, respectively. Phr kpg= code segment < td > encoded for BASE 64.
And 4, the client sends the encoded data (webepbg 20190701112028139001, phr kpg= =, loongson3000A, neoKylin, firefox45, and the fields are separated by ASCII code 9) to the server through an AJAX asynchronous call.
Step 5, the server receives the encoded data, decodes the encoded data, and restores the code mark id, the code fragment, the CPU model and version, the operating system model and version, and the browser model and version: webbg 20190701112028139001, < td >, longson 3000A, neoKylin, firefox45.
And 6, the server replaces the code segment with a proper code segment < td nonwrap > according to the code mark id, the CPU model and version, the operating system model and version and the browser model and version.
Step 7, the server encodes the code mark id and the replaced code segment: webbg 20190701112028139001, phr ig5vd3 jhcd4=, the fields are separated by ASCII code 9. Phr ig5vd3 jhcd4=code segment < td nonwrap > encoded for BASE 64.
And step 8, the server returns the encoded data (webbg 20190701112028139001, phr ig5vd3 jhcd4=, and the fields are separated by ASCII code 9) to the client.
And 9, the client decodes the encoded data, restores the code mark id (webepBG 20190701112028139001) and the replaced code segment (< td nonwrap >) and replaces the original code segment < td > by the code mark id.
And step 10, ending.
The above steps describe the process of web page tagging and dynamic replacement under heterogeneous CPU platforms.
By adopting the method for marking the web page and dynamically replacing the web page, the problem of inconsistent web page display under the heterogeneous CPU system is solved, the migration of the B/S architecture information system to various CPU systems is facilitated, the problems of web page complexity and readability caused by web page compatibility are solved, and the time for code reconstruction is saved.

Claims (3)

1. A method for displaying the consistency of web pages under a heterogeneous CPU system is characterized by comprising the following steps:
step 1, respectively carrying out webpage display on webpage codes written in a CPU system I and a CPU system II, comparing webpage display results, and identifying code fragments which are in the webpage codes and enable the webpage display results to be inconsistent, wherein the CPU system II is a heterogeneous CPU system different from the CPU system I;
step 2, adding code marks on the code segments identified in the step 1, wherein the code marks comprise mark ids, and different code segments have different mark ids;
step 3, when the client webpage is analyzed, reading all code marks and corresponding code fragments, and carrying out associated coding on the code marks, the specific contents of the corresponding code fragments and corresponding CPU system information, wherein the CPU system information is information of a CPU system II;
step 4, the client side sequentially sends the data coded in the step 3 to the server side through AJAX asynchronous call;
step 5, the server receives the encoded data and decodes the encoded data to restore the code marks, the specific contents of the corresponding code fragments and the corresponding CPU system information;
step 6, the server replaces the specific content of the code segment with the code segment suitable for the second CPU system according to the code mark and the CPU system information;
step 7, the server side encodes the code mark and the specific content of the replaced code segment obtained in the step 6, and returns the encoded data to the client side;
and 8, the client decodes the encoded data received from the server, restores the specific content of the code mark and the replaced code segment, and replaces the corresponding code segment in the webpage code written by the CPU system with the new code segment through the code mark.
2. The method for displaying web page consistency under heterogeneous CPU system according to claim 1, wherein in step 2, the code mark is added before and after the code segment.
3. The method for displaying consistency of web pages under heterogeneous CPU architecture according to claim 1, wherein in step 3, the CPU architecture information includes a CPU model and version, an operating system model and version, and a browser model and version, and when performing association encoding, the encoding format includes a tag id field, a specific content field of a code segment, a CPU model and version field, an operating system model and version field, and a browser model and version field, and adjacent fields are separated by ASCII code 9.
CN201910670915.6A 2019-07-24 2019-07-24 Method for displaying web page consistency under heterogeneous CPU system Active CN110457616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910670915.6A CN110457616B (en) 2019-07-24 2019-07-24 Method for displaying web page consistency under heterogeneous CPU system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910670915.6A CN110457616B (en) 2019-07-24 2019-07-24 Method for displaying web page consistency under heterogeneous CPU system

Publications (2)

Publication Number Publication Date
CN110457616A CN110457616A (en) 2019-11-15
CN110457616B true CN110457616B (en) 2024-02-13

Family

ID=68483179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910670915.6A Active CN110457616B (en) 2019-07-24 2019-07-24 Method for displaying web page consistency under heterogeneous CPU system

Country Status (1)

Country Link
CN (1) CN110457616B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115062317B (en) * 2022-03-19 2024-03-26 万达信息股份有限公司 Method for encrypting webpage content under heterogeneous CPU system

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987850A (en) * 2005-12-20 2007-06-27 腾讯科技(深圳)有限公司 Method for realizing AJAX webpage
WO2008052460A1 (en) * 2006-11-02 2008-05-08 Wuhan Ruanxiang Science And Technology Co., Ltd. Distribution web system with embedded command codes in a web page
CN101217507A (en) * 2007-12-29 2008-07-09 深圳市迅雷网络技术有限公司 Method, device and system for providing and altering data on network page
US7685229B1 (en) * 2001-05-15 2010-03-23 Adobe Systems Incorporated System and method for displaying server side code results in an application program
CN102541533A (en) * 2010-12-27 2012-07-04 北大方正集团有限公司 Method and equipment for page display
CN103324668A (en) * 2013-05-20 2013-09-25 吴涛军 Marking system for marking texts on web pages
CN104375858A (en) * 2014-10-27 2015-02-25 深信服网络科技(深圳)有限公司 Method and device for multiple browser platforms to execute javascript
CN106681852A (en) * 2016-12-22 2017-05-17 Ut斯达康(深圳)技术有限公司 Method and device for adjusting browser compatibility
CN107122187A (en) * 2017-04-26 2017-09-01 四川中电启明星信息技术有限公司 A kind of operation system OS accesses design method
CN107678943A (en) * 2017-09-01 2018-02-09 千寻位置网络有限公司 The page automated testing method of abstract page object
CN108388454A (en) * 2018-01-24 2018-08-10 广州市动景计算机科技有限公司 Dynamic provides the method, apparatus and terminal device of compatible JS content for script
CN108614762A (en) * 2016-12-09 2018-10-02 武汉斗鱼网络科技有限公司 A kind of browser testing method and device
CN108681464A (en) * 2018-05-12 2018-10-19 芜湖市疾病预防控制中心 Method of the old B/S architecture systems to mobile client optimization and compatibility adaptation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10984175B2 (en) * 2013-08-09 2021-04-20 Yottaa Inc. Systems and methods for dynamically modifying a requested web page from a server for presentation at a client
US10839041B2 (en) * 2017-01-25 2020-11-17 Walmart Apollo, Llc Systems, method, and non-transitory computer-readable storage media for a partial-render operation generating code for displaying a webpage

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685229B1 (en) * 2001-05-15 2010-03-23 Adobe Systems Incorporated System and method for displaying server side code results in an application program
CN1987850A (en) * 2005-12-20 2007-06-27 腾讯科技(深圳)有限公司 Method for realizing AJAX webpage
WO2008052460A1 (en) * 2006-11-02 2008-05-08 Wuhan Ruanxiang Science And Technology Co., Ltd. Distribution web system with embedded command codes in a web page
CN101217507A (en) * 2007-12-29 2008-07-09 深圳市迅雷网络技术有限公司 Method, device and system for providing and altering data on network page
CN102541533A (en) * 2010-12-27 2012-07-04 北大方正集团有限公司 Method and equipment for page display
CN103324668A (en) * 2013-05-20 2013-09-25 吴涛军 Marking system for marking texts on web pages
CN104375858A (en) * 2014-10-27 2015-02-25 深信服网络科技(深圳)有限公司 Method and device for multiple browser platforms to execute javascript
CN108614762A (en) * 2016-12-09 2018-10-02 武汉斗鱼网络科技有限公司 A kind of browser testing method and device
CN106681852A (en) * 2016-12-22 2017-05-17 Ut斯达康(深圳)技术有限公司 Method and device for adjusting browser compatibility
CN107122187A (en) * 2017-04-26 2017-09-01 四川中电启明星信息技术有限公司 A kind of operation system OS accesses design method
CN107678943A (en) * 2017-09-01 2018-02-09 千寻位置网络有限公司 The page automated testing method of abstract page object
CN108388454A (en) * 2018-01-24 2018-08-10 广州市动景计算机科技有限公司 Dynamic provides the method, apparatus and terminal device of compatible JS content for script
CN108681464A (en) * 2018-05-12 2018-10-19 芜湖市疾病预防控制中心 Method of the old B/S architecture systems to mobile client optimization and compatibility adaptation

Also Published As

Publication number Publication date
CN110457616A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
US20200097526A1 (en) Preserving semantic information in document conversion via color codes
CN113011202B (en) End-to-end image text translation method, system and device based on multitasking training
CN113158101B (en) Visual page rendering method, device, equipment and storage medium
CN109977014B (en) Block chain-based code error identification method, device, equipment and storage medium
CN103838813A (en) Dicom image viewer in a web-browser
CN105005472B (en) The method and device of Uyghur Character is shown on a kind of WEB
CN110457616B (en) Method for displaying web page consistency under heterogeneous CPU system
US20200089737A1 (en) Acquisition of a Font Portion Using a Compression Mechanism
CN102722479A (en) A method and device for realizing language translation
US20220012830A1 (en) Method and system for automatic analysis of legal documents using sequence alignemnt
CN113051356A (en) Open relationship extraction method and device, electronic equipment and storage medium
JPWO2019224891A1 (en) Classification device, classification method, generation method, classification program and generation program
CN104484323A (en) Translation processing method based on document segment
CN113850081A (en) Text processing method, device, equipment and medium based on artificial intelligence
CN116306498B (en) Text rendering method and device
CN113743101A (en) Text error correction method and device, electronic equipment and computer storage medium
CN116306655A (en) Named entity recognition method and system based on Chinese character patterns and word boundary features
CN112528674B (en) Text processing method, training device, training equipment and training equipment for model and storage medium
CN113611427A (en) User portrait generation method, device, equipment and storage medium
CN114429106B (en) Page information processing method and device, electronic equipment and storage medium
CN115062317A (en) Method for encrypting webpage content under heterogeneous CPU system
CN114548079B (en) Text display method and device and readable storage medium
CN111552511B (en) Method for recovering file name by unpacking firmware of Internet of things of VxWorks system
CN114461956A (en) Method and device for analyzing and processing MHTML file, electronic equipment and medium
CN117034965B (en) Image text translation method and device based on visual language pre-training

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