CN114924769A - Component updating method and device, electronic equipment and storage medium - Google Patents

Component updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114924769A
CN114924769A CN202210533348.1A CN202210533348A CN114924769A CN 114924769 A CN114924769 A CN 114924769A CN 202210533348 A CN202210533348 A CN 202210533348A CN 114924769 A CN114924769 A CN 114924769A
Authority
CN
China
Prior art keywords
component
updated
information
updating
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210533348.1A
Other languages
Chinese (zh)
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210533348.1A priority Critical patent/CN114924769A/en
Publication of CN114924769A publication Critical patent/CN114924769A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a component updating method, a component updating device, an electronic device and a storage medium. The method comprises the following steps: in response to the component update request, obtaining element update information for the target component element; determining a corresponding component to be updated according to the element updating information; responding to the element information synchronization request, and sending element updating information to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining the component updating information used for updating the component to be updated to the updated component according to the element updating information. The method and the device can ensure the matching of the pattern design and the updating information of the component, and improve the updating efficiency of the component pattern.

Description

Component updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a component updating method and apparatus, an electronic device, and a storage medium.
Background
With the development of computer technology, a technology for completing component updating by cooperation of multiple users appears, wherein a certain user provides an updating scheme of a component style, and other users develop and develop the updating scheme according to the updating scheme, so that the component style is updated.
In the related art, in order to ensure the updating efficiency of the component style, in the process of completing the updating of the component style by the cooperation of a plurality of users, synchronous modification aiming at the component style needs to be realized, that is, the design of the component style needs to be updated synchronously with the updating information of the component. However, when the component style is frequently modified, the design of the component style may not match the update information of the component, and thus the current component style is updated less efficiently.
Disclosure of Invention
The present disclosure provides a component updating method, device, electronic device and storage medium, so as to at least solve the problem of low updating efficiency of component styles in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a component update method, including:
in response to the component update request, obtaining element update information for the target component element;
determining a corresponding component to be updated according to the element updating information;
responding to an element information synchronization request, and sending the element updating information to a first client and a second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element updating information.
In an exemplary embodiment, the determining, according to the element update information, a corresponding component to be updated includes: acquiring the information type represented by the element updating information; and determining the component to be updated based on the information type.
In an exemplary embodiment, the determining the component to be updated based on the information type includes: and if the information type is a first type representing that the element value of the target assembly element in the first assembly is updated, taking the first assembly as the assembly to be updated.
In an exemplary embodiment, the determining the component to be updated based on the information type includes: if the information type is a second type representing that an element value of a preset element identifier is updated, acquiring a second component associated with the preset element identifier; the preset element identification is used for identifying an element value of a target component element in the second component; and taking the second component as the component to be updated.
In an exemplary embodiment, the sending the element update information to the first client and the second client includes: sending the updated element value of the preset element identifier to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the updated element value of the preset element identifier; the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element value updated by the preset element identifier.
In an exemplary embodiment, the component updating method further includes: in response to the component update request, presenting a component information update page; the component information updating page carries a preview control for previewing the updated component; and responding to the trigger operation aiming at the preview control, and displaying the updated component corresponding to the component to be updated according to the element updating information.
In an exemplary embodiment, the target component element comprises a color element; the element updating information comprises the color value of the updated component to be updated; the displaying the updated component corresponding to the component to be updated according to the element update information includes: and displaying the color of the updated component according to the updated color value.
In an exemplary embodiment, the component state of the updated component is plural; displaying the color of the updated component according to the updated color value, including: acquiring a preset color rank sequence aiming at each component state; obtaining a plurality of color gradation values corresponding to the updated color values, and screening out target color gradation values matched with the color gradation sequence from the plurality of color gradation values; and displaying the states of the components after updating according to the target color level value.
According to a second aspect of an embodiment of the present disclosure, there is provided a component update apparatus including:
an update information acquisition unit configured to perform acquisition of element update information for a target component element in response to a component update request;
the updating component determining unit is configured to determine a corresponding component to be updated according to the element updating information;
an update information synchronization unit configured to perform sending of the element update information to the first client and the second client in response to the element information synchronization request; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element updating information.
In an exemplary embodiment, the update component determination unit is further configured to perform obtaining an information type of the element update information representation; and determining the component to be updated based on the information type.
In an exemplary embodiment, the update component determining unit is further configured to perform, if the information type is a first type characterizing updating of an element value of a target component element in a first component, regarding the first component as the component to be updated.
In an exemplary embodiment, the update component determining unit is further configured to obtain a second component associated with a preset element identifier if the information type is a second type characterizing an update of an element value of the preset element identifier; the preset element identification is used for identifying an element value of a target component element in the second component; and taking the second component as the component to be updated.
In an exemplary embodiment, the update information synchronization unit is further configured to perform sending the updated element value of the preset element identifier to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the updated element value of the preset element identifier; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element value updated by the preset element identifier.
In an exemplary embodiment, the component updating apparatus further includes: an update component preview unit configured to perform presentation of a component information update page in response to the component update request; the component information updating page carries a preview control for previewing the updated component; and responding to the trigger operation aiming at the preview control, and displaying the updated component corresponding to the component to be updated according to the element updating information.
In an exemplary embodiment, the target component element comprises a color element; the element updating information comprises the color value of the updated component to be updated; the updated component previewing unit is further configured to perform displaying the color of the updated component according to the updated color value.
In an exemplary embodiment, the component state of the updated component is plural; the updating component previewing unit is further configured to execute obtaining of a preset color rank ordering for each component state; acquiring a plurality of gradation values corresponding to the updated color values, and screening out target gradation values matched with the gradation sequence from the plurality of gradation values; and displaying the states of all the updated components according to the target color level values.
In an exemplary embodiment, according to a third aspect of embodiments of the present disclosure, there is provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the component updating method as defined in any one of the embodiments of the first aspect.
In an exemplary embodiment, according to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the component updating method according to any one of the embodiments of the first aspect.
In an exemplary embodiment, according to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, which includes instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the component updating method according to any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
acquiring element update information for a target component element by responding to a component update request; determining a corresponding component to be updated according to the element updating information; responding to the element information synchronization request, and sending element updating information to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining the component updating information used for updating the component to be updated to the updated component according to the element updating information. According to the method and the device, the element updating information aiming at the target component element is obtained, the component to be updated is determined based on the element updating information, the element updating information is sent to the first client side providing the component updating style, the second client side is developed according to the updating style, the first client side can display the updated component obtained by updating the updating component according to the element updating information, the second client side can obtain the component updating information used for updating based on the element updating information, the matching of the style design and the component updating information can be guaranteed, and the updating efficiency of the component style is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating an application environment for a component upgrade method, according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a component upgrade method according to an exemplary embodiment.
FIG. 3 is a flow diagram illustrating the determination of components to be updated, according to an exemplary embodiment.
FIG. 4 is a schematic diagram illustrating a color update to a second component, according to an example embodiment.
FIG. 5 is a flow diagram illustrating a preview of an updated component in accordance with an exemplary embodiment.
FIG. 6 is an interface diagram illustrating a component information update page in accordance with an exemplary embodiment.
FIG. 7 is a flow diagram illustrating exposing colors of updated components in accordance with an exemplary embodiment.
FIG. 8 is a schematic diagram illustrating a design system upgrade, according to an example embodiment.
FIG. 9 is a diagram illustrating finding common elements in accordance with an exemplary embodiment.
FIG. 10 is a block diagram illustrating a component update apparatus according to an example embodiment.
FIG. 11 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are both information and data that are authorized by the user or sufficiently authorized by various parties.
The component updating method provided by the present disclosure can be applied to the application environment shown in fig. 1. The terminal 101, the first client 103, and the second client 104 interact with the server 102 through a network. Specifically, when a user updates a component style, a component update request for the component style can be triggered by its terminal 101, and element update information for updating a certain component element forming the component style is input through the terminal 101, the terminal can respond to the request and determine the component to be updated which needs to be subjected to style update after obtaining the element update information, meanwhile, the user may also send the element update information to the server 102 by triggering an element information synchronization request, and the server 102 sends the element update information to the first client 103 synchronously, and a second client 104, in which the first client 103 can display an updated component obtained by updating the component to be updated according to the element update information, the second client 104 may generate component update information for updating the component to be updated according to the element update information. The terminal 101, the first client 103 and the second client 104 may be, but are not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices, and the server 102 may be implemented by an independent server or a server cluster composed of a plurality of servers. .
Fig. 2 is a flowchart illustrating a component updating method according to an exemplary embodiment, where the component updating method is used in the terminal 101 as shown in fig. 2, and includes the following steps.
In step S201, in response to the component update request, element update information for the target component element is acquired.
The component update request refers to a request triggered by the terminal 101 by the user and used for updating the component style of a certain component, for example, when the user needs to update the component style of a certain component, the component update request may be triggered by the terminal 101, and the component update request may carry element update information used for updating the target component element. In this embodiment, the component style may be composed of a plurality of component elements with different dimensions, and the target component element refers to a component element that needs to be updated through the element update information, for example, the component style for a certain component may include the component elements with the following dimensions: a color element, a shape element, or a font element, etc., the target component element may be a color element if the user needs to update the color of the component, and the target component element may be a shape element if the user needs to update the shape of the component.
Specifically, when a user needs to update a component style, a component update request for updating the component style may be triggered by the terminal 101 of the user, and update information for a target component element is entered by the terminal 101 of the user, and the terminal 101 may respond to the update request to obtain element update information input by the user.
In step S202, a corresponding component to be updated is determined according to the element update information.
The component to be updated refers to a component that needs to be updated, and the element update information may carry information for characterizing the component that needs to be updated in style, that is, the component to be updated includes, for example, a component a, a component B, and a component C, and the element update information characterizes updating the color of the component a, so the component to be updated may be the component a, or the element update information characterizes updating the colors of the component a and the component B, so the component to be updated may be the component a and the component B.
In step S203, in response to the element information synchronization request, element update information is sent to the first client 103 and the second client 104; the first client 103 is configured to display an updated component corresponding to the component to be updated according to the element update information; and the second client is used for obtaining the code information for updating the component to be updated to the updated component according to the element updating information.
The element information synchronization request is user-triggered, and is used for synchronizing the element update information to the requests of the first client 103 and the second client 104 to ensure synchronization of the element update information between the first client 103 and the second client 104, where the first client 103 may be a client providing an update scheme in a component style, and the second client 104 may be a client developed according to the update scheme. The element information synchronization request may be triggered by clicking a trigger control for synchronizing the element update information after the user finishes editing the element update information. The terminal 101 may respond to the request and send the element update information to the first client 103 and the second client 104, or the terminal 101 sends the element update information to the server 102, and the server 102 synchronizes the element update information to the first client 103 and the second client 104.
The updated component refers to a component obtained by updating a target component element in the style of the component to be updated according to the element update information, for example, the color of the component to be updated is red, if the element update information represents that the color of the component is converted into blue, the updated component is a component formed by updating the color of the component to be updated from red to blue, or the shape of the component to be updated is circular, if the element update information represents that the shape of the component is converted into square, the updated component is a component formed by updating the shape of the component to be updated from circular to square.
After the first client 103 obtains the element update information, the updated component obtained by updating the component to be updated according to the element update information can be displayed on the first client 103, so that the synchronous update of the component style at the client providing the update scheme of the component style can be ensured. Meanwhile, after the second client 104 obtains the element update information, the component update information for updating the component to be updated to the updated component may be generated according to the element update information, for example, the component update information may be code information for updating the component to be updated to the updated component, so as to ensure that the code information of the component style is updated synchronously at the user end that is developed according to the update scheme.
In the component updating method, element updating information for a target component element is acquired by responding to a component updating request; determining a corresponding component to be updated according to the element updating information; responding to the element information synchronization request, and sending element updating information to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining the component updating information used for updating the component to be updated to the updated component according to the element updating information. According to the method and the device, the element updating information aiming at the target component element is obtained, the component to be updated is determined based on the element updating information, the element updating information is sent to the first client side providing the component updating style, and the second client side is developed according to the updating style, wherein the first client side can display the updated component obtained by updating the updating component according to the element updating information, and the second client side can obtain the component updating information used for updating based on the element updating information, so that the matching of the style design and the component updating information can be ensured, and the updating efficiency of the component style is improved.
In an exemplary embodiment, as shown in fig. 3, step S202 may further include:
in step S301, the information type represented by the element update information is acquired.
In this embodiment, the element update information of different information types may be used to represent that the component to be updated is updated in different manners, for example, the element update information may be used to represent that a certain component is updated, and may also be used to represent that a certain class of components is updated at the same time, and after the terminal 101 determines the element update information, the information type of the element update information may be further determined, that is, it is determined which type of component the element update information needs to be updated.
In step S302, the component to be updated is determined based on the information type.
After the information type of the element update information is determined in step S301, the terminal 101 may further determine, according to the information type, a component to be updated, which needs to update the element of the target component, from the multiple components.
In this embodiment, the terminal 101 may determine different components to be updated according to different information types of the element update information, so that the user may input the element update information of different information types, and update of different modes for the components to be updated is implemented, thereby enabling more various modes for implementing component style update.
Further, step S302 may further include: and if the information type is a first type which is characterized in that the element value of the target component element in the first component is updated, taking the first component as the component to be updated.
The first type refers to the type of information that updates the element value of the target component element of a particular component, and the first component refers to the component that needs to modify the element value. In this embodiment, if the information type of the element update information is the first type, the terminal 101 may use the first component as a component to be updated, which needs to implement component style update. For example, the target component element may be a color element, if the element update information represents that the color of the component a is updated from the element value a representing red to the element value B representing blue, the first component is the component a, and at this time, the terminal 101 may use the component a as a component to be updated, which needs to be updated in component style, so as to implement individual adjustment on each component.
In this embodiment, a user may update a component style of a single specific component by using the element update information as the first type, so that accuracy of updating the component style may be ensured.
In addition, step S302 may further include: if the information type is a second type representing that the element value of the preset element identifier is updated, acquiring a second component associated with the preset element identifier; presetting element identification for identifying element value of target component element in second component; and taking the second component as the component to be updated.
In this embodiment, the unified update of the components of this type may be implemented by setting the associated element identifiers for the components of the same type, that is, by updating the element values represented by the element identifiers, the second components associated with the element identifiers are updated, that is, the components associated with the element identifiers are all used as the components to be updated, which need to be updated.
For example, for the colors of the component a, the component B, and the component C, if a user needs to change the color of one of the components, the colors of the remaining components are changed accordingly, that is, the color of the component a may be changed while the colors of the component B and the component C are changed, the user may associate the component a, the component B, and the component C with a preset identifier in advance through the terminal 101, and if the identifier represents the element value a of red, the colors of the component a, the component B, and the component C may be red. And if the element updating information represents the second type for updating the element value of the element identifier, namely the element updating information can represent that the element value of the element identifier is updated from the element value A to the element value B representing blue, the colors of the component A, the component B and the component C can be updated from red to blue, thereby realizing the modification of the component colors of a plurality of components.
As shown in fig. 4, the preset element identifier may be "background color", where the initial background colors of the component a, the component B, and the component C may all be blue, and at this time, in order to facilitate that when the background color of any one of the components is modified, the background colors of the remaining components may also be modified accordingly, the "component a: blue, component B: blue, and component C: the writing mode of blue is modified to be component A: @ background color, component B: @ background color, component C: @ background color, and background color: blue ", then when the element update information representation modifies the element value of the element identification, for example, the element update information representation will" background color: blue "updates to" background color: red ", a simultaneous modification of the background color of component a, component B and component C can be achieved.
In this embodiment, by presetting a way that the element identifier is associated with the second component, if the element value of the element identifier is updated by the representation of the element update information, the second component associated with the element update information can be updated uniformly at the same time, so that the efficiency of updating the component can be improved.
Further, step S203 may further include: sending the updated element value of the preset element identifier to the first client 103 and the second client 104; the first client 103 is configured to display an updated component corresponding to the component to be updated according to the updated element value of the preset element identifier; the second client 104 is configured to obtain, according to the updated element value of the preset element identifier, component update information for updating the component to be updated to the updated component.
After determining the updated element value of the preset element identifier, the terminal may further send the updated element value to the server 102, the server 102 may send the updated element value of the preset element identifier to the first client 103 and the second client 104, at this time, the first client 103 may display the component to be updated associated with the element identifier according to the updated element value of the element identifier, and meanwhile, in the second client 104, corresponding component update information may be generated according to the updated element value of the element identifier, and the component update information is used for updating the component to be updated to the updated component.
In this embodiment, the terminal 101 may further synchronize the updated element value of the preset element identifier to the first client 103 and the second client 104, so that after the user updates the element value of the preset element identifier, the user may also update the components associated with the preset element identifier in the first client 103 and the second client 104, thereby ensuring that when the preset element identifier is updated and a plurality of components are updated, the style designs of the plurality of components are matched with the component update information.
In an exemplary embodiment, as shown in fig. 5, the component updating method may further include:
in step S501, in response to the component update request, a component information update page is presented; the component information updating page carries a preview control for previewing the updated component.
The component information update page refers to a presentation interface presented in the terminal 101 and used for updating the style of the component, and as shown in fig. 6, a control for updating the component elements constituting the component, such as multiple component elements, e.g., an element a, an element B, an element C, an element D, and an element E, may be presented in the presentation page, where the element a may represent a color element of the component, the element B represents a font style element of the component, the element C represents a shape of the component, and so on, and if a user needs to modify the color element of the component, the color element may be used as a target component element by clicking the control of the color element, and the updated color may be used as element update information. Meanwhile, a preview control is also displayed in the page, and the preview control can be used for previewing the updated component after the component information is updated in the terminal 101 after the user finishes updating the component information of the component to be updated, namely the updated component.
In step S502, in response to the trigger operation for the preview control, an updated component corresponding to the component to be updated is displayed according to the element update information.
If the user needs to preview the updated component at the terminal 101, the trigger operation for the preview control can be triggered by clicking the preview control, and at this time, the terminal 101 can respond to the trigger operation, so that the updated component is displayed after the component to be updated is updated on the terminal 101 according to the element update information, and the preview of the updated component is realized.
In this embodiment, the user may also perform a trigger operation on a preview control displayed in the component information update page, so that the updated component may be displayed on the terminal 101, thereby implementing preview of the updated component, reducing the modification times of component update, and improving the efficiency of component update.
Further, the target component element includes a color element; the element updating information comprises a color value updated by the component to be updated; step S302 may further include: and displaying the color of the updated component according to the updated color value.
In this embodiment, the element of the component style that needs to be updated may be a color element, the user may modify the color value that is matched with the color element of the component, the color value may be a color number of a certain color, that is, a color number, the user may modify the color number that is matched with the component to be updated, the terminal 101 may regard the modified color number as the color value that is updated after the component is updated, and the corresponding color of the component after the update may be displayed according to the above-mentioned color value after the update.
For example, the color value updated by the component a may be color number a, and the color represented by the color number a may be blue, and then the terminal 101 may display the color of the component according to the color represented by the color number a, that is, by displaying the component in the form of blue.
In this embodiment, if the target component element is a color element, the element update information may be a color value number after color update, so that the terminal 101 may display the updated component according to the color corresponding to the color value, thereby realizing the update of the color of the component to be updated, and ensuring the update accuracy of the color update through the color value.
Further, the updated component states are multiple; as shown in fig. 7, showing the color of the updated component according to the updated color value may further include:
in step S701, a tone rank ordering set in advance for each component state is acquired.
The color level refers to an index standard of the brightness of the image for representing the brightness of the color, and in this embodiment, the same component may contain a plurality of component states, for example component a, which may include a default state, a triggered state when triggered, and a floating state when idle, etc., in order to distinguish each state of the component, the corresponding relation between each component state and the color rank ordering can be preset respectively, a rank ordering of 6 may be set for the default state of the component, a tone ordering of 7 may be set for the trigger state of the component, for the suspension state of the component, the color rank order can be set to 5, and at this time, it can be ensured that the brightness of the component in the default state is higher than the brightness of the component in the suspension state, and the brightness of the component in the trigger state can be higher than the brightness of the component in the default state. The terminal 101 may preset a corresponding relationship between each component state and the color rank ordering, so that the color rank ordering preset by each component state may be obtained.
In step S702, obtaining a plurality of gradation values corresponding to the updated color value, and screening out a target gradation value matching the gradation sequence from the plurality of gradation values;
in step S703, the state of each component of the updated component is presented according to the target grayscale value.
Meanwhile, for the color value of each color, a corresponding relationship between the color value and a plurality of gradation values may also be preset, for example, the corresponding relationship between the color value and the gradation value 1 is the corresponding relationship 1, the corresponding relationship between the color value and the gradation value 2 is the corresponding relationship 2, the corresponding relationship between the color value and the gradation value 3 is the corresponding relationship 3, and the corresponding relationship may be characterized by a function. After the updated color value is determined by the terminal 101, a plurality of gradation values corresponding to the color value can be obtained based on the correspondence, and the gradation value matching the gradation sequence of each component state is screened out from the plurality of gradation values as a target gradation value. And after each target color level value is determined, each component state of the updated component can be respectively displayed according to the target color level value.
For example, the terminal 101 is preset with 10 corresponding relationships between color values and 10 different gradation values, and after the terminal 101 obtains the color value after updating the component a, which may be the color value a, the terminal 101 may respectively obtain 10 gradation values corresponding to the color value a based on the corresponding relationships, and meanwhile, since the terminal 101 is preset with a gradation sequence corresponding to the default state of the component as 6, the gradation value with the gradation sequence of 6 may be selected from the 10 gradation values corresponding to the color value a as a target gradation value corresponding to the default state, so that when the component a is in the default state, the gradation value with the gradation sequence of 6 is displayed, and since the gradation sequence corresponding to the trigger state of the component is 7, the gradation value with the gradation sequence of 7 may be selected from the 10 gradation values corresponding to the color value a as a target gradation value corresponding to the trigger state, thus, when the component a is in the trigger state, it is presented with a color level value in the color level ordering of 7.
Through this embodiment, then can realize showing the different states of subassembly with different gradation values, the corresponding relation of colour value and a plurality of gradation values can be realized through the function in this embodiment simultaneously, only need input a colour value, then can obtain a plurality of gradation values according to the corresponding relation, therefore this mode also can obtain a plurality of gradation values through above-mentioned corresponding relation when this subassembly of colour value representation is the gradient, thereby show different subassembly states, thereby the show mode of subassembly different states has been optimized, the intelligence of the colour show of the different subassembly states of subassembly is improved.
In an exemplary embodiment, a method of component upgrade is also provided, where a design system needs to be upgraded, the management terminal summarizes the upgrading scheme into 5 dimensions of an element A, an element B, an element C, an element D and an element E, in the theme customizing tool, a first client side providing an updating scheme of a component style and a second client side providing the updating scheme of the component style are adopted to achieve a consistent cognitive variable code and a reference rule, 5 dimensional styles of a component element A, an element B, an element C, an element D and an element E are adjusted, after the adjustment is completed, the design file of the first client and the code of the second client may be synchronized, as shown in figure 8, the method can ensure the uniformity of pattern design and component updating information adjustment, and simultaneously reduce the cooperation time of a plurality of users when the design is converted into codes, thereby greatly reducing the workload of both parties.
For example, when the system is upgraded, the theme color needs to be changed from blue to purple, after the management terminal receives the scheme, the color of the component is modified through the theme tool, and after the setting is completed, the design file of the first client and the code of the second client are synchronously updated, so that a plurality of clients can simultaneously receive new themes, and the problem of version misalignment is avoided.
Meanwhile, in order to preserve the consistency of the design, the constituent elements of different components need to be kept consistent, the constituent elements can be divided into 5 dimensions, the common elements are found, a code number is given, and the code number is referred by the front end when the code is written. This can be done by changing one element, multiple components changing in synchronization, as shown in fig. 9.
For example, the elements of the components such as the button, the multi-selection frame, the drop-down frame and the like all have the color number A, and the color number is assigned with a code number: the background color, the previous code writing mode (background: color number A) is changed into (background: @ background color), so that the colors of a plurality of components referring to the code number can be modified by only changing the color number of the background color.
And then, after the management terminal modifies the theme and clicks synchronization, the code value of the component style is uploaded to a database, and the component library files of the first client and the second client are read from the database, so that the modification uniformity of a plurality of clients is ensured.
And the second client downloads the corresponding code value content from the downloading function provided by the theme customizing tool, and directly introduces the downloaded code value content to finish the modification of the component style. The work covered by the second client code and the cooperation cost of the first client and the second client are reduced.
In addition, variable adjustment is carried out on the theme customizing tool, preview is clicked, real-time preview can be carried out, what you see is what you get is, theme setting experience is optimized, and setting efficiency is improved.
Meanwhile, the color taking logic is optimized, the gradient color is increased, the use in special design scenes is met, and the problem that the gradient color is difficult to restore at the second client side is solved.
The method comprises the steps that 1 color number is input through a bottom-layer function of color logic, 10 color levels from light to dark are calculated (the input color number is the 6 th color level), when the components are actually interacted, the default color/the suspension state color/the click state color of the components need to be the same hue and slightly different, so that the default color of the components is the 6 th color level, the suspension state color is the 5 th color stage, and the click state color is the 7 th color level, and therefore, only the color of the default state is required to be modified, and the colors of other states can be modified through calculation functions. Compared with the original mode, the color taking function can support calculation of gradient colors, and after optimization, 10 color levels of the gradient colors are calculated and applied to the effect of each state of the component.
Through the embodiment, after the theme setting is completed, the theme can be synchronized to the first client and the second client, the labor cost is greatly reduced, the corresponding relation between the code and the basic variable is managed on the theme customizing tool, the basic element value corresponding to the code is modified, a plurality of assemblies with the modified codes can be synchronously modified and quoted, the operation efficiency is greatly improved, meanwhile, the real-time preview can be realized, the efficiency of updating the set assemblies is improved, and the color taking logic is optimized to support the application of the gradient color to various assembly states of the assemblies.
It should be understood that, although the steps in the flowcharts of the present disclosure are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed alternately or in alternation with other steps or at least some of the other steps or stages.
It is understood that the same/similar parts among the various embodiments of the method described above in this specification can be referred to each other, and each embodiment focuses on the differences from the other embodiments, and where relevant, reference may be made to the description of the other method embodiments.
Fig. 10 is a block diagram illustrating a component update apparatus according to an example embodiment. Referring to fig. 10, the apparatus includes an update information acquisition unit 1001, an update component determination unit 1002, and an update information synchronization unit 1003.
An update information acquisition unit 1001 configured to perform acquisition of element update information for a target component element in response to a component update request;
an update component determination unit 1002 configured to perform determining a corresponding component to be updated according to the element update information;
an update information synchronization unit 1003 configured to perform transmitting element update information to the first client and the second client in response to the element information synchronization request; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining the component updating information used for updating the component to be updated to the updated component according to the element updating information.
In an exemplary embodiment, the update component determination unit 1002 is further configured to perform obtaining an information type represented by element update information; and determining the component to be updated based on the information type.
In an exemplary embodiment, the updating component determining unit 1002 is further configured to perform, if the information type is a first type characterizing updating of an element value of a target component element in the first component, regarding the first component as a component to be updated.
In an exemplary embodiment, the updating component determining unit 1002 is further configured to obtain a second component associated with the preset element identifier if the information type is a second type characterizing that the element value of the preset element identifier is updated; presetting element identification for identifying element value of target component element in second component; and taking the second component as the component to be updated.
In an exemplary embodiment, the update information synchronization unit 1003 is further configured to perform sending the updated element value of the preset element identifier to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the updated element value of the preset element identifier; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element value updated by the preset element identifier.
In an exemplary embodiment, the component updating apparatus further includes: an update component preview unit configured to perform presentation of a component information update page in response to a component update request; the component information updating page carries a preview control for previewing the updated component; and responding to the trigger operation aiming at the preview control, and displaying the updated component corresponding to the component to be updated according to the element updating information.
In an exemplary embodiment, the target component element comprises a color element; the element updating information comprises a color value updated by the component to be updated; and the updating component previewing unit is further configured to display the color of the updated component according to the updated color value.
In an exemplary embodiment, the component state of the updated component is plural; an updating component preview unit, further configured to execute obtaining a color rank ordering preset for each component state; obtaining a plurality of color gradation values corresponding to the updated color values, and screening out a target color gradation value matched with the color gradation sequence from the plurality of color gradation values; and displaying the states of all the updated components according to the target color level values.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 11 is a block diagram illustrating an electronic device 1100 for component updating in accordance with an exemplary embodiment. For example, the electronic device 1100 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so forth.
Referring to fig. 11, electronic device 1100 may include one or more of the following components: processing component 1102, memory 1104, power component 1106, multimedia component 1108, audio component 1110, input/output (I/O) interface 1112, sensor component 1114, and communications component 1116.
The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1102 may include one or more processors 1120 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1102 may include one or more modules that facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
The memory 1104 is configured to store various types of data to support operations at the electronic device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1104 may be implemented by any type or combination of volatile or non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
The power component 1106 provides power to the various components of the electronic device 1100. The power components 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1100.
The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, audio component 1110 further includes a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1114 includes one or more sensors for providing various aspects of state assessment for the electronic device 1100. For example, the sensor assembly 1114 may detect an open/closed state of the electronic device 1100, the relative positioning of components, such as a display and keypad of the electronic device 1100, the sensor assembly 1114 may also detect a change in position of the electronic device 1100 or components of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, orientation or acceleration/deceleration of the device 1100, and a change in temperature of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 1104 comprising instructions, executable by the processor 1120 of the electronic device 1100 to perform the method described above is also provided. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which includes instructions executable by the processor 1120 of the electronic device 1100 to perform the above-described method.
It should be noted that the descriptions of the above-mentioned apparatus, the electronic device, the computer-readable storage medium, the computer program product, and the like according to the method embodiments may also include other embodiments, and specific implementations may refer to the descriptions of the related method embodiments, which are not described in detail herein.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A component upgrade method, comprising:
in response to the component update request, obtaining element update information for the target component element;
determining a corresponding component to be updated according to the element updating information;
responding to an element information synchronization request, and sending the element updating information to a first client and a second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining the component updating information used for updating the component to be updated to the updated component according to the element updating information.
2. The method according to claim 1, wherein the determining a corresponding component to be updated according to the element update information comprises:
acquiring the information type represented by the element updating information;
and determining the component to be updated based on the information type.
3. The method of claim 2, wherein the determining the component to be updated based on the information type comprises:
and if the information type is a first type representing that the element value of the target assembly element in the first assembly is updated, taking the first assembly as the assembly to be updated.
4. The method of claim 2, wherein the determining the component to be updated based on the information type comprises:
if the information type is a second type representing that the element value of a preset element identifier is updated, acquiring a second component associated with the preset element identifier; the preset element identification is used for identifying an element value of a target component element in the second component;
and taking the second component as the component to be updated.
5. The method of claim 4, wherein sending the element update information to the first client and the second client comprises:
sending the updated element value of the preset element identifier to the first client and the second client; the first client is used for displaying the updated component corresponding to the component to be updated according to the element value updated by the preset element identifier; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element value updated by the preset element identifier.
6. The method of claim 1, further comprising:
in response to the component update request, presenting a component information update page; the component information updating page carries a preview control for previewing the updated component;
and responding to the trigger operation aiming at the preview control, and displaying the updated component corresponding to the component to be updated according to the element updating information.
7. A component update apparatus, comprising:
an update information acquisition unit configured to perform acquisition of element update information for a target component element in response to a component update request;
the updating component determining unit is configured to determine a corresponding component to be updated according to the element updating information;
an update information synchronization unit configured to perform sending of the element update information to the first client and the second client in response to the element information synchronization request; the first client is used for displaying the updated component corresponding to the component to be updated according to the element updating information; and the second client is used for obtaining component updating information used for updating the component to be updated to the updated component according to the element updating information.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the component updating method of any of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the component update method of any of claims 1-6.
10. A computer program product comprising instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the component updating method of any of claims 1 to 6.
CN202210533348.1A 2022-05-17 2022-05-17 Component updating method and device, electronic equipment and storage medium Pending CN114924769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210533348.1A CN114924769A (en) 2022-05-17 2022-05-17 Component updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210533348.1A CN114924769A (en) 2022-05-17 2022-05-17 Component updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114924769A true CN114924769A (en) 2022-08-19

