A data multiplexing method and device, electronic equipment and storage medium

By responding to configuration commands in the micro-frontend framework, determining and loading reusable data, the problem of duplicate code in business systems is solved, development efficiency and communication stability are improved, and data unification between applications is achieved.

CN115373667BActive Publication Date: 2026-04-14CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In micro-frontend frameworks, applications in business systems contain a large amount of duplicate code, leading to data redundancy and impacting development efficiency.

Method used

By responding to configuration commands in the business system, reuse information is determined, and reuse data is selected and loaded from the alternative data, including data from other applications and independent configuration data. Module federation is used for data reuse to ensure communication consistency between applications.

Benefits of technology

It reduces duplicate code in applications, improves development efficiency, reduces resource consumption, achieves information unification between applications, and ensures the reliability and stability of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115373667B_ABST
    Figure CN115373667B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of software development, and provide an application data multiplexing method and device, electronic equipment and storage medium. The method comprises: in response to a configuration instruction for any application in a business system, determining information representing multiplexing in the configuration instruction; based on the information representing multiplexing, determining multiplexing data corresponding to the configuration instruction from alternative data; wherein the alternative data comprises data in other applications in the business system and independently configured data; and loading the multiplexing data into the application. In this embodiment, the data already configured in the application or the independently configured data is multiplexed, which reduces repeated codes in different applications, not only reduces resource occupation, but also improves the development efficiency of applications in the business system; and through sharing data between applications, the information between the applications is more unified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software development technology, and in particular to an application data reuse method, apparatus, electronic device, and storage medium. Background Technology

[0002] As business systems and applications continue to evolve, business demands also increase. Some business systems are adopting micro-frontend frameworks for project integration. Micro-frontend frameworks apply the microservice concept to the browser side, transforming applications from single monolithic applications into applications that aggregate multiple frontend applications into one. Each frontend application can run, be developed, and deployed independently.

[0003] While micro-frontend frameworks achieve application deployment separation and business logic separation, a large amount of code can appear in the applications within the business system, with duplicate code existing across different applications. This data redundancy across numerous applications impacts development efficiency. Summary of the Invention

[0004] This application provides an application data reuse method, apparatus, electronic device, and storage medium to reduce data redundancy in applications.

[0005] In a first aspect, embodiments of this application provide an application data reuse method, the method comprising:

[0006] In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction;

[0007] Based on the information of the representation reuse, the reused data corresponding to the configuration instruction is determined from the candidate data; wherein, the candidate data includes data from other applications in the business system and independent configuration data;

[0008] The reused data is loaded into the application.

[0009] The above solution reduces duplicate code across different applications by reusing data that has already been configured or independently configured in the application. This not only reduces resource consumption but also improves the development efficiency of applications in the business system. Furthermore, by sharing data among applications, the information among these applications becomes more unified.

[0010] In some optional implementations, the information representing reuse includes a reused data identifier and a reused version identifier; determining the reused data corresponding to the configuration instruction from the candidate data includes:

[0011] The reused data identifier is compared with the data identifier of each candidate data;

[0012] Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reused data identifier;

[0013] Select the reused data corresponding to the reused version identifier from the target candidate data.

[0014] In some optional implementations, after comparing the reused data identifier with the data identifiers of each candidate data, the method further includes:

[0015] If there is no target candidate data among the candidate data, the application and the information on the representation reuse will be notified through a preset notification method.

[0016] In some optional implementations, after selecting the target candidate data from the candidate data, the method further includes:

[0017] If there is no reused data corresponding to the reused version identifier in the target candidate data, a version management notification for the target candidate data will be sent through a preset notification method.

[0018] In some optional implementations, the reused data includes communication information; wherein the communication information is information characterizing the communication method between applications of the business system.

[0019] In some optional implementations, the method further includes:

[0020] Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

[0021] Secondly, embodiments of this application also provide an application data multiplexing apparatus, the apparatus comprising:

[0022] The reuse information determination module is used to determine the information representing reuse in the configuration instruction in response to a configuration instruction for any application in the business system.

