CN118093072A - Method, device, electronic equipment and storage medium for processing component - Google Patents

Method, device, electronic equipment and storage medium for processing component Download PDF

Info

Publication number
CN118093072A
CN118093072A CN202311664463.3A CN202311664463A CN118093072A CN 118093072 A CN118093072 A CN 118093072A CN 202311664463 A CN202311664463 A CN 202311664463A CN 118093072 A CN118093072 A CN 118093072A
Authority
CN
China
Prior art keywords
component
page
item
information
mapping information
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
CN202311664463.3A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311664463.3A priority Critical patent/CN118093072A/en
Publication of CN118093072A publication Critical patent/CN118093072A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for processing components, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generation model, and generating item mapping information of the assembly items, wherein the item mapping information comprises item classes of the assembly items corresponding to the assembly set; responding to a page loading instruction, acquiring a corresponding page identifier, and inquiring corresponding page information to determine component association information in the page information; and calling corresponding item mapping information based on the component association information to acquire a target item class, and loading corresponding component items based on the target item class. According to the embodiment, the problem that when components used for developing the page are updated or changed, the page needs to be reconstructed and deployed, so that page resources are invalid and the page cannot be used is solved.

Description

Method, device, electronic equipment and storage medium for processing component
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for processing a component, an electronic device, and a storage medium.
Background
In the scenario of developing a front-end page or the like, in order to simplify the development process, componentization becomes an important development mode of the front-end page. In the related art, various types and functions of components are usually generated in advance, and the generated components can be used for constructing and deploying the page when developing the front-end page. However, when components used for developing the page are updated or changed, the page which depends on the components needs to be reconstructed, so that page resources are easy to lose, and the page cannot be used.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for processing a component, which can solve the problem that when a component used for developing a page is upgraded or changed, the page needs to be reconstructed and deployed, resulting in failure of page resources, and thus the page cannot be used.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a method of component processing.
The method for processing the component comprises the following steps: acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generation model, and generating item mapping information of the assembly items, wherein the item mapping information comprises item classes of the assembly items corresponding to the assembly set;
responding to a page loading instruction, acquiring a corresponding page identifier, and inquiring corresponding page information to determine component association information in the page information;
and calling corresponding item mapping information based on the component association information to acquire a target item class, and loading corresponding component items based on the target item class.
In one embodiment, further comprising:
Responding to a component updating instruction, and acquiring the updated component to construct a corresponding new component item;
and calling the preset generation model to generate item mapping information of the new component item, and replacing the updated item mapping information to the page information.
In yet another embodiment, invoking a preset generation model to generate item mapping information for the component items includes:
Acquiring data information associated with the component to generate a project class of the component;
item mapping information is generated based on the correspondence between the item class and the component.
In yet another embodiment, obtaining the data information associated with the component to generate the item class for the component includes:
and acquiring data information associated with the component to generate a project class of the component based on a preset hash algorithm.
In yet another embodiment, before the responding to the page load instruction, the method further includes:
Responding to the development instruction of the page, acquiring corresponding component information, and inquiring item mapping information associated with the component information;
And calling a component loading template to generate a component loader based on the project mapping information, and executing a development program of the page based on the component loader.
In yet another embodiment, generating the item mapping information for the component items includes:
and performing packaging operation on the component items to generate item mapping information of the component items.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided an apparatus for processing a component.
The device for processing the component comprises: the generating unit is used for acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generating model, and generating item mapping information of the assembly items, wherein the item mapping information comprises item classes of the assembly items corresponding to the assembly set;
the determining unit is used for responding to the page loading instruction, acquiring a corresponding page identifier, inquiring corresponding page information and determining component association information in the page information;
And the loading unit is used for calling corresponding item mapping information based on the component association information so as to acquire a target item class, and loading corresponding component items based on the target item class.
In one embodiment, the apparatus further comprises:
The construction unit is used for responding to the component updating instruction, acquiring the updated component to construct a corresponding new component item;
and the updating unit is used for calling the preset generation model to generate the item mapping information of the new component item and replacing the updated item mapping information to the page information.
In one embodiment, the generating unit is specifically configured to:
Acquiring data information associated with the component to generate a project class of the component;
item mapping information is generated based on the correspondence between the item class and the component.
In one embodiment, the generating unit is specifically configured to:
and acquiring data information associated with the component to generate a project class of the component based on a preset hash algorithm.
In one embodiment, the apparatus further comprises:
Query unit: responding to the development instruction of the page, acquiring corresponding component information, and inquiring item mapping information associated with the component information;
and the execution unit is used for calling the component loading template to generate a component loading program based on the project mapping information and executing the development program of the page based on the component loading program.
In one embodiment, the generating unit is specifically applied to:
and performing packaging operation on the component items to generate item mapping information of the component items.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method for processing the components provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements a method for processing components provided by the embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product of an embodiment of the present invention includes a computer program that, when executed by a processor, implements a method for processing components provided by the embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, corresponding component items can be constructed for each component first, so that item mapping information of the component items is generated, and because the item mapping information comprises item classes of each component item, an entry for calling the component items can be determined through calling the item mapping information, and then calling of preset components can be realized; therefore, when responding to the page loading instruction, the page information corresponding to the page identification can be acquired first, and then the item mapping information corresponding to the component association information is called, so that the component item is called and loaded, and the page is loaded. In the embodiment of the invention, corresponding component items can be constructed for the preset components to generate item mapping information, and the loading flow of the components is realized through the item mapping information in the page loading process, so that when the components are updated or upgraded, only the item mapping information is required to be regenerated, and the item mapping information in the page loading process is required to be reloaded, and the page depending on the components is not required to be reconstructed and deployed, thereby avoiding the problem that page resources are invalid and the page cannot be used.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of one main flow of a method of component processing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of yet another main flow of a method of component processing according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main units of an apparatus for component handling according to an embodiment of the invention;
FIG. 4 is a diagram of an exemplary system architecture in which embodiments of the present invention may be applied;
FIG. 5 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the application and features of the embodiments may be combined with each other without conflict. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The embodiment of the invention provides a component processing system which can be used for loading a component in a page, in particular for loading the page in a scene of upgrading or updating the component. Since development of each project part often encounters depending component implementation during page development, when a component is upgraded or updated, reloading and deployment of each item depending on the component are required, for example, for a page in a browser, each page is loaded and cached based on user access, if the component is updated by caching the page, the content already loaded and cached in the browser is not applicable, so that problems such as page processing or page content loading are easily caused.
An embodiment of the present invention provides a method for processing a component, which may be performed by a component processing system, as shown in fig. 1, and includes:
S101: acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generation model, and generating item mapping information of the assembly items.
The project mapping information comprises project classes of the component projects corresponding to the component sets.
The set of components may include at least one component, and may specifically be a common component or the like that is required to be used in a scenario such as page development. For each component in the component set, a component item may be constructed, and a construction manner may not be limited, for example, in the embodiment of the present invention, the component item may be a component library, and may specifically be constructed by maven (an item management tool). Component items constructed in embodiments of the present invention depend on the corresponding component.
In the embodiment of the present invention, when the component set includes a plurality of components, the corresponding component items may be constructed based on the usage manner of the components. For example, each component is used individually, so that a component item corresponding to each component can be constructed, and for components that can be used simultaneously, a component item corresponding to the same can be constructed.
The generating model is preconfigured and can be used for generating project mapping information of component projects, the project mapping information can be a JS (a lightweight, interpreted or just-in-time compiling type programming language with function priority) file, the project mapping information comprises project classes of component projects corresponding to component sets, the project classes can be function inlets, such as main, and the project classes can be used for realizing calling of the component projects and further calling of the components. Specifically, the item class may be expressed as main.[ contnenthash ]. Js.
Specifically, in the embodiment of the present invention, the item class may be generated based on the data information of the component, for example, may be generated based on the content of the component item file, so this step may be performed as follows: acquiring data information associated with the component to generate a project class of the component; item mapping information is generated based on correspondence between item classes and components.
The algorithm for generating the item class can be preset in the embodiment of the invention, and the algorithm can be specifically sent by hash, so that the data information related to the component can be acquired in the step to generate the item class of the component based on the preset hash algorithm. For example, in the embodiment of the invention, the component items can be processed in a webpack packaging manner, so that a JS file can be obtained, and the name of the JS file can be provided with a contenthash value, namely, the item class representing the component.
In one implementation manner, the item mapping information may be generated in a packing manner in the embodiment of the present invention, so this step may be performed as follows: a packing operation is performed on the component items to generate item mapping information for the component items.
In the embodiment of the invention, the project mapping information is equivalent to the dependency map of the component project, and can be specifically expressed as main fest. Json, wherein the mapping relation between the project class and the component project can be established, and further the invoking of the component project is realized through the project class, so that when the page is developed, the page development can be directly performed on the component to be used through the project mapping information instead of the page development by directly using the content of the component, thereby realizing the simplification of the page development and simultaneously realizing the dynamic invoking of the component when the page is loaded.
Specifically, in the embodiment of the invention, the component loading template can be preset to realize the development and use of the component association information in the page information through the component loading template, so when the page needs to be developed, the method can be executed as follows: responding to a development instruction of the page, acquiring corresponding component information, and inquiring project mapping information associated with the component information; the component loading template is invoked to generate a component loader based on the project mapping information, and the development program of the page is executed based on the component loader.
The development instructions may be user input. The component loading template can be provided with a replacement bit of the component association information, when the component is used in page development, the component association information of the component to be used in development is replaced into the component loading template to generate a loading program of the component, and then the component loading program used in page development is generated by combining with page development, so that the development program of the page can be executed. In the embodiment of the invention, the component association information can be specifically mail fest. Json, namely, mail fest. Json corresponding to the component to be used in the page development is replaced to the component loading template, and the replaced component loading program is further updated to the page development program, so that the developed page program can be obtained.
S102: and responding to the page loading instruction, acquiring a corresponding page identifier, and inquiring corresponding page information to determine the component association information in the page information.
The page loading instruction may be sent from the front end of the page, specifically, may be input to the front end page after operations such as clicking by a user, and then sent to the back end. For example, for a browser page, a user may input a page load instruction through the displayed browser page. The page load instruction may include page information, such as URL (Uniform Resource Locator ) and address of the page, so that the page identifier may be determined. After the page identification is determined, the page information of the page to be loaded can be determined, and further the component association information forming the page can be determined from the page information.
Specifically, in the embodiment of the present invention, the component association information may be item mapping information, or may be information that may acquire item mapping information.
In the page loading process, the page information may be specifically a page program generated during page development, and the corresponding page may be generated by running the page program. In the embodiment of the invention, the page development depends on a certain component, and the page information comprises component related information, such as project mapping information, so that the component project can be conveniently called through the project mapping information. In the embodiment of the present invention, the item mapping information may be a file, and the page information may include a file identifier of the item mapping information, such as a file name.
S103: and calling corresponding item mapping information based on the component association information to acquire a target item class, and loading corresponding component items based on the target item class.
In this step, corresponding item mapping information can be determined through the component association information, and then the item mapping information is called to obtain a target item class included in the item mapping information, and then the corresponding component item is loaded through the target item class.
Because the item class is associated with the corresponding component in the embodiment of the invention, the corresponding component item can be acquired through operating the item class, and the loading of the corresponding component is further realized.
In the embodiment of the invention, the loading of the component items can be realized through the item mapping information, so that the loading of the components in the page is realized, and after all the component items included in the page information are completed, the page to be recorded can be obtained by combining other contents in the page information, and further, the rendering and the display of the loaded page can be executed.
In the embodiment of the invention, in a scene that the preset component needs to be updated or upgraded, the component item can be regenerated for the component so as to generate new item mapping information, thereby realizing the update of the component item and the item mapping information, further updating the corresponding component relation in the page information, and further realizing the hot replacement of the page information without redeploying the page information during the updating of the component. The present step can be specifically performed as: responding to the component updating instruction, acquiring an updated component to construct a corresponding new component item; and calling a preset generation model to generate item mapping information of the new component item, and replacing the updated item mapping information to the page information.
In the embodiment of the invention, because the project information can comprise project mapping information, in order to reduce the influence of component upgrading on page information, when the project mapping information of a new component project is generated, only the content of the project mapping information can be updated, for example, a new project class can be generated to update the project mapping information, and the identifications and the like of the project mapping information are not updated, so that the project mapping information in the page information does not need to be changed, after the component is updated, the page is still invoked through the project mapping information, and because the project mapping information is updated, the invoking of the updated component is realized in the invoking process, so that the page is loaded with the updated component, namely, the influence of the component updating process on page loading and processing is reduced.
In one implementation of the embodiment of the present invention, each component may be used in combination, so after generating item mapping information of a component item, an association relationship of each component used in combination, that is, a call relationship between each component used in combination, may be constructed, and combination information representing the combination component is generated, so that pages relying on the combination component may generate page information based on the combination information. The association relationship may specifically be a tree structure, the root node of the tree structure is combination information, and leaf nodes of the tree structure are generated based on the calling relationship through item mapping information of each component. When a page loading instruction is responded, determining that the association relation of the components in the page information is the combination information, determining the association relation of each combined component through the combination information, and further sequentially calling the project mapping information of each component according to the established association relation to acquire the project class of each component project, thereby loading the component projects of the combined component.
Furthermore, after each component is updated or upgraded, the project mapping information of each component can be regenerated, and further the project mapping information regenerated in the association relation of each combined use component can be updated, but the combined information is not required to be updated, so that the page content of the page depending on the combined component can be used for the updated or upgraded component in time without redeployment.
It should be noted that, in the embodiment of the present invention, an implementation model of hot replacement of the component association information in the page information may be preconfigured, which is not limited herein.
In the embodiment of the invention, corresponding component items can be constructed for each component first, so that item mapping information of the component items is generated, and because the item mapping information comprises item classes of each component item, an entry for calling the component items can be determined through calling the item mapping information, and then calling of preset components can be realized; therefore, when responding to the page loading instruction, the page information corresponding to the page identification can be acquired first, and then the item mapping information corresponding to the component association information is called, so that the component item is called and loaded, and the page is loaded. In the embodiment of the invention, corresponding component items can be constructed for the preset components to generate item mapping information, and the loading flow of the components is realized through the item mapping information in the page loading process, so that when the components are updated or upgraded, only the item mapping information is required to be regenerated, and the item mapping information in the page loading process is required to be reloaded, and the page depending on the components is not required to be reconstructed and deployed, thereby avoiding the problem that page resources are invalid and the page cannot be used.
The method for processing components in the embodiment of the present invention will be specifically described with reference to the embodiment shown in fig. 1, and as shown in fig. 2, the method includes:
s201: acquiring a preset assembly set, and constructing corresponding assembly items based on the assembly set.
S202: and calling a preset generation model to generate item mapping information of the component items.
S203: and responding to the page loading instruction, acquiring a corresponding page identifier, and inquiring corresponding page information to determine the component association information in the page information.
S204: and calling corresponding item mapping information based on the component association information to acquire a target item class, and loading corresponding component items based on the target item class.
S205: and responding to the component updating instruction, and acquiring the updated component to construct a corresponding new component item.
S206: and calling the preset generation model to generate item mapping information of the new component item, and replacing the updated item mapping information to the page information.
It should be noted that, in the embodiment of the present invention, the data processing principle is the same as the corresponding data processing principle in the embodiment shown in fig. 1, and will not be described herein.
In the embodiment of the invention, corresponding component items can be constructed for the preset components to generate item mapping information, and the loading flow of the components is realized through the item mapping information in the page loading process, so that when the components are updated or upgraded, only the item mapping information is required to be regenerated, and the item mapping information in the page loading process is required to be reloaded, and the page depending on the components is not required to be reconstructed and deployed, thereby avoiding the problem that page resources are invalid and the page cannot be used.
In order to solve the problems existing in the prior art, an embodiment of the present invention provides an apparatus 300 for processing a component, as shown in fig. 3, the apparatus 300 includes:
The generating unit 301 is configured to obtain a preset component set, construct a corresponding component item based on the component set, invoke a preset generating model, and generate item mapping information of the component item, where the item mapping information includes item classes corresponding to each component item in the component set;
The determining unit 302 is configured to obtain a corresponding page identifier in response to a page loading instruction, and query corresponding page information to determine component association information in the page information;
And the loading unit 303 is configured to invoke corresponding item mapping information based on the component association information to obtain a target item class, and load a corresponding component item based on the target item class.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 1, and will not be described herein.
In one embodiment, the apparatus 300 further comprises:
The construction unit is used for responding to the component updating instruction, acquiring the updated component to construct a corresponding new component item;
and the updating unit is used for calling the preset generation model to generate the item mapping information of the new component item and replacing the updated item mapping information to the page information.
In one embodiment, the generating unit 301 is specifically configured to:
Acquiring data information associated with the component to generate a project class of the component;
item mapping information is generated based on the correspondence between the item class and the component.
In one embodiment, the generating unit 301 is specifically configured to:
and acquiring data information associated with the component to generate a project class of the component based on a preset hash algorithm.
In one embodiment, the apparatus 300 further comprises:
Query unit: responding to the development instruction of the page, acquiring corresponding component information, and inquiring item mapping information associated with the component information;
and the execution unit is used for calling the component loading template to generate a component loading program based on the project mapping information and executing the development program of the page based on the component loading program.
In one embodiment, the generating unit 301 is specifically applied to:
and performing packaging operation on the component items to generate item mapping information of the component items.
It should be understood that the manner of implementing the embodiments of the present invention is the same as that of implementing the embodiments shown in fig. 1 and 2, and will not be described herein.
In the embodiment of the invention, corresponding component items can be constructed for each component first, so that item mapping information of the component items is generated, and because the item mapping information comprises item classes of each component item, an entry for calling the component items can be determined through calling the item mapping information, and then calling of preset components can be realized; therefore, when responding to the page loading instruction, the page information corresponding to the page identification can be acquired first, and then the item mapping information corresponding to the component association information is called, so that the component item is called and loaded, and the page is loaded. In the embodiment of the invention, corresponding component items can be constructed for the preset components to generate item mapping information, and the loading flow of the components is realized through the item mapping information in the page loading process, so that when the components are updated or upgraded, only the item mapping information is required to be regenerated, and the item mapping information in the page loading process is required to be reloaded, and the page depending on the components is not required to be reconstructed and deployed, thereby avoiding the problem that page resources are invalid and the page cannot be used.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic equipment of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor performs the method for processing the component provided by the embodiment of the invention.
Fig. 4 illustrates an exemplary system architecture 400 of a component processing method or device to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various client applications may be installed on the terminal devices 401, 402, 403, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 401, 402, 403. The background management server may analyze and process the received data such as the product information query request, and feed back the processing result (e.g., product information—only an example) to the terminal device.
It should be noted that, the method for processing components provided in the embodiment of the present invention is generally performed by the server 405, and accordingly, the device for processing components is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing embodiments of the present invention. The computer system illustrated in fig. 5 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit, a determining unit, an acquiring unit, and a comparing unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, a receiving unit may also be described as a "unit of the function of the receiving unit".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method of component processing provided by the present invention.
As another aspect, the present invention also provides a computer program product, including a computer program, where the program when executed by a processor implements a method for processing a component provided by an embodiment of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of component handling, comprising:
Acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generation model, and generating item mapping information of the assembly items, wherein the item mapping information comprises item classes of the assembly items corresponding to the assembly set;
responding to a page loading instruction, acquiring a corresponding page identifier, and inquiring corresponding page information to determine component association information in the page information;
and calling corresponding item mapping information based on the component association information to acquire a target item class, and loading corresponding component items based on the target item class.
2. The method as recited in claim 1, further comprising:
Responding to a component updating instruction, and acquiring the updated component to construct a corresponding new component item;
and calling the preset generation model to generate item mapping information of the new component item, and replacing the updated item mapping information to the page information.
3. The method of claim 1, wherein invoking a preset generation model to generate item mapping information for the component items comprises:
Acquiring data information associated with the component to generate a project class of the component;
item mapping information is generated based on the correspondence between the item class and the component.
4. A method according to claim 3, wherein obtaining data information associated with the component to generate a project class for the component comprises:
and acquiring data information associated with the component to generate a project class of the component based on a preset hash algorithm.
5. The method of claim 1, wherein prior to responding to the page load instruction, further comprising:
Responding to the development instruction of the page, acquiring corresponding component information, and inquiring item mapping information associated with the component information;
And calling a component loading template to generate a component loader based on the project mapping information, and executing a development program of the page based on the component loader.
6. The method of claim 1, wherein generating item mapping information for the component items comprises:
and performing packaging operation on the component items to generate item mapping information of the component items.
7. An apparatus for processing a component, comprising:
the generating unit is used for acquiring a preset assembly set, constructing corresponding assembly items based on the assembly set, calling a preset generating model, and generating item mapping information of the assembly items, wherein the item mapping information comprises item classes of the assembly items corresponding to the assembly set;
the determining unit is used for responding to the page loading instruction, acquiring a corresponding page identifier, inquiring corresponding page information and determining component association information in the page information;
And the loading unit is used for calling corresponding item mapping information based on the component association information so as to acquire a target item class, and loading corresponding component items based on the target item class.
8. The apparatus of claim 7, wherein the apparatus further comprises:
The construction unit is used for responding to the component updating instruction, acquiring the updated component to construct a corresponding new component item;
and the updating unit is used for calling the preset generation model to generate the item mapping information of the new component item and replacing the updated item mapping information to the page information.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
11. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any of claims 1-6.
CN202311664463.3A 2023-12-06 2023-12-06 Method, device, electronic equipment and storage medium for processing component Pending CN118093072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311664463.3A CN118093072A (en) 2023-12-06 2023-12-06 Method, device, electronic equipment and storage medium for processing component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311664463.3A CN118093072A (en) 2023-12-06 2023-12-06 Method, device, electronic equipment and storage medium for processing component

