CN113900613A - Picture dynamic adaptation method and device - Google Patents

Picture dynamic adaptation method and device Download PDF

Info

Publication number
CN113900613A
CN113900613A CN202111211809.5A CN202111211809A CN113900613A CN 113900613 A CN113900613 A CN 113900613A CN 202111211809 A CN202111211809 A CN 202111211809A CN 113900613 A CN113900613 A CN 113900613A
Authority
CN
China
Prior art keywords
resolution
picture
mobile terminal
address
matching
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
CN202111211809.5A
Other languages
Chinese (zh)
Other versions
CN113900613B (en
Inventor
游峰磊
刘沛丰
朱启凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Borui Tongyun Technology Co ltd
Original Assignee
Beijing Borui Tongyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Borui Tongyun Technology Co ltd filed Critical Beijing Borui Tongyun Technology Co ltd
Priority to CN202111211809.5A priority Critical patent/CN113900613B/en
Publication of CN113900613A publication Critical patent/CN113900613A/en
Application granted granted Critical
Publication of CN113900613B publication Critical patent/CN113900613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention relates to a method and a device for dynamically adapting pictures, wherein the method comprises the following steps: acquiring a first address and reference resolution list data of a picture; the reference resolution list data includes at least one reference resolution; acquiring the resolution of the current mobile terminal; matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result; if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution; and downloading the picture according to the second address of the picture and caching the picture.

Description

Picture dynamic adaptation method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for dynamically adapting a picture.
Background
With the development of the mobile internet, the user experience is more concerned by the application, and the display quality of the picture is an important factor influencing the user experience. However, the types of mobile terminals are many, and the resolution is different. In order to avoid distortion caused by forced stretching and scaling of pictures on a terminal, pictures which are consistent with the resolution of the terminal are selected to be loaded as much as possible.
The current industry generally produces several thumbnails with specific sizes during picture uploading, and the method can only be adapted to the mainstream screen resolution, and can not be well adapted when some models with non-mainstream resolution are encountered. In addition, the resolution of each device is accurately adapted, a lot of time and energy are consumed, and the development and maintenance workload is large.
Disclosure of Invention
The invention aims to provide a picture dynamic adaptation method aiming at the defects in the prior art, and the method enables pictures in the same proportion to be adapted to mobile terminal equipment with different screen sizes and the same proportion through proportion adaptation, reduces the workload of picture design, can optimize the time for loading the pictures and improves the loading experience.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for dynamically adapting a picture, including:
acquiring a first address and reference resolution list data of a picture; the reference resolution list data includes at least one reference resolution;
acquiring the resolution of the current mobile terminal;
matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
and downloading the picture according to the second address of the picture, and caching.
Preferably, before the obtaining the first address of the picture and the reference resolution list data, the method further includes:
receiving an operation instruction of a user;
and generating picture request information according to the operation instruction, and sending the picture request information to the server.
Further preferably, before the sending the picture request information to the server, the method further includes:
the server acquires the resolution of the mobile terminal;
establishing a database of supportable resolutions according to the resolution; the supportable resolution database comprises at least one supportable resolution;
generating picture data according to the supportable resolution; the picture data includes the picture identification and the reference resolution list data matched with the picture identification;
and generating a first address of the picture according to the picture identification, and storing the first address.
Preferably, the matching is performed in the reference resolution list data according to the resolution of the current mobile terminal, and the method specifically includes:
circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data;
and when the resolution of the current mobile terminal is consistent with the reference resolution, the matching is successful.
Further preferably, after the circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data, the method further includes:
when the resolution of the current mobile terminal is inconsistent with the reference resolution, generating a plurality of comparison results;
comparing the comparison results to generate a first comparison result;
and if the first comparison result is not greater than a preset threshold value, the matching is successful.
Still further preferably, after the matching is successful, the method further comprises:
extracting the reference resolution from the reference resolution list data according to the first comparison result.
Further preferably, the method further comprises:
and if the first comparison result is greater than the preset threshold value, the matching is unsuccessful.
Still further preferably, after the matching is unsuccessful, the method further comprises:
sending the resolution of the current mobile terminal to a server;
and the server counts the times of resolution request of the current mobile terminal in a preset time according to the resolution of the current mobile terminal, and updates the supportable resolution database according to the resolution of the current mobile terminal when the times reach a preset time threshold.
A second aspect of the embodiments of the present invention provides a device for dynamically adapting pictures, including:
the processing module is used for acquiring a first address and reference resolution list data of the picture; the reference resolution list data includes at least one reference resolution;
acquiring the resolution of the current mobile terminal;
matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
and downloading the picture according to the second address of the picture, and caching.
A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
the processor is configured to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps of the first aspect;
the transceiver is coupled to the processor, and the processor controls the transceiver to transmit and receive messages.
According to the method, the resolution of the current mobile terminal is matched with the reference resolution in the reference resolution list data, the matching process is not accurate, but is adaptive through the screen proportion, and the adaptive coverage rate can be improved; when the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution, downloading the picture through the second address of the picture, and caching; therefore, the time for loading the pictures is optimized, the cached pictures are loaded, and the user experience can be improved.
Drawings
Fig. 1 is a flowchart of a method for dynamically adapting pictures according to an embodiment of the present invention;
fig. 2 is a block diagram of a picture dynamic adaptation apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
The picture dynamic adaptation method provided by the embodiment of the invention can be applied to adaptation of the flash screen page, the advertisement page, the start page and the like of an application program, so that the pictures of the flash screen page, the advertisement page and the start page with the same proportion can be adapted to devices with different screen sizes and the same proportion, the workload of picture design is reduced, and the user experience is improved.
Example one
Fig. 1 is a flowchart of a method for dynamically adapting pictures according to an embodiment of the present invention, and the method is described below with reference to fig. 1. The method is exemplified by an Application (APP) as an execution subject. However, it is not intended to limit the scope of the present invention. As shown in fig. 1, a method for dynamically adapting a picture according to an embodiment of the present invention mainly includes the following steps:
step 110, acquiring a first address and reference resolution list data of a picture;
specifically, the first address of the picture may be understood as a Uniform Resource Locator (URL) of the picture, i.e., a link address where the picture is stored in the server, for example, https:// oss. It is understood that the first address of the picture includes a picture identification therein. The reference resolution list data may be understood as a set of terminal device resolutions supported by the picture, and is stored in the server in advance. More specifically, the reference resolution list item includes: the number of the screen ratio, the screen ratio value, and the reference resolution is at least one. In one specific example, the screen scale is 16: 9. 18: 9 and 19.5:9, the screen ratio values are as follows: 1.78, 2 and 2.17, the corresponding reference resolutions being 1920 x 1080, 2220 x 1080, 2340 x 1080 in that order.
Before performing step 110, the method further comprises the steps of:
s1, the APP receives an operation instruction of a user;
specifically, the APP receives an operation instruction input by a user through the mobile terminal device, such as starting the APP.
And S2, generating picture request information according to the operation instruction, and sending the picture request information to the server.
Specifically, the picture request information includes an APP identifier.
The first address and the reference resolution list data of the picture are stored in the server, so that when the server receives the picture request information sent by the APP, the first address and the reference resolution list data of the corresponding picture can be sent to the APP. Therefore, before executing the step S2, the method specifically includes the following steps:
step 101, a server acquires the resolution of a mobile terminal;
specifically, the server obtains model parameters passing through the mobile terminal, so that the screen proportion and the resolution corresponding to the model parameters are obtained. The model parameters are model parameters of the mobile terminal, for example, specific device parameters such as IPhone8 and millet 9, the device parameters include a screen ratio, and the like, the corresponding relationship between the model parameters, the screen ratio and the resolution may be preset and stored in a configuration file, and the preset screen ratio and the resolution may be obtained by reading the configuration file. In this example, the mainstream screen resolution is selected primarily.
Step 102, establishing a database capable of supporting resolution according to the resolution; the supportable resolution database includes at least one supportable resolution;
specifically, from the resolution of the mainstream screen, the supportable resolution of the picture is screened according to a preset rule, and a supportable resolution database is established. The preset rule may be that the specific gravities of the resolutions in the acquired mainstream screen are sorted from high to low, the first few bits are selected or a specific gravity threshold is set, and the resolution of the mainstream screen reaching the specific gravity threshold can be the resolution supportable by the picture. It will be appreciated that the reference resolution list data described above is a collection of partial device resolutions selected from the supportable resolution database.
103, generating picture data according to the supportable resolution;
specifically, according to the supportable resolution, drawing of the picture with the corresponding resolution, adjusting the layout configuration of the picture, and the like are respectively performed. The picture data comprises a picture identifier and reference resolution list data matched with the picture identifier. The picture id is a unique identifier for identifying the picture, and may be, for example, a number of the picture.
And 104, generating a first address of the picture according to the picture identifier, and storing the first address.
Specifically, the first address of the picture includes a picture id, for example, 1006 in https:// oss ·. The server configures the address to the backend interface.
When the server receives the picture request information sent by the APP, the first address of the picture can be sent to the APP through the rear-end interface, and meanwhile, the reference resolution list data corresponding to the picture is sent to the APP.
Step 120, acquiring the resolution of the current mobile terminal;
step 130, matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
specifically, the resolution of the current mobile terminal is cyclically compared with the reference resolution in the reference resolution list data.
When the resolution of the current mobile terminal is consistent with the reference resolution, the matching is successful, and steps 140 and 150 are performed.
In a specific example, the screen ratio of the current mobile terminal is 19.5:9, the screen ratio value is 2.17, and the corresponding resolution is 2340 × 1080. The reference resolution list data includes screen ratios of: 16: 9. 18: 9 and 19.5:9, screen ratio values of 1.78, 2 and 2.17 in sequence, and reference resolutions of 1920 × 1080, 2220 × 1080 and 2340 × 1080 in sequence. And in the process of carrying out cyclic comparison, comparing the screen proportion value of the current mobile terminal with the screen proportion values corresponding to the three reference resolutions in sequence, and when the screen proportion values of the current mobile terminal and the screen proportion values of the current mobile terminal are found to be equal, determining that the matching is successful.
More specifically, when the resolution of the current mobile terminal is not consistent with the reference resolution, a plurality of comparison results are generated.
And comparing the plurality of comparison results to generate a first comparison result.
And if the first comparison result is not greater than the preset threshold value, the matching is successful.
In another specific example, if the screen ratio of the current mobile terminal is 19:8.3, the screen ratio value is 2.26, and the resolution is 2480 × 1090. The reference resolution list data includes screen ratios of: 16: 9. 18: 9 and 19.5:9, screen ratio values of 1.78, 2 and 2.17 in sequence, and reference resolutions of 1920 × 1080, 2220 × 1080 and 2340 × 1080 in sequence. In the process of carrying out the cyclic comparison, the screen proportion value of the current mobile terminal is sequentially compared with the screen proportion values corresponding to the three reference resolutions, and three comparison results, namely, the difference values are sequentially as follows: 0.48, 0.26, 0.09. Then 0.09 with the smallest difference is selected as the first comparison result.
It should be noted that, in order to improve the accuracy of the adaptation, the first comparison result, i.e., the minimum difference, is less than or equal to a preset threshold. In this example, the preset threshold is 0.1. And when the value of 0.09 is less than 0.1, the matching is successful.
As can be seen from the above, the matching process is not precise adaptation, but is adapted according to the screen scale, so that the coverage rate of adaptation can be greatly improved. Through the proportion adaptation, the pictures with the same proportion can be adapted to the mobile terminal devices with different screen sizes and the same screen proportion, and the workload of picture design is reduced.
Step 140, if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
before this step is performed, the APP extracts the base resolution from the base resolution list data according to the first comparison result.
In this example, the first comparison result is 0.1, the corresponding screen ratio is 19.5:9, and the corresponding reference resolution, i.e., 2340 × 1080, is extracted from the reference resolution list data according to the screen ratio.
More specifically, this step may be understood as a process of performing resolution stitching processing on the first address of the picture. In one specific example, the second address is: https:// oss · com/. star/activity/1006/launch/start 2340-1080.png, where 2340-. I.e. the second address of the picture is based on the first address of the picture plus the resolution.
And 150, downloading the picture according to the second address of the picture, and caching.
Specifically, the purpose of setting the second address of the picture is to facilitate the APP to directly download the picture with the resolution corresponding to the current mobile terminal according to the address. The aim of storage is that APP when receiving user's operating instruction next time, the picture of direct loading buffer memory can, optimized the opportunity of loading, promoted user experience.
When the APP needs to preload the next picture, the steps are repeatedly executed.
Further, if the first comparison result is greater than a preset threshold, the matching is unsuccessful. When the match is not successful, step 160 is performed.
Step 160, sending the resolution of the current mobile terminal to a server;
and 170, counting the frequency of the resolution request of the current mobile terminal in a preset time by the server according to the resolution of the current mobile terminal, and updating the supportable resolution database according to the resolution of the current mobile terminal when the frequency reaches a preset frequency threshold.
Specifically, at a preset time, for example, five pm every day or every four hours every day, the server may count the number of times of resolution requests of the current mobile terminal reported by the APP. When the times reach the preset times threshold, step 102-step 104 are executed, that is, the database capable of supporting the resolution is automatically perfected and updated through the data acquisition and data analysis technology.
According to the picture dynamic adaptation method provided by the embodiment of the invention, the resolution of the current mobile terminal is matched with the reference resolution in the reference resolution list data, and the matching process is not accurate adaptation but is adaptive through the screen proportion, so that the adaptive coverage rate can be improved; when the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution, downloading the picture through the second address of the picture, and caching; therefore, the time for loading the pictures is optimized, the cached pictures are loaded, and the user experience can be improved.
Example two
Fig. 2 is a block diagram of a picture dynamic adaptation apparatus according to a second embodiment of the present invention, where the apparatus may be an apparatus capable of implementing the method according to the first embodiment of the present application, for example, the picture dynamic adaptation apparatus. As shown in fig. 2, the apparatus includes:
the processing module 201 acquires a first address of a picture and reference resolution list data; the reference resolution list data includes at least one reference resolution.
The processing module 201 is further configured to obtain a resolution of the current mobile terminal;
matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
and downloading the picture according to the second address of the picture and caching the picture.
In a specific implementation manner provided in this embodiment, before the first address of the picture and the reference resolution list data are acquired, the processing module 201 is further configured to: receiving an operation instruction of a user;
and generating picture request information according to the operation instruction, and sending the picture request information to the server.
In another specific implementation manner provided in this embodiment, before sending the picture request information to the server, the processing module 201 is further configured to: the server acquires the resolution of the mobile terminal;
establishing a database of supportable resolution according to the resolution; the supportable resolution database includes at least one supportable resolution;
generating picture data according to the supportable resolution; the picture data comprises a picture identifier and reference resolution list data matched with the picture identifier;
and generating a first address of the picture according to the picture identification, and storing the first address.
In another specific implementation manner provided in this embodiment, the processing module 201 is specifically configured to: circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data;
and when the resolution of the current mobile terminal is consistent with the reference resolution, the matching is successful.
In another specific implementation manner provided in this embodiment, after circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data, the processing module 201 is further configured to: when the resolution of the current mobile terminal is inconsistent with the reference resolution, generating a plurality of comparison results;
comparing the comparison results to generate a first comparison result;
and if the first comparison result is not greater than the preset threshold value, the matching is successful.
In another specific implementation manner provided in this embodiment, after the matching is successful, the processing module 201 is further configured to: based on the first comparison result, the reference resolution is extracted from the reference resolution list data.
In another specific implementation manner provided in this embodiment, the processing module 201 is further configured to: and if the first comparison result is larger than a preset threshold value, the matching is unsuccessful.
In another specific implementation manner provided in this embodiment, after the matching is unsuccessful, the processing module 201 is further configured to: sending the resolution of the current mobile terminal to a server;
the server counts the times of resolution request of the current mobile terminal in a preset time according to the resolution of the current mobile terminal, and when the times reach a preset time threshold, the supportable resolution database is updated according to the resolution of the current mobile terminal.
The picture dynamic adaptation device provided in the second embodiment of the present invention can perform the method steps in the first embodiment of the method, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the determining module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the determining module is called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when some of the above modules are implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can invoke the program code. As another example, these modules may be integrated together and implemented in the form of a System-on-a-chip (SOC).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optics, Digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, bluetooth, microwave, etc.). DVD), or semiconductor media (e.g., Solid State Disk (SSD)), etc.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. As shown in fig. 3, the electronic device 300 may include: a processor 31 (e.g., CPU), a memory 32, a transceiver 33; the transceiver 33 is coupled to the processor 31, and the processor 31 controls the transceiving operation of the transceiver 33. Various instructions may be stored in memory 32 for performing various processing functions and implementing method steps performed by the electronic device of embodiments of the present invention. Preferably, the electronic device according to an embodiment of the present invention may further include: a power supply 34, a system bus 35, and a communication port 36. The system bus 35 is used to implement communication connections between the elements. The communication port 36 is used for connection communication between the electronic device and other peripherals.
The system bus mentioned in fig. 3 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM) and may also include a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM powertrain control method, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A picture dynamic adaptation method is characterized by comprising the following steps:
acquiring a first address and reference resolution list data of a picture; the reference resolution list data includes at least one reference resolution;
acquiring the resolution of the current mobile terminal;
matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
and downloading the picture according to the second address of the picture, and caching.
2. The method of claim 1, wherein before the obtaining the first address and the reference resolution list data of the picture, the method further comprises:
receiving an operation instruction of a user;
and generating picture request information according to the operation instruction, and sending the picture request information to the server.
3. The method according to claim 2, wherein before sending the picture request message to the server, the method further comprises:
the server acquires the resolution of the mobile terminal;
establishing a database of supportable resolutions according to the resolution; the supportable resolution database comprises at least one supportable resolution;
generating picture data according to the supportable resolution; the picture data includes the picture identification and the reference resolution list data matched with the picture identification;
and generating a first address of the picture according to the picture identification, and storing the first address.
4. The method of claim 1, wherein the matching is performed in the reference resolution list data according to the resolution of the current mobile terminal, and the method specifically includes:
circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data;
and when the resolution of the current mobile terminal is consistent with the reference resolution, the matching is successful.
5. The method according to claim 4, wherein after circularly comparing the resolution of the current mobile terminal with the reference resolution in the reference resolution list data, the method further comprises:
when the resolution of the current mobile terminal is inconsistent with the reference resolution, generating a plurality of comparison results;
comparing the comparison results to generate a first comparison result;
and if the first comparison result is not greater than a preset threshold value, the matching is successful.
6. The method of claim 5, wherein after the matching is successful, the method further comprises:
extracting the reference resolution from the reference resolution list data according to the first comparison result.
7. The method of claim 4, wherein the method further comprises:
and if the first comparison result is greater than the preset threshold value, the matching is unsuccessful.
8. The method of claim 7, wherein after the matching is unsuccessful, the method further comprises:
sending the resolution of the current mobile terminal to a server;
and the server counts the times of resolution request of the current mobile terminal in a preset time according to the resolution of the current mobile terminal, and updates the supportable resolution database according to the resolution of the current mobile terminal when the times reach a preset time threshold.
9. An apparatus for dynamically adapting pictures, comprising:
the processing module is used for acquiring a first address and reference resolution list data of the picture; the reference resolution list data includes at least one reference resolution;
acquiring the resolution of the current mobile terminal;
matching in the reference resolution list data according to the resolution of the current mobile terminal to generate a matching result;
if the matching is successful, generating a second address of the picture according to the first address of the picture and the reference resolution;
and downloading the picture according to the second address of the picture, and caching.
10. An electronic device, comprising: a memory, a processor, and a transceiver;
the processor is used for being coupled with the memory, reading and executing the instructions in the memory to realize the method steps of any one of claims 1 to 8;
the transceiver is coupled to the processor, and the processor controls the transceiver to transmit and receive messages.
CN202111211809.5A 2021-10-18 2021-10-18 Picture dynamic adaptation method and device Active CN113900613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111211809.5A CN113900613B (en) 2021-10-18 2021-10-18 Picture dynamic adaptation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111211809.5A CN113900613B (en) 2021-10-18 2021-10-18 Picture dynamic adaptation method and device