[0023] The data selection module is used to determine the reused data corresponding to the configuration instruction from the candidate data based on the information of the representation reuse; wherein, the candidate data includes data from other applications in the business system and independent configuration data;

[0024] The loading module is used to load the multiplexed data into the application.

[0025] In some optional implementations, the information representing the reuse includes a reused data identifier and a reused version identifier; the data selection module is specifically used for:

[0026] The reused data identifier is compared with the data identifier of each candidate data;

[0027] Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reused data identifier;

[0028] Select the reused data corresponding to the reused version identifier from the target candidate data.

[0029] In some alternative implementations, a notification module is also included for:

[0030] After the data selection module compares the reused data identifier with the data identifiers of each candidate data, if there is no target candidate data among the candidate data, the application and the information on the reused representation are notified through a preset notification method.

[0031] In some alternative implementations, a notification module is also included for:

[0032] After the data selection module selects target candidate data from the candidate data, if there is no reuse data corresponding to the reuse version identifier in the target candidate data, a version management notification for the target candidate data is sent through a preset notification method.

[0033] In some optional implementations, the reused data includes communication information; wherein the communication information is information characterizing the communication method between applications of the business system.

[0034] In some alternative implementations, a notification module is also included for:

[0035] Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

[0036] Thirdly, embodiments of this application provide an electronic device, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor performs the application data multiplexing method described in any of the first aspects above.

[0037] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer, which, when run on the computer, causes the computer to perform the application data multiplexing method described in any of the first aspects above.

[0038] Fifthly, embodiments of this application provide a computer program product comprising computer-executable instructions, the computer-executable instructions being used to cause a computer to perform the application data multiplexing method as described in any of the first aspects. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram illustrating the first application scenario provided in the embodiments of this application;

[0041] Figure 2 This is a schematic diagram illustrating a second application scenario provided in an embodiment of this application;

[0042] Figure 3 This is a schematic diagram illustrating a third application scenario provided in the embodiments of this application;

[0043] Figure 4 This is a schematic diagram illustrating the fourth application scenario provided in the embodiments of this application;

[0044] Figure 5 A schematic diagram of the EMP framework provided in the embodiments of this application;

[0045] Figure 6 A flowchart illustrating the first application data reuse method provided in this application embodiment;

[0046] Figure 7 A flowchart illustrating the second application data reuse method provided in this application embodiment;

[0047] Figure 8 A flowchart illustrating the third application data reuse method provided in this application embodiment;

[0048] Figure 9 This is a schematic diagram of the structure of the application data multiplexing device provided in the embodiments of this application;

[0049] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the term "connection" should be interpreted broadly. For example, it can refer to a direct connection, an indirect connection through an intermediate medium, or a connection within two devices. Those skilled in the art can understand the specific meaning of the above term in this application based on the specific circumstances.

[0052] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.

[0053] As business systems and applications (such as web applications, which run via a browser) continue to evolve, business demands also increase. Some business systems are adopting micro-frontend frameworks for project integration. Micro-frontend frameworks apply the microservices concept to the browser side, transforming applications from single monolithic applications into applications that aggregate multiple frontend applications into one. Each frontend application can run, be developed, and deployed independently.

[0054] While micro-frontend frameworks achieve application deployment separation and business logic separation, a large amount of code can appear in the applications within the business system, with duplicate code existing across different applications. This data redundancy across numerous applications impacts development efficiency.

[0055] In view of this, embodiments of this application propose an application data reuse method, apparatus, electronic device, and storage medium. The method includes: in response to a configuration instruction for any application in a business system, determining information representing reuse in the configuration instruction; based on the information representing reuse, determining reused data corresponding to the configuration instruction from candidate data; wherein the candidate data includes data from other applications in the business system and independent configuration data; and loading the reused data into the application.

[0056] The above solution reduces duplicate code across different applications by reusing data that has already been configured or independently configured in the application. This not only reduces resource consumption but also improves the development efficiency of applications in the business system, reduces compilation time, and enables efficient development, replication, porting, and deployment of the business system. Furthermore, by sharing data among applications, information such as interface style among these applications becomes more consistent.

