CN114385290B - Page conversion method, device and storage medium - Google Patents

Page conversion method, device and storage medium Download PDF

Info

Publication number
CN114385290B
CN114385290B CN202111598855.5A CN202111598855A CN114385290B CN 114385290 B CN114385290 B CN 114385290B CN 202111598855 A CN202111598855 A CN 202111598855A CN 114385290 B CN114385290 B CN 114385290B
Authority
CN
China
Prior art keywords
page
mobile terminal
template
conversion request
conversion
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
CN202111598855.5A
Other languages
Chinese (zh)
Other versions
CN114385290A (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.)
Guotai Epoint Software Co Ltd
Original Assignee
Guotai Epoint Software 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 Guotai Epoint Software Co Ltd filed Critical Guotai Epoint Software Co Ltd
Priority to CN202111598855.5A priority Critical patent/CN114385290B/en
Publication of CN114385290A publication Critical patent/CN114385290A/en
Application granted granted Critical
Publication of CN114385290B publication Critical patent/CN114385290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application discloses a page conversion method, a page conversion device and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: receiving a page conversion request sent by a PC end, wherein the page conversion request is used for requesting to convert a preset PC page into a mobile end page; loading a mobile terminal template according to the page conversion request; loading and analyzing page contents in the preset PC page; filling the parsed page content into the mobile terminal template to generate a mobile terminal page; and returning the generated mobile terminal page. The problem of among the prior art page conversion efficiency and rate of accuracy lower is solved, the effect that through automatic realization page conversion, improvement page conversion efficiency and rate of accuracy has been reached.

Description