Publications (2)

Publication Number Publication Date
CN113900613A true CN113900613A (en) 2022-01-07
CN113900613B CN113900613B (en) 2024-07-16

Family

ID=79192603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111211809.5A Active CN113900613B (en) 2021-10-18 2021-10-18 Picture dynamic adaptation method and device

Country Status (1)

Country Link
CN (1) CN113900613B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282255A (en) * 2015-11-03 2016-01-27 广州视源电子科技股份有限公司 picture transmission method and system
KR20190068859A (en) * 2017-12-11 2019-06-19 엔에이치엔 주식회사 Method and system for synchronizing file update of cache server
CN110032697A (en) * 2019-04-22 2019-07-19 苏州紫焰网络科技有限公司 Image processing method, device, computer equipment and storage medium
CN110290201A (en) * 2019-06-24 2019-09-27 北京金山安全软件有限公司 Picture acquisition method, mobile terminal, server and storage medium
CN110855880A (en) * 2019-10-24 2020-02-28 成都品果科技有限公司 Method and device for screening width-height ratio of image view area
CN112363786A (en) * 2020-10-30 2021-02-12 北京五八信息技术有限公司 Advertisement picture processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282255A (en) * 2015-11-03 2016-01-27 广州视源电子科技股份有限公司 picture transmission method and system
KR20190068859A (en) * 2017-12-11 2019-06-19 엔에이치엔 주식회사 Method and system for synchronizing file update of cache server
CN110032697A (en) * 2019-04-22 2019-07-19 苏州紫焰网络科技有限公司 Image processing method, device, computer equipment and storage medium
CN110290201A (en) * 2019-06-24 2019-09-27 北京金山安全软件有限公司 Picture acquisition method, mobile terminal, server and storage medium
CN110855880A (en) * 2019-10-24 2020-02-28 成都品果科技有限公司 Method and device for screening width-height ratio of image view area
CN112363786A (en) * 2020-10-30 2021-02-12 北京五八信息技术有限公司 Advertisement picture processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113900613B (en) 2024-07-16