[0057] See Figure 1As shown, in some embodiments, a Node Package Manager (npm) is used for data reuse. For example, the data to be reused is extracted into common dependencies through source code parsing (npm library) and installed separately in their respective projects. However, this approach involves a cumbersome and complex update process and slow build speed. When an npm package is updated, the relevant project must be rebuilt and then released to the production environment to use the updated code.

[0058] See Figure 2 As shown, in some embodiments, the Universal Module Definition (UMD) specification is used for data reuse. For example, code is directly referenced through a UMD package and used in the project. While this approach allows for timely data updates, conflicts can easily arise between different package libraries; and it does not achieve optimal performance during local compilation.

[0059] See Figure 3 As shown, in some embodiments, a base-type micro-frontend is used for data reuse. For example, the micro-frontend base corresponds to multiple sub-applications (...). Figure 3 Taking sub-applications 1, 2, 3, and 4 as examples, each sub-application can be built independently, and the sub-applications are independent of each other and can all introduce common modules. However, in this approach, communication between sub-applications relies on the base station for relay, making the communication process rather cumbersome.

[0060] See Figure 4 As shown, in some embodiments, module federation is used for data reuse. Module federation is a new feature based on Webpack 5 (a code compilation tool), which allows direct referencing of other application code to achieve hot-swapping; in addition, Webpack 5 also has a large number of built-in compile-time caching functions. Module federation can be seen as Webpack 5 bundling the components to be exported into a runtime file, which can then be dynamically loaded at runtime in other projects. The loading process is asynchronous, while the execution process is synchronous. Based on this feature, we can implement a central application module, which is used to dynamically distribute memory management (Runtime) sub-modules online, and the sub-applications can also share resources.

[0061] EMP (a basic framework platform) can be used in module federation; see [link / reference]. Figure 5 As shown, the EMP framework builds the basic framework of the micro-frontend, and constructs functional modules according to the actual situation of different business systems.

[0062] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0063] This application provides a first method for application data reuse, such as... Figure 6 As shown, it includes the following steps:

[0064] Step S601: In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction.

[0065] During implementation, the business system includes multiple business-related applications, such as product management, sales management, valuation and accounting, investment management, risk control center, and data center. Data reuse is possible in any of these applications, meaning they can share some code with other applications.

[0066] Based on this, when configuring an application, the information for representation reuse is determined based on the application's configuration instructions, and then subsequent data reuse is performed based on this representation reuse information.

[0067] Step S602: Based on the information of the representation reuse, determine the reused data corresponding to the configuration instruction from the candidate data; wherein, the candidate data includes data from other applications in the business system and independent configuration data.

[0068] In this embodiment, the data that the application needs to reuse can be data that has been configured in other applications or data that has been configured independently in a separate module; based on this, it is necessary to determine the data that the application needs to reuse from the data in other applications and the independently configured data.

[0069] Step S603: Load the multiplexed data into the application.

[0070] Referring to the above embodiments, data reuse can be achieved using module federation. In step S603, reused data can be loaded through module federation.

[0071] The above solution reduces duplicate code across different applications by reusing data that has already been configured or independently configured in the application. This not only reduces resource consumption but also improves the development efficiency of applications in the business system, reduces compilation time, and enables efficient development, replication, porting, and deployment of the business system. Furthermore, by sharing data among applications, information such as interface style among these applications becomes more consistent.

[0072] In some optional implementations, the reused data includes communication information; wherein the communication information is information characterizing the communication method between applications of the business system.

[0073] In a module federation, the decentralized inter-application communication process is quite cumbersome, while in a business system scenario, data transmission is required between different applications.

[0074] Based on this, the data that the application needs to reuse in this embodiment includes communication information, so that all applications can communicate using the same communication method.

[0075] The above scheme reuses communication information for different services, ensuring that different applications can communicate using the same communication method (such as the postmessage function) according to the communication information, thus guaranteeing the reliability and stability of data transmission between applications.

[0076] This embodiment does not limit the specific implementation of data reuse; the data reused will differ for different applications. In some embodiments, data that is shared by all applications can be set, such as the aforementioned communication information (to ensure communication between different applications), interface information (to maintain consistency in the application interface), and general standard data and user data; there is also data reused by some applications, such as business logic.

