Conversion control method for variable sub-components between similar cards and related devices
By establishing a public and distinct display style library, identifying and building display styles of similar cards, the problem of repeated development of similar cards is solved, and development efficiency and reuse capabilities are improved.
Patent Information
- Application Number
- CN202211436319.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-11-16
AI Technical Summary
In the fintech business, the repeated development of similar cards leads to an increase in the amount of code and development tasks, and a waste of time.
By establishing a public display style library and a special display style library, identify the same and different display styles of similar cards, build the final display style of the target display card, and parse out the basic components of the combined display styles, fill in the display attribute values to complete the conversion control.
Reduce the development task volume, improve development efficiency, and achieve reuse capabilities between similar cards.
Smart Images

Figure CN115756693B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of fintech and financial APP page control, and in particular to a conversion control method for variable sub-components between similar cards and related devices thereof. Background Art
[0002] With the addition of new business scenarios, more and more APP pages need to be developed. There are often one or more cards in the corresponding display positions in the APP pages that are similar or alike. If such cards are developed from scratch, it will often increase the code volume and development task volume, and greatly waste development time.
[0003] Taking the Good Car Owner and Good Life APPs in the fintech business as an example, there are multiple similar cards in the Good Car Owner and Good Life APPs used for page composition within the same APP, and there are also multiple similar cards used for page composition between these two APPs. How to solve the problem that developing such cards from scratch will increase the code volume and development task volume and greatly waste development time has become an urgent problem to be solved in the front-end project development team. Summary of the Invention
[0004] The purpose of the embodiments of this application is to propose a conversion control method for variable sub-components between similar cards and related devices thereof, so as to change the conversion control between similar cards by precisely controlling any basic component between similar cards, greatly enhancing the reuse ability and improving the development efficiency.
[0005] To solve the above technical problems, the embodiments of this application provide a conversion control method for variable sub-components between similar cards, and adopt the following technical solutions:
[0006] A conversion control method for variable sub-components between similar cards includes the following steps:
[0007] Obtain several similar cards designed by the front-end UI according to a card acquisition instruction;
[0008] Compare the several similar cards, and identify the different display styles and the same display styles among the several similar cards;
[0009] Establish a common display style library based on the same display styles among the several similar cards;
[0010] Establish a special-shaped display style library corresponding to each card based on the different display styles among the several similar cards;
[0011] After obtaining the conversion instruction between the several similar cards, according to the difference identifier of the target display card, obtain the public display style from the public display style library and obtain the special-shaped display style corresponding to the target display card from the special-shaped display style library, and construct the final display style of the target display card;
[0012] Perform component parsing according to the final display style, and parse out the basic components that compose the final display style;
[0013] Obtain the display attribute values corresponding to the basic components from the preset data middleware, and fill the display attribute values into the final display style to complete the conversion control of the target display card.
[0014] Further, the step of comparing the several similar cards and identifying the different display styles and the same display styles among the several similar cards specifically includes:
[0015] Step A: Preset difference numbers for the several similar cards in advance to construct a difference number sequence;
[0016] Step B: Arbitrarily select n different difference numbers from the difference number sequence, and obtain n similar cards according to the n different difference numbers, where n is a positive integer greater than 1 and n is less than the maximum sequence value of the difference number sequence;
[0017] Step C: Use the method of image recognition to compare and identify the n similar cards, and screen out the same display styles among the n similar cards and the different display styles respectively possessed by the n similar cards;
[0018] Step D: Arbitrarily select a difference number from the remaining difference number sequence, and obtain the card corresponding to the difference number as an additional card;
[0019] Step E: Use the method of image recognition, take the same display styles among the n similar cards and the additional card as the recognition sources, and screen out the same display styles between the additional card and the n similar cards, and the different display styles possessed by the additional card;
[0020] Step F: Repeat Step D and Step E until the elements in the remaining difference number sequence are null values, terminate the execution, and obtain the screened same display styles and the different display styles of each card, that is, the same display styles among the several similar cards and the different display styles among the several similar cards.
[0021] Further, after performing the step of arbitrarily selecting n different difference numbers from the difference number sequence, the method further includes:
[0022] Deleting the n different difference numbers from the difference number sequence, and using the remaining difference numbers as the latest difference number sequence.
[0023] Further, after performing the step of arbitrarily selecting one difference number from the remaining difference number sequence, the method further includes:
[0024] Deleting the selected difference number from the remaining difference number sequence, and using the remaining difference numbers as the latest difference number sequence.
[0025] Further, the step of respectively establishing a special-shaped display style library corresponding to each card based on the different display styles among the several similar cards specifically includes:
[0026] Obtaining the different display styles respectively corresponding to each card among the several similar cards;
[0027] According to the different display styles, setting layout-based basic components, picture-based basic components, and text-based basic components for the corresponding cards one by one;
[0028] Setting the component values in the layout-based basic components, picture-based basic components, and text-based basic components to null values, and completing the construction of the special-shaped display style library for each card among the several similar cards.
[0029] Further, the step of parsing the basic components that compose the final display style according to the final display style specifically includes:
[0030] Obtaining the component names of the layout-based basic components, picture-based basic components, and text-based basic components corresponding to the target display card from the special-shaped display style library;
[0031] Obtaining the component names of the layout-based basic components, picture-based basic components, and text-based basic components from the common display style library;
[0032] All the obtained component names are the basic components of the final display style corresponding to the target display card.
[0033] Further, before the step of obtaining the display attribute values corresponding to the basic components from the preset data middleware, the method further includes:
[0034] Based on the front-end framework of the display target end corresponding to the target display card, determine whether it is necessary to update the component name of the basic component of the final display style corresponding to the target display card, where the component name may be different due to different front-end frameworks of the display target end;
[0035] If it is not necessary to update the component name of the basic component of the final display style corresponding to the target display card, directly obtain the display attribute value corresponding to the component name from the preset data middleware, where the data middleware contains the display attribute values corresponding to all attribute names in the front-end framework used by the display target end;
[0036] If it is necessary to update the component name of the basic component of the final display style corresponding to the target display card, first obtain the component name corresponding to the basic component from the style middleware adapted to the display target end for updating until the update is completed, obtain the attribute name adapted to the display target end, and obtain the display attribute value corresponding to the component name from the preset data middleware, where the style middleware contains all the attribute names in the front-end framework used by the display target end.
[0037] To solve the above technical problems, an embodiment of the present application also provides a conversion control device for variable sub-components between similar cards, adopting the following technical solutions:
[0038] A conversion control device for variable sub-components between similar cards includes:
[0039] A similar card acquisition module, configured to acquire a plurality of similar cards of the front-end UI design according to a card acquisition instruction;
[0040] A card comparison module, configured to compare the plurality of similar cards and identify the different display styles and the same display styles among the plurality of similar cards;
[0041] A common display style library establishment module, configured to establish a common display style library based on the same display styles among the plurality of similar cards;
[0042] A special-shaped display style library establishment module, configured to establish a special-shaped display style library corresponding to each card based on the different display styles among the plurality of similar cards;
[0043] A final display style construction module, which is used to obtain the common display style from the common display style library and the special-shaped display style corresponding to the target display card from the special-shaped display style library according to the difference identifier of the target display card after obtaining the conversion instruction between the several similar cards, and construct the final display style of the target display card;
[0044] A basic component parsing module, which is used to parse the component composition according to the final display style and parse out the basic components that compose the final display style;
[0045] A conversion control module, which is used to obtain the display attribute values corresponding to the basic components from a preset data middleware and fill the display attribute values into the final display style to complete the conversion control of the target display card.
[0046] To solve the above technical problems, an embodiment of the present application also provides a computer device, which adopts the following technical solutions:
[0047] A computer device includes a memory and a processor. Computer-readable instructions are stored in the memory. When the processor executes the computer-readable instructions, the steps of the conversion control method for variable sub-components between similar cards described above are implemented.
[0048] To solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which adopts the following technical solutions:
[0049] A computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps of the conversion control method for variable sub-components between similar cards as described above are implemented.
[0050] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0051] For the conversion control method of variable sub-components between similar cards in the embodiments of the present application, similar cards are obtained; a common display style library and a special-shaped display style library are established according to the similar cards; the final display style of the target display card is constructed; the basic components that compose the final display style are parsed out; the display attribute values corresponding to the basic components are obtained from a preset data middleware and filled into the final display style to complete the conversion control of the target display card. Through refined control of any basic component between similar cards, the conversion control between similar cards is changed, the reuse ability is greatly enhanced, the development task amount is reduced to a certain extent, and the development efficiency is improved. Description of the Drawings
[0052] To more clearly illustrate the solutions in this application, the following provides a brief introduction to the accompanying drawings required for the description of the embodiments of this application. Obviously, the accompanying drawings in the following description are some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0053] Figure 1 is an exemplary system architecture diagram to which this application can be applied;
[0054] Figure 2 Flowchart of an embodiment of the method for controlling the conversion of variable sub-components between similar cards according to this application;
[0055] Figure 3 is Figure 2 Flowchart of a specific implementation of step 202 shown;
[0056] Figure 4 is Figure 2 Flowchart of a specific implementation of step 203 shown;
[0057] Figure 5 is Figure 2 Flowchart of a specific implementation of step 204 shown;
[0058] Figure 6 is Figure 2 Flowchart of a specific implementation of step 206 shown;
[0059] Figure 7 Structural schematic diagram of an embodiment of the device for controlling the conversion of variable sub-components between similar cards according to this application;
[0060] Figure 8 Structural schematic diagram of an embodiment of the computer device according to this application. Specific implementation
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used in the description of the embodiments in this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the description, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the description, claims, or accompanying drawings of this application are used to distinguish different objects and not to describe a specific order.
[0062] References to "embodiments" in this specification mean that particular features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive of other embodiments. Those skilled in the art will understand explicitly and implicitly that the embodiments described herein can be combined with other embodiments.
[0063] To enable those skilled in the art to better understand the solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0064] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0065] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0066] The terminal devices 101, 102, 103 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, and desktop computers, etc.
[0067] The server 105 may be a server that provides various services, such as a background server that supports the pages displayed on the terminal devices 101, 102, 103.
[0068] It should be noted that the method for controlling the conversion of variable sub-components between similar cards provided in the embodiments of this application is generally executed by the server / terminal device. Correspondingly, the device for controlling the conversion of variable sub-components between similar cards is generally provided in the server / terminal device.
[0069] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in Figure 1 are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.
[0070] Continuing to refer to Figure 2 FIG., a flowchart of an embodiment of a method for controlling the conversion of variable sub-components between similar cards according to the present application is shown. The method for controlling the conversion of variable sub-components between similar cards includes the following steps:
[0071] Step 201, according to a card acquisition instruction, acquire a plurality of similar cards designed by the front-end UI.
[0072] In this embodiment, the plurality of similar cards designed by the front-end UI can be similar cards displayed within the same APP or similar cards displayed on multiple different APP pages. The similar cards refer to cards that have different display styles between the stacking styles that make up the cards when compared with a comparison card.
[0073] By acquiring similar cards from the front-end UI design before the similar cards are displayed, it is avoided that the page development project team blindly develops according to each card designed by the front-end UI one by one, preventing an unreasonable increase in the task development volume.
[0074] Step 202, compare the plurality of similar cards, and identify the different display styles between the plurality of similar cards and the same display styles between the plurality of similar cards.
[0075] Continuing to refer to Figure 3 , Figure 3 is Figure 2 a flowchart of a specific implementation manner of step 202 shown in FIG., including:
[0076] Step 301, pre-set different numbers for the plurality of similar cards to construct a sequence of different numbers;
[0077] Step 302, arbitrarily select n different numbers from the sequence of different numbers, and acquire n similar cards according to the n different numbers, where n is a positive integer greater than 1 and less than the maximum sequence value of the sequence of different numbers;
[0078] Step 303, use image recognition to compare and identify the n similar cards, and screen out the same display styles among the n similar cards and the different display styles respectively possessed by the n similar cards;
[0079] Step 304: Arbitrarily select a difference number from the remaining difference number sequence, and obtain the card corresponding to the difference number as the supplementary card;
[0080] Step 305: Using the method of image recognition, take the same display styles among the n similar cards and the supplementary card as the recognition sources, and screen out the same display styles between the supplementary card and the n similar cards, and the different display styles of the supplementary card;
[0081] Step 306: Repeat Step 304 and Step 305 until the elements in the remaining difference number sequence are null values, then terminate the execution, and obtain the same display styles screened out and the different display styles of each card, that is, the same display styles among the several similar cards and the different display styles among the several similar cards.
[0082] By adopting the form of difference numbers for the several similar cards, and using the difference numbers as identification information for comparison, the same display styles among the several similar cards and the different display styles of each similar card are obtained, which is convenient for accurately identifying the same display styles among the several similar cards and the different display styles of each similar card, and is convenient for constructing the common display style library and the special-shaped display style library.
[0083] In this embodiment, after performing the step of arbitrarily selecting n different difference numbers from the difference number sequence, the method further includes: deleting the n different difference numbers from the difference number sequence, and using the remaining difference numbers as the latest difference number sequence.
[0084] In this embodiment, after performing the step of arbitrarily selecting a difference number from the remaining difference number sequence, the method further includes: deleting the selected difference number from the remaining difference number sequence, and using the remaining difference numbers as the latest difference number sequence.
[0085] By continuously updating the difference number sequence during the comparison and recognition process, the occurrence of repeated comparison is avoided, and the comparison efficiency is improved.
[0086] Step 203: Establish a common display style library based on the same display styles among the several similar cards.
[0087] Continue to refer to Figure 4 , Figure 4 Yes Figure 2 is a flowchart of a specific implementation manner of Step 203 shown in
[0088] Step 401: Obtain the same display styles corresponding to all the cards among the several similar cards.
[0089] Step 402: Set the layout-based basic components, image-based basic components, and text-based basic components according to the same display styles.
[0090] Step 403: Set the component values in the layout-based basic components, image-based basic components, and text-based basic components to null values to complete the construction of the common display style library for all the cards among the several similar cards.
[0091] By constructing a common display style library by setting common layout-based basic components, image-based basic components, and text-based basic components, it is convenient to directly reuse the layout-based basic components, image-based basic components, and text-based basic components in the common display style library when developing similar cards later, without having to repeat the development, reducing a certain amount of development tasks and improving development efficiency.
[0092] Step 204: Establish a special-shaped display style library corresponding to each card based on the different display styles among the several similar cards.
[0093] Continue to refer to Figure 5 , Figure 5 Yes Figure 2 is a flowchart of a specific implementation manner of step 204 shown in
[0094] Step 501: Obtain the different display styles corresponding to each card among the several similar cards.
[0095] Step 502: Set the layout-based basic components, image-based basic components, and text-based basic components for the corresponding cards one by one according to the different display styles.
[0096] Step 503: Set the component values in the layout-based basic components, image-based basic components, and text-based basic components to null values to complete the construction of the special-shaped display style library for each card among the several similar cards.
[0097] By setting special-shaped layout-based basic components, image-based basic components, and text-based basic components corresponding to each similar card to construct a special-shaped display style library for each card respectively, it is convenient for later maintenance. When replacing the current card with another similar card, directly select the corresponding layout-based basic components, image-based basic components, and text-based basic components from the special-shaped display style library corresponding to the other similar card for update, and the update conversion control between similar cards can be completed, reducing a certain amount of development tasks and improving development efficiency.
[0098] Step 205, after obtaining the conversion instruction between the several similar cards, according to the difference identifier of the target display card, obtain the common display style from the common display style library and obtain the special-shaped display style corresponding to the target display card from the special-shaped display style library, and construct the final display style of the target display card.
[0099] Step 206, perform component parsing according to the final display style, and parse out the basic components that compose the final display style.
[0100] Continue to refer to Figure 6 , Figure 6 Yes Figure 2 is a flowchart of a specific implementation manner of step 206 shown, including:
[0101] Step 601, obtain the component names of the layout basic components, picture basic components, and text basic components corresponding to the target display card from the special-shaped display style library;
[0102] Step 602, obtain the component names of the layout basic components, picture basic components, and text basic components from the common display style library;
[0103] Step 603, all the obtained component names are the basic components of the final display style corresponding to the target display card.
[0104] By obtaining the layout basic components, picture basic components, and text basic components in the special-shaped display style library corresponding to the target display card, and obtaining the layout basic components, picture basic components, and text basic components in the common display style library to form the basic components of the final display style, in the actual development task process, there is no need to further write code to set the basic components of the target display card. Just obtain the basic components from the special-shaped display style library and the common display style library for combination, and the refined and combined conversion control between similar cards can be realized, improving the development efficiency of the front-end page.
[0105] Step 207, obtain the display attribute values corresponding to the basic components from the preset data middleware, and fill the display attribute values into the final display style to complete the conversion control of the target display card.
[0106] In this embodiment, before the step of obtaining the display attribute value corresponding to the basic component from the preset data middleware, the method further includes: judging whether it is necessary to update the component name of the basic component corresponding to the final display style of the target display card according to the front-end framework of the display target end corresponding to the target display card, wherein the component name may be different due to different front-end frameworks of the display target end; if it is not necessary to update the component name of the basic component corresponding to the final display style of the target display card, directly obtain the display attribute value corresponding to the component name from the preset data middleware, wherein the data middleware contains the display attribute values corresponding to all the attribute names in the front-end framework used by the display target end; if it is necessary to update the component name of the basic component corresponding to the final display style of the target display card, first obtain the component name corresponding to the basic component from the style middleware adapted to the display target end for updating until the update is completed, obtain the attribute name adapted to the display target end, and obtain the display attribute value corresponding to the component name from the preset data middleware, wherein the style middleware contains all the attribute names in the front-end framework used by the display target end.
[0107] Through the style middleware and the data middleware, when the component name of the basic component corresponding to the similar cards needs to be updated, directly select the corresponding attribute name in the style middleware for update, which ensures that the display of the similar cards adapts to different front-end development frameworks and has stronger compatibility; at the same time, using the data middleware ensures that when the attribute value is updated, the data is updated in a timely manner.
[0108] This application obtains similar cards; establishes a common display style library and a special-shaped display style library according to the similar cards; constructs the final display style of the target display card; parses out the basic components that compose the final display style; obtains the display attribute value corresponding to the basic component from the preset data middleware, and fills the display attribute value into the final display style to complete the conversion control of the target display card. This application greatly strengthens the reuse ability by precisely controlling any basic component among the similar cards, changing the conversion control among the similar cards, reducing the development task amount to a certain extent, and improving the development efficiency.
[0109] The embodiments of this application can obtain and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0110] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0111] In the embodiments of the present application, a conversion control model of variable sub-components between similar cards can be trained according to the conversion control method of variable sub-components between similar cards, and the artificial intelligence model is used to perform the conversion control between similar cards, which is more intelligent and automated.
[0112] Further referring to Figure 7 As an implementation of the above Figure 2 shown method, an embodiment of a conversion control device for variable sub-components between similar cards is provided in the present application. This device embodiment corresponds to the method embodiment shown in Figure 2 and this device can be specifically applied to various electronic devices.
[0113] As Figure 7 shown, the conversion control device 700 for variable sub-components between similar cards described in this embodiment includes: a similar card acquisition module 701, a card comparison module 702, a common display style library establishment module 703, a special-shaped display style library establishment module 704, a final display style construction module 705, a basic component analysis module 706, and a conversion control module 707. Among them:
[0114] The similar card acquisition module 701 is used to acquire several similar cards of the front-end UI design according to the card acquisition instruction;
[0115] The card comparison module 702 is used to compare the several similar cards and identify the different display styles between the several similar cards and the same display styles between the several similar cards;
[0116] The common display style library establishment module 703 is used to establish a common display style library based on the same display styles between the several similar cards;
[0117] The special-shaped display style library establishment module 704 is used to establish a special-shaped display style library corresponding to each card based on the different display styles between the several similar cards;
[0118] The final display style construction module 705 is configured to, after obtaining the conversion instruction between the several similar cards, obtain the common display style from the common display style library and obtain the special-shaped display style corresponding to the target display card from the special-shaped display style library according to the difference identifier of the target display card, and construct the final display style of the target display card;
[0119] The basic component parsing module 706 is configured to parse the constituent components according to the final display style and parse out the basic components that compose the final display style;
[0120] The conversion control module 707 is configured to obtain the display attribute value corresponding to the basic component from a preset data middleware and fill the display attribute value into the final display style to complete the conversion control of the target display card.
[0121] This application obtains similar cards; establishes a common display style library and a special-shaped display style library according to the similar cards; constructs the final display style of the target display card; parses out the basic components that compose the final display style; obtains the display attribute value corresponding to the basic component from a preset data middleware and fills the display attribute value into the final display style to complete the conversion control of the target display card. By finely controlling any one of the basic components between similar cards, this application changes the conversion control between similar cards, greatly enhancing the reuse ability, reducing the development task volume to a certain extent, and improving the development efficiency.
[0122] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the foregoing storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), etc., or a random access memory (RAM), etc.
[0123] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially in the direction of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise clearly stated in this document, there is no strict order restriction for the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0124] To solve the above technical problems, an embodiment of the present application further provides a computer device. For details, please refer to Figure 8 , Figure 8 which is the basic structural block diagram of the computer device in this embodiment.
[0125] The computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are communicatively connected to each other through a system bus. It should be noted that only the computer device 8 with components 81-83 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of the present technology can understand that a computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0126] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touchpad, or a voice control device, etc.
[0127] The memory 81 includes at least one type of readable storage medium, which includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 81 may be an internal storage unit of the computer device 8, such as the hard disk or memory of the computer device 8. In other embodiments, the memory 81 may also be an external storage device of the computer device 8, such as a plug-in hard disk equipped on the computer device 8, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Of course, the memory 81 may also include both the internal storage unit and the external storage device of the computer device 8. In this embodiment, the memory 81 is generally used to store the operating system and various application software installed on the computer device 8, such as computer-readable instructions for the conversion control method of variable sub-components between similar cards. In addition, the memory 81 may also be used to temporarily store various data that have been output or will be output.
[0128] In some embodiments, the processor 82 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 82 is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to run the computer-readable instructions stored in the memory 81 or process data, such as running the computer-readable instructions for the conversion control method of variable sub-components between similar cards.
[0129] The network interface 83 may include a wireless network interface or a wired network interface, and this network interface 83 is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0130] The computer device proposed in this embodiment belongs to the technical field of financial APP page conversion control. This application obtains similar cards; establishes a common display style library and a special-shaped display style library according to the similar cards; constructs the final display style of the target display card; parses out the basic components that compose the final display style; obtains the display attribute values corresponding to the basic components from a preset data middleware, and fills the display attribute values into the final display style to complete the conversion control of the target display card. By precisely controlling any one of the basic components between similar cards, this application changes the conversion control between similar cards, greatly enhancing the reuse ability, reducing the development task volume to a certain extent, and improving the development efficiency.
[0131] This application also provides another implementation manner, that is, to provide a computer-readable storage medium, which stores computer-readable instructions that can be executed by a processor to enable the processor to execute the steps of the conversion control method of variable sub-components between similar cards as described above.
[0132] The computer-readable storage medium proposed in this embodiment belongs to the technical field of financial APP page conversion control. This application obtains similar cards; establishes a common display style library and a special-shaped display style library according to the similar cards; constructs the final display style of the target display card; parses out the basic components that compose the final display style; obtains the display attribute values corresponding to the basic components from a preset data middleware, and fills the display attribute values into the final display style to complete the conversion control of the target display card. By precisely controlling any one of the basic components between similar cards, this application changes the conversion control between similar cards, greatly enhancing the reuse ability, reducing the development task volume to a certain extent, and improving the development efficiency.
[0133] Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), including several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of this application.
[0134] Obviously, the embodiments described above are only a part of the embodiments of the present application, rather than all of them. The preferred embodiments of the present application are shown in the drawings, but they do not limit the scope of the patent of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosed content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements on some of the technical features. Any equivalent structure made by using the content of the specification and drawings of the present application, directly or indirectly applied in other related technical fields, is similarly within the scope of the patent protection of the present application.
Claims
1. A conversion control method for variable sub-components between similar cards, characterized in that The steps include: According to the card acquisition instruction, obtain several similar cards of the front-end UI design; Comparing the plurality of similar cards, and identifying display styles that are different between the plurality of similar cards and display styles that are the same between the plurality of similar cards; Establishing a common display style library based on the same display styles among the plurality of similar cards; Based on the different display styles among the plurality of similar cards, a library of special-shaped display styles corresponding to each card is established; After the conversion instructions between the plurality of similar cards are obtained, the common display style is obtained from the common display style library and the special-shaped display style corresponding to the target display card is obtained from the special-shaped display style library according to the distinguishing mark of the target display card, so as to construct a final display style of the target display card; Parsing the constituent components according to the final display style to parse out the basic components that combine the final display style; Obtaining the display attribute value corresponding to the basic component from the preset data middleware, and filling the display attribute value into the final display style to complete the conversion control of the target display card, wherein before the step of obtaining the display attribute value corresponding to the basic component from the preset data middleware, the method further includes: According to the front-end framework of the display target end corresponding to the target display card, it is determined whether it is necessary to update the component name of the basic component of the final display style corresponding to the target display card, wherein the component name may be different due to different front-end frameworks of the display target end; If there is no need to update the component name of the basic component of the final display style corresponding to the target display card, directly obtain the display attribute value corresponding to the component name from the preset data middleware according to the component name, wherein the data middleware contains the display attribute values corresponding to all the attribute names in the front-end framework used by the display target end; If it is necessary to update the component name of the basic component of the final display style corresponding to the target display card, first obtain the component name corresponding to the basic component from the style middleware adapted to the display target end and update it until the update is completed, obtain the attribute name adapted to the display target end, and obtain the display attribute value corresponding to the component name from the preset data middleware according to the component name, wherein the style middleware contains all the attribute names in the front-end framework used by the display target end.
2. The conversion control method for variable sub-components between similar cards according to claim 1, wherein The step of comparing the plurality of similar cards to identify different display styles among the plurality of similar cards and the same display styles among the plurality of similar cards specifically includes: Step A: setting distinguishing numbers for the plurality of similar cards in advance to construct a distinguishing number sequence; Step B: arbitrarily selecting n different distinguishing numbers from the distinguishing number sequence, and obtaining n similar cards according to the n different distinguishing numbers, wherein n is a positive integer greater than 1, and n is less than the maximum sequence value of the distinguishing number sequence; Step C: Use image recognition to compare and identify the n similar cards, and screen out the same display styles among the n similar cards and the different display styles respectively possessed by the n similar cards; Step D: Arbitrarily select a difference number from the remaining difference number sequence, and obtain the card corresponding to the difference number as the supplementary card; Step E: Use image recognition to take the same display styles among the n similar cards and the supplementary card as the recognition sources, and screen out the same display styles between the supplementary card and the n similar cards, and the different display styles possessed by the supplementary card; Step F: Repeat Step D and Step E until the elements in the remaining difference number sequence are null values, terminate the execution, and obtain the screened same display styles and the different display styles possessed by each card, that is, the same display styles among the several similar cards and the different display styles among the several similar cards.
3. The conversion control method for variable sub-components between similar cards according to claim 2, characterized in that, After performing the step of arbitrarily selecting n different difference numbers from the difference number sequence, the method further includes: Delete the n different difference numbers from the difference number sequence, and use the remaining difference numbers as the latest difference number sequence.
4. The conversion control method for variable sub - components between similar cards according to claim 2, characterized in that, After performing the step of arbitrarily selecting a difference number from the remaining difference number sequence, the method further includes: Delete the selected difference number from the remaining difference number sequence, and use the remaining difference numbers as the latest difference number sequence.
5. The conversion control method for variable sub-components between similar cards according to claim 1, characterized in that The step of respectively establishing a corresponding special-shaped display style library for each card based on the different display styles among the several similar cards specifically includes: Obtain the different display styles respectively corresponding to each card among the several similar cards; According to the different display styles, set the layout basic components, picture basic components, and text basic components for the corresponding cards one by one; Set the component values in the layout basic components, picture basic components, and text basic components to null values to complete the construction of the special-shaped display style library for each card among the several similar cards.
6. The conversion control method for variable sub-components between similar cards according to claim 1, characterized in that The step of parsing the basic components that combine the final display style according to the final display style specifically includes: Obtain the component names of the layout basic components, picture basic components, and text basic components corresponding to the target display card from the special-shaped display style library; Obtain the component names of the layout basic components, picture basic components, and text basic components from the common display style library; All the obtained component names are the basic components of the final display style corresponding to the target display card.
7. A conversion control device for variable sub-components between similar cards, characterized in that, The variable sub-component conversion control device between similar cards is used to implement the steps of the variable sub-component conversion control method between similar cards as described in any one of claims 1 to 6. The variable sub-component conversion control device between similar cards includes: A similar card acquisition module, configured to acquire several similar cards of the front-end UI design according to a card acquisition instruction; A card comparison module for comparing the several similar cards, identifying the different display styles among the several similar cards and the same display styles among the several similar cards; A common display style library building module for building a common display style library based on the same display styles among the several similar cards; A special-shaped display style library building module for building a corresponding special-shaped display style library for each card respectively based on the different display styles among the several similar cards; A final display style construction module for, after obtaining the conversion instruction among the several similar cards, obtaining the common display style from the common display style library and obtaining the special-shaped display style corresponding to the target display card from the special-shaped display style library according to the difference identifier of the target display card, and constructing the final display style of the target display card; A basic component parsing module for parsing the constituent components according to the final display style and parsing out the basic components that compose the final display style; A conversion control module for obtaining the display attribute values corresponding to the basic components from a preset data middleware and filling the display attribute values into the final display style to complete the conversion control of the target display card.
8. A computer device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the steps of the conversion control method for variable sub-components among similar cards according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that, Computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by the processor, the steps of the conversion control method for variable sub-components among similar cards according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Page generation method and apparatus
CN107908747A
Method, device and equipment for generating front-end card assembly based on rear end and storage medium
CN111061522A