Family

ID=82809130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210533348.1A Pending CN114924769A (en) 2022-05-17 2022-05-17 Component updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114924769A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686723A (en) * 2022-11-11 2023-02-03 北京百度网讯科技有限公司 Theme style file generation method, device, equipment, storage medium and product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860344A (en) * 2021-02-19 2021-05-28 中国工商银行股份有限公司 Component processing method and device, electronic equipment and storage medium
CN114168132A (en) * 2021-11-11 2022-03-11 北京达佳互联信息技术有限公司 Method and device for managing component style, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860344A (en) * 2021-02-19 2021-05-28 中国工商银行股份有限公司 Component processing method and device, electronic equipment and storage medium
CN114168132A (en) * 2021-11-11 2022-03-11 北京达佳互联信息技术有限公司 Method and device for managing component style, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686723A (en) * 2022-11-11 2023-02-03 北京百度网讯科技有限公司 Theme style file generation method, device, equipment, storage medium and product

Similar Documents

Publication Publication Date Title
US10722796B2 (en) Dressing method, device, computer readable medium, and electronic device
CN109360261B (en) Image processing method, image processing device, electronic equipment and storage medium
CN104850643B (en) Picture comparison method and device
CN113596175A (en) Scene synchronization method, terminal, server and system
CN105677352B (en) Method and device for setting application icon color
CN114924769A (en) Component updating method and device, electronic equipment and storage medium
CN112616053B (en) Transcoding method and device for live video and electronic equipment
CN112199552B (en) Video image display method and device, electronic equipment and storage medium
CN111176528B (en) Control method, control device, electronic equipment and computer readable storage medium
CN114268802B (en) Virtual space display method and device, electronic equipment and storage medium
CN110457084B (en) Loading method and device
CN113778398A (en) Code generation method and device, electronic equipment and storage medium
CN113919311A (en) Data display method and device, electronic equipment and storage medium
CN112230982A (en) Material processing method and device, electronic equipment and storage medium
CN114385373A (en) Data sharing method, data sharing device and computer readable storage medium
CN113467853B (en) Data processing method, apparatus, device, storage medium, and program product
EP2940981B1 (en) Method and device for synchronizing photographs
CN114697723B (en) Video generation method, device and medium
CN111580875B (en) Parameter configuration method, device and storage medium
CN111538544B (en) Method and device for displaying configuration data, electronic equipment and storage medium
CN112015419A (en) Interface element color setting method and device, electronic equipment and storage medium
CN114020232A (en) Interactive element display method and device, electronic equipment and storage medium
CN116842923A (en) Medium information generation method, device, electronic equipment and storage medium
CN114661487A (en) Data processing method and device, electronic equipment and storage medium
CN115937350A (en) Picture editing method and device, electronic equipment and storage medium

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