[0077] This embodiment does not limit the rendering of the application's interface, such as server-side rendering (SSR).

[0078] This application provides a second method for application data reuse, such as... Figure 7 As shown, it includes the following steps:

[0079] Step S701: In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction.

[0080] The specific implementation of step S701 can be found in the above embodiments, and will not be repeated here.

[0081] Step S702: Compare the reused data identifier with the data identifier of each candidate data.

[0082] In this embodiment, the information representing reuse includes a reused data identifier and a reused version identifier; the data identifier is the name, number, etc. of the data, used to distinguish different types of data; the version identifier is the version number of the data, used to distinguish different versions of the same type of data.

[0083] Since some or all of the data may be upgraded during the use of the application, resulting in data with different version numbers, this embodiment manages the data version, allowing the application to flexibly reuse data from different versions.

[0084] In other words, an application can reuse the latest version of data from other applications or individual modules, and it can also reuse historical versions of data from other applications or individual modules.

[0085] Step S703: Based on the comparison results, select target candidate data from the candidate data; wherein the data identifier of the target candidate data is the same as the reused data identifier.

[0086] In practice, by comparing the reuse data identifier of the data required for reuse in the above-mentioned business with the data identifier of any alternative data, the target alternative data that is the same as the reuse data identifier can be determined.

[0087] Step S704: Select the reuse data corresponding to the reuse version identifier from the target candidate data.

[0088] As mentioned above, some or all of the data may be upgraded, resulting in data with different version numbers. The application can reuse the latest version of the data or the data from previous versions.

[0089] Based on this, this embodiment also needs to select the reused data corresponding to the aforementioned reused version identifier from the target candidate data.

[0090] For example, the target candidate data is data A, which includes data A1 with version number 1.0, data A2 with version number 2.0, and data A3 with version number 3.0; the reuse version identifier is 3.0, and the reused data is determined to be A3, that is, the latest version of data in data A.

[0091] Step S705: Load the multiplexed data into the application.

[0092] The specific implementation of step S705 can be found in the above embodiments, and will not be repeated here.

[0093] The above scheme accurately identifies the target candidate data that matches the reuse data identifier by comparing it with the data identifier of any candidate data; and by managing data versions, it selects the reuse data corresponding to the reuse version identifier from the target candidate data, enabling the application to flexibly reuse different versions of data.

[0094] In some optional implementations, after step S702 above, the following steps may also be performed:

[0095] If there is no target candidate data among the candidate data, the application and the information on the representation reuse will be notified through a preset notification method.

[0096] During implementation, if there is no target alternative data with the same reuse data identifier in other applications or individual modules, it may be that the information representing reuse in the configuration instructions is incorrect, or that the above applications need to configure new data instead of reusing data from other applications or configuring data independently.

[0097] Based on this, the above-mentioned application and representation reuse information are notified through a preset notification method so that relevant personnel can confirm the reason why there is no target candidate data among the candidate data.

[0098] In some optional implementations, after step S703 above, the following steps may also be performed:

[0099] If there is no reused data corresponding to the reused version identifier in the target candidate data, a version management notification for the target candidate data will be sent through a preset notification method.

[0100] During implementation, if there is no reuse data with the same reuse version identifier in the target candidate data, it may be due to an error in the information representing reuse in the configuration instructions, or the above target candidate data may not be updated in time.

[0101] Based on this, version management notifications for target candidate data are sent via preset notification methods so that relevant personnel can confirm the reasons for the reuse of data that is not present in the target candidate data.

[0102] This application provides a third method for application data reuse, such as... Figure 8 As shown, it includes the following steps:

[0103] Step S801: In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction.

[0104] Step S802: Based on the information of the representation reuse, determine the reused data corresponding to the configuration instruction from the candidate data; wherein, the candidate data includes data from other applications in the business system and independent configuration data.

[0105] Step S803: Load the multiplexed data into the application.

[0106] The specific implementation of steps S801 to S803 can be found in the above embodiments, and will not be repeated here.