Similar Documents

Publication Publication Date Title
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN109327490B (en) Method and server for deploying cloud service component
WO2019019645A1 (en) Method and apparatus for executing information pushing task, and computer device and storage medium
CN108197034B (en) Application testing method, server and system
CN115208951B (en) Request processing method, request processing device, electronic equipment and computer readable storage medium
CN115729817A (en) Method and device for generating and optimizing test case library, electronic equipment and storage medium
CN113688025A (en) Interface test method, device, equipment and storage medium
CN117556105A (en) Link tracking analysis positioning method, device, equipment and medium
CN112241357B (en) Method, apparatus, device and computer readable medium for gray scale testing
CN113900613A (en) Picture dynamic adaptation method and device
CN113746932B (en) Network request merging method, device, electronic device and computer program product
CN113485855B (en) Memory sharing method and device, electronic equipment and readable storage medium
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN108737350B (en) Information processing method and client
CN113407444B (en) Interface test case generation method, device, equipment and storage medium
CN114706589A (en) Repeated code scanning method and device and electronic equipment
CN114595146A (en) AB test method, device, system, electronic equipment and medium
CN112333206A (en) Safety test method and device and electronic equipment
CN112532414B (en) Method, device, equipment and computer storage medium for determining ISP attribution
CN111400181A (en) Object testing method and device and server
CN111625268B (en) Method and device for quickly scanning software patch and computing equipment
CN113485944B (en) Software testing method and system
CN117313856B (en) Reliability test planning system and method
WO2021212385A1 (en) Data testing method and device, server, and data processing system
CN113641576A (en) Database testing method and device and terminal equipment

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