Page conversion method, device and storage medium
Technical Field
The invention relates to a page conversion method, a page conversion device and a storage medium, and belongs to the technical field of computers.
Background
The mobile internet is developed gradually, and the original PC end page can not meet the current user experience mode under the wave of the mobile internet.
Because the mobile device screen is smaller than the PC screen, the PC end page needs to be processed to adapt to the mobile end of the smaller screen. In the existing scheme, a large number of PC pages are converted into mobile pages, front-end developers are required to manually perform conversion tests, however, errors are unavoidable in the manual conversion process, a large amount of time and effort are easily consumed on the manual conversion process, and therefore the efficiency and accuracy of page conversion in the existing scheme are low.
Disclosure of Invention
The invention aims to provide a page conversion method, a page conversion device and a storage medium, which are used for solving the problems in the prior art.
In order to achieve the above purpose, the present invention provides the following technical solutions:
according to a first aspect, an embodiment of the present invention provides a page conversion method, which is used in a PC side, and the method includes:
receiving a page conversion triggering instruction, wherein the page conversion triggering instruction is used for triggering conversion of a preset PC page into a mobile terminal page;
sending a page conversion request to a server according to the page conversion triggering instruction, wherein the page conversion request is used for indicating the server to convert the preset PC page into a mobile terminal page;
and receiving the mobile terminal page returned by the server.
Optionally, the receiving a page transition trigger instruction includes:
and receiving a batch conversion triggering instruction for converting at least two preset PC pages into the mobile terminal.
Optionally, the receiving a page transition trigger instruction includes:
receiving a selection instruction for selecting the page source code of the preset PC page;
and receiving a page conversion trigger instruction for triggering the conversion of the page source code into the mobile terminal page.
Optionally, the method further comprises:
receiving a selection instruction for selecting a mobile terminal template;
sending a page conversion request to a server according to the page conversion triggering instruction, including:
and sending a page conversion request carrying the template identifier of the mobile terminal template to the server according to the page conversion triggering instruction.
In a second aspect, a page conversion method is provided, and is used in a server, and the method includes:
receiving a page conversion request sent by a PC end, wherein the page conversion request is used for requesting to convert a preset PC page into a mobile end page;
loading a mobile terminal template according to the page conversion request;
loading and analyzing page contents in the preset PC page;
filling the parsed page content into the mobile terminal template to generate a mobile terminal page;
and returning the generated mobile terminal page.
Optionally, the page conversion request carries a page identifier of the preset PC page, or carries a page source code of the preset PC page.
Optionally, the loading the mobile terminal template according to the page conversion request includes:
recording the mobile terminal template according to the template identification carried in the page conversion request.
Optionally, the loading and analyzing the page content in the preset PC page includes:
and loading and analyzing page contents in the preset PC page through jso.
In a third aspect, there is provided a page translation device comprising a memory having stored therein at least one program instruction and a processor that implements the method of the first or second aspects by loading and executing the at least one program instruction.
In a fourth aspect, there is provided a computer storage medium having stored therein at least one program instruction that is loaded and executed by a processor to implement the method according to the first or second aspect.
After the server receives the page conversion request, page contents are directly loaded and analyzed, a corresponding mobile terminal page is generated, and the mobile terminal page is returned, so that the problem of low page conversion efficiency and accuracy in the prior art is solved, and the effect of improving the page conversion efficiency and accuracy by automatically realizing page conversion is achieved.
Meanwhile, the method and the device can convert a single page, can convert a plurality of pages in batches, and can directly convert page source codes, so that the page conversion efficiency is further improved.
In addition, the PC page is analyzed by using a jsoup tool, so that the accuracy of the analysis of different scenes and different page elements is solved.
The foregoing description is only an overview of the present invention, and is intended to provide a better understanding of the present invention, as it is embodied in the following description, with reference to the preferred embodiments of the present invention and the accompanying drawings.
Drawings
Fig. 1 is a schematic structural view of an autonomous mobile chassis according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Referring to fig. 1, a method flowchart of a page conversion method according to an embodiment of the present application is shown, and as shown in fig. 1, the method includes:
step 101, a PC end receives a page conversion triggering instruction, wherein the page conversion triggering instruction is used for triggering conversion of a preset PC page into a mobile end page;
in actual implementation, the number of the preset PC pages may be one, and of course, the user may trigger batch conversion, where the preset PC pages may include at least two, that is, the step includes:
and receiving a batch conversion triggering instruction for converting at least two preset PC pages into the mobile terminal.
For example, the user may copy the page source code of the preset PC page into the input box, and click the conversion control to trigger the page conversion, which is to say, this step may include:
firstly, receiving a selection instruction for selecting page source codes of the preset PC pages;
and secondly, receiving a page conversion trigger instruction for triggering the conversion of the page source code into the mobile terminal page.
And 102, the PC side sends a page conversion request to a server according to the page conversion trigger instruction.
The page conversion request is used for indicating the server to convert the preset PC page into a mobile terminal page. In actual implementation, the page conversion request may carry the page identifier of the preset PC page, and when the preset PC page includes at least two PC pages, the page conversion request may carry the page identifier of each PC page.
When the user triggers the conversion through the page source code, a page conversion request carrying the page source code can be generated, which is not limited herein.
In addition, in one possible embodiment, different product lines may set different web page templates, and when the user triggers the page conversion, the mobile terminal template to be used may be selected, that is, this step may include: receiving a selection instruction for selecting a mobile terminal template; correspondingly, the method comprises the following steps: and sending a page conversion request carrying the template identifier of the mobile terminal template to the server according to the page conversion triggering instruction.
Step 103, the server receives a page conversion request sent by the pc end;
step 104, the server loads the mobile terminal template according to the page conversion request;
after receiving the page conversion request, the server can load the mobile terminal template according to the page conversion request.
Specifically, in one possible embodiment, the server reads the template identifier carried in the page conversion request, and loads the mobile terminal template corresponding to the read template identifier.
The foregoing is only exemplified by selecting the mobile terminal template by the user, and in actual implementation, the user may not need to select the template, and after receiving the page conversion request, the server loads the corresponding template directly according to the page identifier of the preset PC page carried in the page conversion request, which is not limited in this embodiment.
Step 105, loading and analyzing page contents in the preset PC page by the server;
optionally, the server may load and parse the page content in the preset PC page through jso.
Alternatively, the server may load the page content from the stored database, and parse the loaded page content through jsoup. The page content in the database is content stored before the user. Optionally, after the user stores the page content in the server, when the user needs to perform page conversion, the user may input corresponding file directory information in the PC, and accordingly, the page conversion request carries the file directory information, and after the server receives the page conversion request, the server may load the corresponding page content according to the file directory information.
In addition, in actual implementation, the cyclic analysis of elements and components can be carried out on the page to be converted through jso, and the content is stored in the memory in the analysis process.
Step 106, the server fills the parsed page content into the mobile terminal template to generate a mobile terminal page;
and step 107, the server returns the generated mobile terminal page.
And step 108, the PC side receives the mobile side page returned by the server.
In summary, after the server receives the page conversion request, the page content is directly loaded and analyzed, the corresponding mobile terminal page is generated, and the mobile terminal page is returned, so that the problem of low page conversion efficiency and accuracy in the prior art is solved, and the effect of improving the page conversion efficiency and accuracy by automatically realizing the page conversion is achieved.
Meanwhile, the method and the device can convert a single page, can convert a plurality of pages in batches, and can directly convert page source codes, so that the page conversion efficiency is further improved.
In addition, the PC page is analyzed by using a jsoup tool, so that the accuracy of the analysis of different scenes and different page elements is solved.
The present application also provides a page translation device comprising a memory having at least one program instruction stored therein and a processor that implements the method as described above by loading and executing the at least one program instruction.
The present application also provides a computer storage medium having stored therein at least one program instruction that is loaded and executed by a processor to implement the method as described above.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (7)