[0107] Step S804: Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

[0108] Since a large number of applications reuse data in this embodiment, determining the correspondence between applications and reused data facilitates the management of the reuse relationship; furthermore, by notifying relevant personnel of this correspondence, it is convenient for them to adjust or upgrade the reused data.

[0109] Based on the same inventive concept, embodiments of this application provide an application data multiplexing device, see reference. Figure 9 As shown, the application data multiplexing device 900 includes:

[0110] The reuse information determination module 901 is used to determine the information representing reuse in the configuration instruction in response to a configuration instruction for any application in the business system.

[0111] The data selection module 902 is used to determine the reused data corresponding to the configuration instruction from the candidate data based on the information of the representation reuse; wherein, the candidate data includes data from other applications in the business system and independent configuration data;

[0112] Loading module 903 is used to load the multiplexed data into the application.

[0113] In some optional implementations, the information representing the reuse includes a reused data identifier and a reused version identifier; the data selection module 902 is specifically used for:

[0114] The reused data identifier is compared with the data identifier of each candidate data;

[0115] Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reused data identifier;

[0116] Select the reused data corresponding to the reused version identifier from the target candidate data.

[0117] In some alternative implementations, a notification module 904 is also included, for:

[0118] After the data selection module 902 compares the reused data identifier with the data identifiers of each candidate data, if there is no target candidate data among the candidate data, the application and the information on the reused representation are notified through a preset notification method.

[0119] In some optional implementations, the notification module 904 is used for:

[0120] After the data selection module 902 selects target candidate data from the candidate data, if there is no reuse data corresponding to the reuse version identifier in the target candidate data, a version management notification for the target candidate data is sent through a preset notification method.

[0121] In some optional implementations, the reused data includes communication information; wherein the communication information is information characterizing the communication method between applications of the business system.

[0122] In some optional implementations, the notification module 904 is used for:

[0123] Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

[0124] Since this device is the same as the device in the method of this application embodiment, and the principle of the device in solving the problem is similar to that of the method, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described again.

[0125] Based on the same technical concept, this application also provides an electronic device 1000, such as... Figure 10 As shown, it includes at least one processor 1001 and a memory 1002 connected to at least one processor. In this embodiment, the specific connection medium between the processor 1001 and the memory 1002 is not limited. Figure 10 Taking the connection between processor 1001 and memory 1002 via bus 1003 as an example. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0126] The processor 1001 is the control center of the electronic device, capable of connecting various parts of the electronic device via various interfaces and lines. It performs data processing by running or executing instructions stored in the memory 1002 and accessing data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units. The processor 1001 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles issuing instructions. It is understood that the modem processor may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.

[0127] Processor 1001 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the application data multiplexing method embodiments can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0128] Memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1002 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 1002 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1002 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0129] In this embodiment, the memory 1002 stores a computer program, which, when executed by the processor 1001, causes the processor 1001 to perform the following:

[0130] In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction;

[0131] Based on the information of the representation reuse, the reused data corresponding to the configuration instruction is determined from the candidate data; wherein, the candidate data includes data from other applications in the business system and independent configuration data;

[0132] The reused data is loaded into the application.

[0133] In some optional implementations, the information representing the multiplexing includes a multiplexed data identifier and a multiplexed version identifier; processor 1001 specifically executes:

[0134] The reused data identifier is compared with the data identifier of each candidate data;

[0135] Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reused data identifier;

[0136] Select the reused data corresponding to the reused version identifier from the target candidate data.

[0137] In some optional implementations, after comparing the multiplexed data identifier with the data identifiers of each candidate data, the processor 1001 further performs:

[0138] If there is no target candidate data among the candidate data, the application and the information on the representation reuse will be notified through a preset notification method.

[0139] In some optional implementations, after selecting target candidate data from the candidate data, processor 1001 further performs:

[0140] If there is no reused data corresponding to the reused version identifier in the target candidate data, a version management notification for the target candidate data will be sent through a preset notification method.

[0141] In some optional implementations, the reused data includes communication information; wherein the communication information is information characterizing the communication method between applications of the business system.

