CN112416504A - Method capable of realizing automatic compatible adaptation for different devices - Google Patents
Method capable of realizing automatic compatible adaptation for different devices Download PDFInfo
- Publication number
- CN112416504A CN112416504A CN202110001131.1A CN202110001131A CN112416504A CN 112416504 A CN112416504 A CN 112416504A CN 202110001131 A CN202110001131 A CN 202110001131A CN 112416504 A CN112416504 A CN 112416504A
- Authority
- CN
- China
- Prior art keywords
- data
- adaptation
- scheme
- equipment
- screen
- 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.)
- Pending
Links
- 230000006978 adaptation Effects 0.000 title claims abstract description 61
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000010586 diagram Methods 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims description 3
- 238000009877 rendering Methods 0.000 claims description 3
- 238000012216 screening Methods 0.000 claims description 3
- 238000007405 data analysis Methods 0.000 claims description 2
- 238000011161 development Methods 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Abstract
The invention discloses a method capable of realizing automatic compatible adaptation for different devices, which relates to the technical field of automatic compatible adaptation for different devices, in particular to a method capable of realizing automatic compatible adaptation for different devices, and comprises the following steps: s1, receiving initial data; s2, selecting an adaptation scheme; s3, selecting corresponding layout information according to the scheme, and processing the data into a proper data format; and S4, analyzing the data by the equipment. The invention provides a method capable of automatically compatibly adapting to different devices, wherein different adapting schemes are configured in the invention in advance, the method comprises page element arrangement modes of vertical screen devices and horizontal screen devices, and different layout components used under different dpi respectively and used for adapting to different device interfaces, so that the arrangement scheme conforming to the current device page is displayed in different device interfaces, and data conforming to the modified scheme is output.
Description
Technical Field
The invention relates to the technical field of automatic compatible adaptation of different devices, in particular to a method capable of realizing automatic compatible adaptation of different devices.
Background
The existing equipment has various size types, terminal software generally uses one set of interface to display related contents, different interfaces are required to be developed for adapting to corresponding sizes for equipment with different sizes, and consistent user experience is provided for users, so that the problems of long development period, low reusability, difficult migration and the like are caused.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method capable of realizing automatic compatible adaptation for different devices, and solves the problems that the prior devices in the background art are provided with various size types, terminal software generally uses one set of interface to display related contents, different interfaces are required to be developed for adapting to corresponding sizes for devices with different sizes, and consistent user experience is provided for users, so that the development period is prolonged, the reusability is low, and the migration is difficult.
In order to achieve the purpose, the invention is realized by the following technical scheme: a method of enabling automatic compatible adaptation for different devices, comprising the steps of:
s1, receiving initial data;
s2, selecting an adaptation scheme;
s3, selecting corresponding layout information according to the scheme, and processing the data into a proper data format;
and S4, analyzing the data by the equipment.
Optionally, in step S1, in receiving the initial data, the device transmits the screen information to the invention; and sending the data of the screen size dpi of the equipment to the invention through a JavaScript interface provided by the invention, wherein the screen information is basic information of the screen size and the shape, and the screen size is 1920x1080 dpi.
Optionally, in the step S2 and the selecting an adaptation scheme, the method specifically includes the following steps:
s201, after receiving relevant data of the equipment, selecting an adaptation scheme, adjusting a display style according to screen information, arranging the style suitable for the current screen, setting the display scheme for a special screen, and outputting the relevant adaptation scheme back to the equipment;
s202, screening out a corresponding adaptation scheme according to the screen information of the horizontal screen equipment by using the method, and obtaining the most adapted current equipment in the width to be adapted, wherein the number of the first row and the column is three, and the row of the second row is one.
Optionally, the step S3, selecting corresponding layout information according to the scheme, and processing the data into a suitable data format, specifically includes the following steps:
s301, the device receives the relevant adaptation scheme, enters a universal loading process, requests data through the invention, and performs corresponding processing on the data according to the previous adaptation scheme, such as filtering the data, cutting the data, complementing the data, and then returns the processed data to the terminal;
s302, a device program initiates a data request to the invention, the requested data server end returns data with a format which is not influenced by an adaptation scheme, the invention receives related data, and the received data are arranged into a group of 3 pieces and a group of 1 piece according to the above adaptation scheme, wherein the adaptation scheme is that an upper 3-piece data display area and a lower 1-piece data display area are adopted;
s303, the server side may return 5 pieces of data, and the remaining data after the data processing is finished is filtered out and is not needed any more, so that the server side does not need to care about the number of data displayed by the equipment, for example, under some vertical screen terminals, the data needs to be disassembled into a single data and a group, but the equipment and the server side do not need to care about the data.
Optionally, in the step S4, in analyzing the data by the device, the invention returns the data to the device through the interface, and the device starts rendering the interface and displaying the data when acquiring the related adaptation scheme and the data of each display component, so that the device interface is displayed according to the adaptation scheme of the above diagram, the number of the data also conforms to the data display area, and the adaptation is completed, where the data of each display component, that is, the data in the data display area.
The invention provides a method capable of realizing automatic compatible adaptation for different devices, which has the following beneficial effects:
1. the invention provides a method capable of automatically compatibly adapting to different devices, wherein different adapting schemes are configured in the invention in advance, the method comprises page element arrangement modes of vertical screen devices and horizontal screen devices, and different layout components used under different dpi respectively and used for adapting to different device interfaces, so that the arrangement scheme conforming to the current device page is displayed in different device interfaces, and data conforming to the scheme is output.
2. According to the method for automatically compatible adaptation of different devices, the devices send screen information (screen pixels, dpi) to the invention, the invention obtains a corresponding adaptation scheme according to related information, whether the devices are horizontal screens or vertical screens can be obtained from the dpi, and if the dpi is judged to be the vertical screen, the dpi is selected correspondingly; the transverse screen can obtain schemes of different dpi under different proportions according to the length-width proportion.
3. The method adopts a uniform and abstract data structure (data is wrapped by an object, different component data are different array elements in the object, if the maximum number of current components needing to be put down is obtained by dividing the width of a screen by the width of the components in a single row according to a scheme, the corresponding number of the needed data is correspondingly obtained, the needed corresponding number of data is placed in the array elements, after equipment software receives the data, the corresponding components are directly rendered according to the number as long as the data of the corresponding components exist, the data number and the component number keep corresponding), the page display is facilitated, the received display data are correspondingly cut and mapped according to an adaptation scheme, and finally the data and the adaptation scheme are sent back to the equipment software together, so that the adaptation is realized.
Drawings
FIG. 1 is a schematic view of the flow structure of the present invention;
FIG. 2 is a schematic distribution diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Referring to fig. 1 to 2, the present invention provides a technical solution: a method of enabling automatic compatible adaptation for different devices, comprising the steps of:
s1, receiving initial data;
s2, selecting an adaptation scheme;
s3, selecting corresponding layout information according to the scheme, and processing the data into a proper data format;
and S4, analyzing the data by the equipment.
In the invention: step S1, in the process of receiving the initial data, the equipment transmits the screen information to the invention; and sending the data of the screen size dpi of the equipment to the invention through a JavaScript interface provided by the invention, wherein the screen information is basic information of the screen size and the shape, and the screen size is 1920x1080 dpi.
In the invention: referring to fig. 2, step S2, selecting an adaptation scheme, specifically includes the following steps:
s201, after receiving relevant data of the equipment, selecting an adaptation scheme, adjusting a display style according to screen information, arranging the style suitable for the current screen, setting the display scheme for a special screen, and outputting the relevant adaptation scheme back to the equipment;
s202, screening out a corresponding adaptation scheme according to the screen information of the horizontal screen equipment by using the method, and obtaining the most adapted current equipment in the width to be adapted, wherein the number of the first row and the column is three, and the row of the second row is one.
In the invention: step S3, selecting corresponding layout information according to the scheme, and processing the data into a suitable data format, specifically including the following steps:
s301, the device receives the relevant adaptation scheme, enters a universal loading process, requests data through the invention, and performs corresponding processing on the data according to the previous adaptation scheme, such as filtering the data, cutting the data, complementing the data, and then returns the processed data to the terminal;
s302, a device program initiates a data request to the invention, the requested data server end returns data with a format which is not influenced by an adaptation scheme, the invention receives related data, and the received data are arranged into a group of 3 pieces and a group of 1 piece according to the above adaptation scheme, wherein the adaptation scheme is that an upper 3-piece data display area and a lower 1-piece data display area are adopted;
s303, the server side may return 5 pieces of data, and the remaining data after the data processing is finished is filtered out and is not needed any more, so that the server side does not need to care about the number of data displayed by the equipment, for example, under some vertical screen terminals, the data needs to be disassembled into a single data and a group, but the equipment and the server side do not need to care about the data.
In the invention: step S4, in the data analysis by the device, the invention returns the data to the device through the interface, and the device starts rendering the interface and displaying the data when acquiring the related adaptation scheme and the data of each display component, so that the device interface displays according to the adaptation scheme of the above diagram, the number of the data also conforms to the data display area, and the adaptation is completed, where the data of each display component, that is, the data in the data display area.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical scope of the present invention and the equivalent alternatives or modifications according to the technical solution and the inventive concept of the present invention within the technical scope of the present invention.
Claims (5)
1. A method of enabling automatic compatible adaptation for different devices, comprising the steps of:
s1, receiving initial data;
s2, selecting an adaptation scheme;
s3, selecting corresponding layout information according to the scheme, and processing the data into a proper data format;
and S4, analyzing the data by the equipment.
2. A method capable of automatic compatibility adaptation for different devices according to claim 1, characterized by: in the step S1, in receiving the initial data, the device transmits the screen information to the invention; and sending the data of the screen size dpi of the equipment to the invention through a JavaScript interface provided by the invention, wherein the screen information is basic information of the screen size and the shape, and the screen size is 1920x1080 dpi.
3. A method capable of automatic compatibility adaptation for different devices according to claim 1, characterized by: in the step S2 and selecting the adaptation scheme, the method specifically includes the following steps:
s201, after receiving relevant data of the equipment, selecting an adaptation scheme, adjusting a display style according to screen information, arranging the style suitable for the current screen, setting the display scheme for a special screen, and outputting the relevant adaptation scheme back to the equipment;
s202, screening out a corresponding adaptation scheme according to the screen information of the horizontal screen equipment by using the method, and obtaining the most adapted current equipment in the width to be adapted, wherein the number of the first row and the column is three, and the row of the second row is one.
4. A method capable of automatic compatibility adaptation for different devices according to claim 1, characterized by: step S3, selecting corresponding layout information according to the scheme, and processing the data into a suitable data format, specifically including the following steps:
s301, the device receives the relevant adaptation scheme, enters a universal loading process, requests data through the invention, and performs corresponding processing on the data according to the previous adaptation scheme, such as filtering the data, cutting the data, complementing the data, and then returns the processed data to the terminal;
s302, a device program initiates a data request to the invention, the requested data server end returns data with a format which is not influenced by an adaptation scheme, the invention receives related data, and the received data are arranged into a group of 3 pieces and a group of 1 piece according to the above adaptation scheme, wherein the adaptation scheme is that an upper 3-piece data display area and a lower 1-piece data display area are adopted;
s303, the server side may return 5 pieces of data, and the remaining data after the data processing is finished is filtered out and is not needed any more, so that the server side does not need to care about the number of data displayed by the equipment, for example, under some vertical screen terminals, the data needs to be disassembled into a single data and a group, but the equipment and the server side do not need to care about the data.
5. A method capable of automatic compatibility adaptation for different devices according to claim 1, characterized by: in the step S4, in the data analysis by the device, the invention returns the data to the device through the interface, and the device starts rendering the interface and displaying the data when acquiring the related adaptation scheme and the data of each display component, so that the device interface is displayed according to the adaptation scheme of the above diagram, the number of the data also conforms to the data display area, and the adaptation is completed, wherein the data of each display component, that is, the data in the data display area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110001131.1A CN112416504A (en) | 2021-01-04 | 2021-01-04 | Method capable of realizing automatic compatible adaptation for different devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110001131.1A CN112416504A (en) | 2021-01-04 | 2021-01-04 | Method capable of realizing automatic compatible adaptation for different devices |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112416504A true CN112416504A (en) | 2021-02-26 |
Family
ID=74782801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110001131.1A Pending CN112416504A (en) | 2021-01-04 | 2021-01-04 | Method capable of realizing automatic compatible adaptation for different devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112416504A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101150803A (en) * | 2007-10-24 | 2008-03-26 | 优视动景(北京)技术服务有限公司 | Method for micro-browser to process network data, micro-browser and its server |
CN101546383A (en) * | 2008-03-24 | 2009-09-30 | 兄弟工业株式会社 | Image processing device and image processing method |
CN102222124A (en) * | 2011-03-22 | 2011-10-19 | 北京航空航天大学 | Platform and method for automatically generating design schematic diagram of automatic test system |
US20120036552A1 (en) * | 2008-12-19 | 2012-02-09 | Openpeak Inc. | System for managing devices and method of operation of same |
CN103412928A (en) * | 2013-08-16 | 2013-11-27 | 北京乐动卓越科技有限公司 | Method and device for realizing browser page intelligent response-type layout on mobile terminal |
CN105159960A (en) * | 2015-08-21 | 2015-12-16 | 湖南亿谷科技发展股份有限公司 | Webpage adaptive adjustment method and system |
CN105373385A (en) * | 2015-11-23 | 2016-03-02 | 四川长虹电器股份有限公司 | Multi-resolution UI (User Interface) adaption scripting development method of Android application |
US20160209994A1 (en) * | 2015-01-21 | 2016-07-21 | Microsoft Technology Licensing, Llc. | Adaptable user interface display |
US20180060468A1 (en) * | 2016-08-30 | 2018-03-01 | Sas Institute Inc. | Comparison and selection of experiment designs |
CN110569416A (en) * | 2019-09-04 | 2019-12-13 | 腾讯科技(深圳)有限公司 | APP control processing method based on data crawling and related product |
-
2021
- 2021-01-04 CN CN202110001131.1A patent/CN112416504A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101150803A (en) * | 2007-10-24 | 2008-03-26 | 优视动景(北京)技术服务有限公司 | Method for micro-browser to process network data, micro-browser and its server |
CN101546383A (en) * | 2008-03-24 | 2009-09-30 | 兄弟工业株式会社 | Image processing device and image processing method |
US20120036552A1 (en) * | 2008-12-19 | 2012-02-09 | Openpeak Inc. | System for managing devices and method of operation of same |
CN102222124A (en) * | 2011-03-22 | 2011-10-19 | 北京航空航天大学 | Platform and method for automatically generating design schematic diagram of automatic test system |
CN103412928A (en) * | 2013-08-16 | 2013-11-27 | 北京乐动卓越科技有限公司 | Method and device for realizing browser page intelligent response-type layout on mobile terminal |
US20160209994A1 (en) * | 2015-01-21 | 2016-07-21 | Microsoft Technology Licensing, Llc. | Adaptable user interface display |
CN105159960A (en) * | 2015-08-21 | 2015-12-16 | 湖南亿谷科技发展股份有限公司 | Webpage adaptive adjustment method and system |
CN105373385A (en) * | 2015-11-23 | 2016-03-02 | 四川长虹电器股份有限公司 | Multi-resolution UI (User Interface) adaption scripting development method of Android application |
US20180060468A1 (en) * | 2016-08-30 | 2018-03-01 | Sas Institute Inc. | Comparison and selection of experiment designs |
CN110569416A (en) * | 2019-09-04 | 2019-12-13 | 腾讯科技(深圳)有限公司 | APP control processing method based on data crawling and related product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20070260978A1 (en) | Embedded display system and method used by the system | |
CN104199879B (en) | A kind of data processing method and data processing equipment | |
CN110297636B (en) | Page automatic generation and parameter management method, system and device based on page configuration file | |
CN112015509A (en) | Data visualization large screen construction method, electronic device and storage medium | |
CN112100543B (en) | Webpage rendering method and device, storage medium, electronic equipment and server | |
CN105828166A (en) | Recording method of terminal screen display content and terminal | |
CN113687753A (en) | Split screen style configuration method and device, intelligent terminal and storage medium | |
US20150331558A1 (en) | Method for switching pictures of picture galleries and browser | |
CN109146783B (en) | Picture stitching method and device, electronic equipment and medium | |
CN110083810B (en) | Form conversion method and device, storage medium and electronic equipment | |
CN112416504A (en) | Method capable of realizing automatic compatible adaptation for different devices | |
CN108241608B (en) | Method, device and system for processing chart data | |
CN106919375B (en) | Screen self-adaption method and system on mobile terminal equipment | |
CN114072760A (en) | Cutting method, distribution method, medium, server, system | |
CN107612881B (en) | Method, device, terminal and storage medium for transmitting picture during file transmission | |
CN106445478B (en) | Method and device for converting graphic expressions | |
CN106155455B (en) | Method and device for controlling objects in interface | |
CN112214712A (en) | Automatic browser switching method and device, storage medium and electronic equipment | |
JP5710174B2 (en) | Two-dimensional barcode generation apparatus, two-dimensional barcode display system, two-dimensional barcode generation method and program | |
JP4144203B2 (en) | Information presentation apparatus and program | |
CN112468641B (en) | Program testing method, device, terminal and storage medium | |
CN103957466B (en) | Method, server and the system of web page display are carried out based on set-top box | |
CN104820690A (en) | Method and system for adaptation of pictures displayed by terminals | |
CN111061636B (en) | Automatic software testing method and device, computer equipment and storage medium | |
CN115460389B (en) | Image white balance area optimization method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210226 |
|
RJ01 | Rejection of invention patent application after publication |