1. The page conversion method is characterized by being used in a PC end, and comprises the following steps:
receiving a page conversion triggering instruction, wherein the page conversion triggering instruction is used for triggering conversion of a preset PC page into a mobile terminal page;
receiving a selection instruction of selecting a mobile terminal template by a user;
sending a page conversion request carrying file directory information and a template identifier of the mobile terminal template to a server according to the page conversion trigger instruction, wherein the page conversion request is used for indicating the server to load corresponding page contents from a stored database according to the file directory information carried in the page conversion request, performing element and component cyclic analysis on a page to be converted through jsoup, and storing the contents into a memory in the analysis process, wherein the page contents in the database are contents stored before a user; reading a template identifier of a mobile terminal template selected by a user and carried in a page conversion request, and loading the mobile terminal template corresponding to the read template identifier; filling the parsed page content into the mobile terminal template to generate a mobile terminal page;
and receiving the mobile terminal page corresponding to the template identification of the mobile terminal template returned by the server.
2. The method of claim 1, wherein receiving a page transition trigger instruction comprises:
and receiving a batch conversion triggering instruction for converting at least two preset PC pages into the mobile terminal.
3. A method for converting a page, for use in a server, the method comprising:
receiving a page conversion request sent by a PC end, wherein the page conversion request is used for requesting to convert a preset PC page into a mobile end page, and the page conversion request carries file directory information and a template identifier of a mobile end template selected by a user;
reading a template identifier carried in a page conversion request, and loading a mobile terminal template corresponding to the read template identifier;
loading corresponding page contents from a stored database according to file directory information carried in the page conversion request, performing element and component cyclic analysis on a page to be converted through jso, and storing the contents into a memory in the analysis process, wherein the page contents in the database are contents stored before a user;
reading a template identifier of a mobile terminal template selected by a user and carried in a page conversion request, and loading the mobile terminal template corresponding to the read template identifier;
filling the parsed page content into the mobile terminal template to generate a mobile terminal page;
and returning the generated mobile terminal page.
4. The method of claim 3, wherein the page conversion request carries a page identifier of the preset PC page, or carries a page source code of the preset PC page.
5. The method of claim 3, wherein loading a mobile terminal template according to the page conversion request comprises:
recording the mobile terminal template according to the template identification carried in the page conversion request.
6. A page translation device, characterized in that it comprises a memory in which at least one program instruction is stored and a processor that implements the method according to any of claims 1 to 5 by loading and executing said at least one program instruction.
7. A computer storage medium having stored therein at least one program instruction that is loaded and executed by a processor to implement the method of any of claims 1 to 5.
CN202111598855.5A 2021-12-24 2021-12-24 Page conversion method, device and storage medium Active CN114385290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111598855.5A CN114385290B (en) 2021-12-24 2021-12-24 Page conversion method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111598855.5A CN114385290B (en) 2021-12-24 2021-12-24 Page conversion method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114385290A CN114385290A (en) 2022-04-22
CN114385290B true CN114385290B (en) 2024-04-05

Family