[0142] In some optional implementations, processor 1001 also performs:

[0143] Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

[0144] Since the electronic device is the same as the electronic device in the method of this application embodiment, and the principle of the electronic device in solving the problem is similar to that of the method, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be described again.

[0145] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium storing a computer program executable by a computer, which, when run on the computer, causes the computer to perform the steps of the above-described application data reuse method.

[0146] In some alternative implementations, various aspects of the application data reuse method provided in this application can also be implemented as a program product containing computer-executable instructions. When the program product is run on a computer device, the computer-executable instructions are used to cause the computer device to perform the steps of the application data reuse method according to the various exemplary embodiments of this application described above.

[0147] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0149] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0150] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0151] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0152] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for application data reuse, characterized in that, A micro-frontend architecture applied to module federation, wherein the micro-frontend architecture adopts the EMP framework; the method includes: In response to a configuration instruction for any application in the business system, determine the information representing reuse in the configuration instruction; Based on the information of the characterization reuse, the reused data corresponding to the configuration instruction is determined from the candidate data; wherein, the candidate data includes data from other applications in the business system and independent configuration data; the reused data includes general reused data and non-general reused data; the general reused data includes some or all of communication information, interface information, standard data, and user data; the communication information is information characterizing the communication method between applications in the business system; the interface information is a general interface characterizing the business system; Load the reused data into the application; The information representing reuse includes a reused data identifier and a reused version identifier; determining the reused data corresponding to the configuration instruction from the candidate data includes: The reused data identifier is compared with the data identifier of each candidate data; Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reuse data identifier; the data identifier is the name and / or number of the data, and the data identifier is different for different types of data; Select the reused data corresponding to the reused version identifier from the target candidate data; wherein, the version identifier of the reused data is the same as the reused version identifier; the version identifier is the version number of the data, and different versions of the same type of data have different version identifiers.

2. The method as described in claim 1, characterized in that, After comparing the reused data identifier with the data identifiers of each candidate data, the method further includes: If there is no target candidate data among the candidate data, the application and the information on the representation reuse will be notified through a preset notification method.

3. The method as described in claim 1, characterized in that, After selecting the target candidate data from the candidate data, the process further includes: If there is no reused data corresponding to the reused version identifier in the target candidate data, a version management notification for the target candidate data will be sent through a preset notification method.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

5. An application data multiplexing device, characterized in that, The device includes: The reuse information determination module is used to determine the information representing reuse in the configuration instruction in response to a configuration instruction for any application in the business system. The data selection module is used to determine the reused data corresponding to the configuration instruction from the candidate data based on the information of the representation reuse; wherein, the candidate data includes data from other applications in the business system and independent configuration data; A loading module is used to load the multiplexed data into the application; The information representing reuse includes a reused data identifier and a reused version identifier; the data selection module is specifically used for: The reused data identifier is compared with the data identifier of each candidate data; Based on the comparison results, target candidate data is selected from the candidate data; wherein, the data identifier of the target candidate data is the same as the reused data identifier; Select the reused data corresponding to the reused version identifier from the target candidate data.

6. The apparatus as claimed in claim 5, characterized in that, It also includes a notification module for: After the data selection module compares the reused data identifier with the data identifiers of each candidate data, if there is no target candidate data among the candidate data, the application and the information on the reused representation are notified through a preset notification method.

7. The apparatus as claimed in claim 5, characterized in that, It also includes a notification module for: After the data selection module selects target candidate data from the candidate data, if there is no reuse data corresponding to the reuse version identifier in the target candidate data, a version management notification for the target candidate data is sent through a preset notification method.

8. The apparatus according to any one of claims 5 to 7, characterized in that, It also includes a notification module for: Determine the correspondence between all applications and reused data in the business system, and notify the correspondence through a preset notification method.

9. An electronic device, characterized in that, It includes at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computer, which, when run on the computer, causes the computer to perform the method as described in any one of claims 1 to 4.

11. A computer program product, characterized in that, It includes computer-executable instructions for causing a computer to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Code reuse method and device, computer readable storage medium and electronic equipment

    CN114115855A