Publications (1)

Publication Number Publication Date
CN118093072A true CN118093072A (en) 2024-05-28

Family

ID=91157934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311664463.3A Pending CN118093072A (en) 2023-12-06 2023-12-06 Method, device, electronic equipment and storage medium for processing component

Country Status (1)

Country Link
CN (1) CN118093072A (en)

Similar Documents

Publication Publication Date Title
CN108920222B (en) Business processing method and device based on rule engine
CN109062563B (en) Method and device for generating page
CN113760324A (en) Method and device for constructing micro front-end application
CN111045833A (en) Interface calling method and device
CN111427701A (en) Workflow engine system and business processing method
CN113010405A (en) Application program testing method and device
CN113821352A (en) Remote service calling method and device
CN110888639A (en) Business code compiling and packaging method and device
CN115617420A (en) Application program generation method, device, equipment and storage medium
CN112835568A (en) Project construction method and device
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
CN112596854A (en) Method and device for continuously integrating running of assembly line
CN111382953A (en) Dynamic process generation method and device
CN112084254A (en) Data synchronization method and system
CN113779122B (en) Method and device for exporting data
CN113760487B (en) Service processing method and device
CN112835609B (en) Method and device for modifying download address of dependent packet
CN118093072A (en) Method, device, electronic equipment and storage medium for processing component
CN112099841A (en) Method and system for generating configuration file
CN111984616A (en) Method, device and system for updating shared file
CN110727739B (en) Data storage method and device
CN112925573B (en) Method, device, equipment and computer readable medium for loading web page
CN113495747B (en) Gray scale release method and device
CN108984189B (en) Module parsing method and device
CN113760316A (en) Application configuration system and method

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