ID=81197689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111598855.5A Active CN114385290B (en) 2021-12-24 2021-12-24 Page conversion method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114385290B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995805B (en) * 2022-08-08 2022-11-08 安徽商信政通信息技术股份有限公司 Paperless official document handling method and paperless official document handling system for custom official document template

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706821A (en) * 2009-12-10 2010-05-12 中兴通讯股份有限公司 Tag-based mobile internet page design system and method
CN102271159A (en) * 2011-07-28 2011-12-07 百度在线网络技术(北京)有限公司 Method and device for obtaining page data as well as external website plug-in unit
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying
CN103139258A (en) * 2011-11-30 2013-06-05 百度在线网络技术(北京)有限公司 Method and device and system for processing page access requests of mobile terminal
CN104158836A (en) * 2014-06-23 2014-11-19 浙江大学城市学院 Method for rendering mobile application interface through data
CN105095449A (en) * 2015-07-27 2015-11-25 福州盈展信息技术有限公司 Method for converting HTML webpage to mobile terminal page
CN106126517A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 The PC end application page is converted to the method and device of the mobile terminal application page
CN106815316A (en) * 2016-12-23 2017-06-09 北京奇虎科技有限公司 Method, device and mobile terminal that content of pages is shared
CN111291298A (en) * 2018-12-10 2020-06-16 航天信息股份有限公司 Page display method and device, electronic equipment and storage medium
CN112306620A (en) * 2020-12-24 2021-02-02 深圳市蓝凌软件股份有限公司 Multi-language loading method and device for user-defined form control
CN113050921A (en) * 2019-12-26 2021-06-29 中国移动通信集团江西有限公司 Webpage conversion method, device, storage medium and computer equipment
CN113568697A (en) * 2021-07-29 2021-10-29 山东浪潮通软信息科技有限公司 Method, system and medium for converting PC end page into mobile end page

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706821A (en) * 2009-12-10 2010-05-12 中兴通讯股份有限公司 Tag-based mobile internet page design system and method
CN102271159A (en) * 2011-07-28 2011-12-07 百度在线网络技术(北京)有限公司 Method and device for obtaining page data as well as external website plug-in unit
CN103139258A (en) * 2011-11-30 2013-06-05 百度在线网络技术(北京)有限公司 Method and device and system for processing page access requests of mobile terminal
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying
CN104158836A (en) * 2014-06-23 2014-11-19 浙江大学城市学院 Method for rendering mobile application interface through data
CN105095449A (en) * 2015-07-27 2015-11-25 福州盈展信息技术有限公司 Method for converting HTML webpage to mobile terminal page
CN106126517A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 The PC end application page is converted to the method and device of the mobile terminal application page
CN106815316A (en) * 2016-12-23 2017-06-09 北京奇虎科技有限公司 Method, device and mobile terminal that content of pages is shared
CN111291298A (en) * 2018-12-10 2020-06-16 航天信息股份有限公司 Page display method and device, electronic equipment and storage medium
CN113050921A (en) * 2019-12-26 2021-06-29 中国移动通信集团江西有限公司 Webpage conversion method, device, storage medium and computer equipment
CN112306620A (en) * 2020-12-24 2021-02-02 深圳市蓝凌软件股份有限公司 Multi-language loading method and device for user-defined form control
CN113568697A (en) * 2021-07-29 2021-10-29 山东浪潮通软信息科技有限公司 Method, system and medium for converting PC end page into mobile end page

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Web页面移动端适配系统的研究与实现";吴嘉惟;《中国优秀硕士学位论文全文数据库 信息科技辑》;20201215;I139-172 *
"基于jsoup的Web页面自适应转换系统的实现";顾问等;《电子技术与软件工程》;20170927;第200-202页 *
"视觉传达设计视角下手机端Web App的研究与实现";李婉茹等;《电脑知识与技术》;20211025;第92-94页 *

Also Published As

Publication number Publication date
CN114385290A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US8335682B2 (en) Multi-language interfaces switch system and method therefor
CN114385290B (en) Page conversion method, device and storage medium
CN111552838A (en) Data processing method and device, computer equipment and storage medium
CN111367976A (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN110019970A (en) Inventory downloads template creation method, device, terminal and readable storage medium storing program for executing
CN110597714A (en) Kafka message testing method and device, computer equipment and storage medium
CN110968296B (en) Data acquisition method, device, equipment and readable storage medium
CN110727429B (en) Front-end page generation method, device and equipment
CN112650529B (en) System and method for configurable generation of mobile terminal APP codes
CN116560697B (en) DBC database synchronization method, device, electronic equipment and readable storage medium
CN112487163B (en) Execution method of automatic flow and method and device for acquiring interface data of execution method
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN108965295B (en) File compression and combination method and related device
CN103542865A (en) Testing and controlling method and device
CN101425079B (en) NV data processing method and apparatus
CN112905467A (en) Test case execution management method, device, equipment and storage medium
CN114168426A (en) Automated testing method and related equipment
CN113050935A (en) Method and device for generating mixed object, computing equipment and computer readable storage medium
CN113687965B (en) Data interaction method, device, equipment and storage medium
CN108958654B (en) Management method and related device of storage system
EP2058734A1 (en) Multi-language interfaces switch system and method therefore
CN115914019A (en) ERP message data testing method, device, equipment and storage medium
CN117034889A (en) Table generation method and switching method
IL145365A (en) Generating optimized computer data field conversion routines
CN116737577A (en) Analysis method, device, equipment and storage medium for unit test coverage rate

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