Plug-in updating method, device, equipment and storage medium thereof
By using the plug-in packaging tool to generate target public files and determine the modification status of the plug-in code, the problems of time-consuming, labor-intensive and missed plug-in updates in the financial business system are solved, and efficient synchronous updates are achieved.
Patent Information
- Application Number
- CN202410029636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-01-08
AI Technical Summary
The existing technology is time-consuming and labor-intensive when updating plug-ins in financial business systems, and it is easy to miss business modules that need to be updated.
The code of the public plug-in is packaged and processed through the preset plug-in packaging tool to generate the target public file, and the module identification and plug-in identification information are counted to determine whether the plug-in code has been modified. If not, all execution modules are introduced. If modified, all execution modules are identified and updated.
It achieves efficient and accurate plug-in updates, avoids missed updates, and ensures the synchronous updates of plug-ins in the financial business system.
Smart Images

Figure CN117850842B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology and is applied to the synchronous update scenario of public plug-ins in financial business systems, and in particular to a plug-in update method, device, equipment and storage medium thereof. Background Art
[0002] With the rapid development of the internet, various industries are seeking breakthroughs through the internet. In recent years, the financial industry has also been expanding its online business around the internet. Due to the large volume of business and data involved in the financial industry, business modules are also quite diverse. This is particularly true in various financial services fields such as financial investment, financial management, and stock analysis.
[0003] In financial business systems, it is common to encapsulate some methods or functions into a file and then introduce them as plug-ins in available business modules. The disadvantage is that when a public plug-in is modified, it needs to be modified synchronously in all the corresponding introduced business modules. The current modification and update method is to use the IDE's global search function to search for business modules and then make changes based on the search results. The search requires knowing the full name of the business module for an exact match, or performing a fuzzy search based on the key fields of the business module, and then filtering the final results in a large number of search results to obtain the final business module. This plug-in update method is time-consuming and labor-intensive. In addition, large financial business systems have many business modules, and it is easy to miss business modules that need to be updated. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a plug-in update method, device, equipment and storage medium thereof to solve the problem that the existing technology is time-consuming and labor-intensive when updating plug-ins, and that large financial business systems have many business modules and are prone to missing business modules that need to be updated.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a plug-in update method, which adopts the following technical solutions:
[0006] A plug-in updating method comprises the following steps:
[0007] Get the compiled public plug-in code to be packaged;
[0008] The code of the public plug-in is packaged using a preset plug-in packaging tool to generate a target public file, the public plug-in, and plug-in identification information of the public plug-in. During the packaging process, module identifications of all executable modules that can be introduced by the public plug-in are counted according to a statistics component pre-introduced in the plug-in packaging tool, and the module identifications and plug-in identification information are added to the target public file;
[0009] Determine, based on a preset judgment component, whether the code of the public plug-in has been modified during the reference process;
[0010] If the code of the common plug-in has not been modified during the reference process, parsing the target common file to obtain the module identifier, and continuing to introduce the code of the common plug-in into all the execution modules according to the module identifier;
[0011] If the code of the common plug-in is modified during the reference process, the target common file is parsed to obtain the module identifier, and all execution modules that can be introduced by the common plug-in are identified according to the module identifier. The modified common plug-in code is introduced into all the execution modules to update the unmodified common plug-in code introduced by all the execution modules, thereby completing the update of the common plug-in in the target business system.
[0012] Furthermore, the step of obtaining the compiled public plug-in code to be packaged specifically includes:
[0013] When the functional service code is completed, the common code in the functional service code is extracted by encapsulation;
[0014] The step of packaging the code of the public plug-in using a preset plug-in packaging tool to generate a target public file, the public plug-in, and plug-in identification information of the public plug-in specifically includes:
[0015] The common code is packaged using the webpack plug-in packaging tool to obtain the common plug-in, and the plug-in identification information and plug-in descriptive text information corresponding to the common plug-in are generated;
[0016] The target public file is generated according to the plug-in identification information and the plug-in descriptive text information.
[0017] Furthermore, the step of counting the module identifiers of all executable modules that can be introduced by the public plug-in according to the statistical component pre-introduced in the plug-in packaging tool, and adding the module identifiers and the plug-in identification information to the target public file specifically includes:
[0018] Execute the functional business code compilation step to obtain the compilation result;
[0019] Determining, based on the compilation result, all execution modules that can be introduced by all public plug-ins and module identifiers of all the execution modules;
[0020] Constructing an introduction association graph between the common plug-in and the execution module based on the plug-in identification information and the module identification;
[0021] Based on the introduction association graph, a key-value pair is constructed with the plug-in identification information of each public plug-in as key data and the module identification of the importable executable module corresponding to each public plug-in as value data, wherein the key data of each key-value pair is unique, and the value data is an array of data including one or more module identifications;
[0022] The key-value pair is added to the target public file to implement adding the module identifier to the target public file.
[0023] Furthermore, the step of determining, based on a preset determination component, whether the code of the public plug-in has been modified during the reference process specifically includes:
[0024] The execution module into which the common plug-in is introduced at this time is used as the target execution module;
[0025] obtaining the plug-in code of the common plug-in before being introduced into the target execution module as the first code, and
[0026] Obtaining a plug-in code after the common plug-in is introduced into the target execution module as a second code;
[0027] comparing the first code and the second code;
[0028] If the second code is consistent with the first code through comparison, the code of the public plug-in has not been modified during the reference process;
[0029] If the second code is inconsistent with the first code through comparison, the code of the public plug-in is modified during the reference process.
[0030] Furthermore, after executing the step of modifying the code of the common plug-in during the referencing process if the second code is inconsistent with the first code through comparison, the method further includes:
[0031] Obtain the module identifier of the target execution module.
[0032] Furthermore, the step of introducing the modified common plug-in code into all the execution modules to update the unmodified common plug-in code introduced by all the execution modules to complete the code update of the common plug-in in the target business system specifically includes:
[0033] Identifying a key-value pair corresponding to the public plug-in through the target public file and the plug-in identification information of the public plug-in;
[0034] Parsing the key-value pair corresponding to the public plug-in to obtain the value data in the key-value pair;
[0035] The value data is parsed by using an array parsing method to obtain a parsing result.
[0036] If it is identified from the parsing result that the value data only contains one module identifier, the code of the common plug-in introduced by all the execution modules has been modified, and the code update of the common plug-in in the target business system is completed.
[0037] If it is identified from the parsing result that the value data contains several module identifiers, all the execution modules corresponding to the common plug-in are identified through the several module identifiers, and the modified code of the common plug-in is introduced into all the execution modules except the target execution module, and the code update of the common plug-in in the target business system is completed.
[0038] Further, the step of identifying all the execution modules corresponding to the common plug-in through the several module identifiers, and introducing the modified code of the common plug-in into all the execution modules except the target execution module, and completing the code update of the common plug-in in the target business system, specifically includes:
[0039] identifying all the execution modules corresponding to the common plug-in through the several module identifiers;
[0040] identifying all the execution modules except the target execution module from all the execution modules according to the module identifier of the target execution module;
[0041] obtaining the module identifiers of all the execution modules except the target execution module, and constructing a module identifier array;
[0042] filtering different execution modules in sequence according to the module identifier array;
[0043] introducing the modified code of the common plug-in into the filtered different execution modules, and completing the code update of the common plug-in in the target business system.
[0044] To solve the above technical problems, the embodiment of the present application also provides a plug-in updating device, which adopts the technical scheme as follows:
[0045] A plug-in updating device, comprising:
[0046] a to-be-packaged code obtaining module configured to obtain the code of the compiled common plug-in to be packaged;
[0047] a public plug-in packaging processing module, configured to package the code of the public plug-in using a preset plug-in packaging tool to generate a target public file, the public plug-in, and plug-in identification information of the public plug-in; wherein, during the packaging process, the module identifications of all executable modules that can be introduced by the public plug-in are counted according to a statistics component pre-introduced in the plug-in packaging tool, and the module identifications and plug-in identification information are added to the target public file;
[0048] A modification judgment module, configured to judge, based on a preset judgment component, whether the code of the public plug-in has been modified during the reference process;
[0049] a first branch processing module, configured to parse the target public file to obtain the module identifier if the code of the public plug-in has not been modified during the reference process, and continue to introduce the code of the public plug-in into all the execution modules according to the module identifier;
[0050] The second branch processing module is used to parse the target public file if the code of the public plug-in is modified during the reference process, obtain the module identifier, identify all execution modules that can be introduced by the public plug-in according to the module identifier, and introduce the modified public plug-in code into all the execution modules to update the unmodified public plug-in code introduced by all the execution modules, thereby completing the update of the public plug-in in the target business system.
[0051] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0052] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned plug-in updating method when executing the computer-readable instructions.
[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0054] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the plug-in updating method described above.
[0055] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0056] The plug-in updating method provided in the embodiments of the present application comprises the following steps: obtaining the code of a compiled public plug-in to be packaged; performing packaging processing on the code of the public plug-in by using a preset plug-in packaging tool to generate a target public file, a public plug-in and plug-in identification information of the public plug-in; in the packaging processing, according to a statistical component pre-introduced in the plug-in packaging tool, the module identification of all execution modules that can be introduced by the public plug-in is counted, and the module identification and the plug-in identification information are added into the target public file; according to a preset judging component, it is judged whether the code of the public plug-in is modified in the process of being referenced; if not, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continuously introduced into all execution modules according to the module identification; if the code of the public plug-in is modified in the process of being referenced, the target public file is parsed to obtain the module identification, all execution modules that can be introduced by the public plug-in are identified according to the module identification, and the modified code of the public plug-in is introduced into all execution modules to update the code of the public plug-in that is not modified before and is introduced by all execution modules, thereby completing the updating of the public plug-in in the target business system. In the compiling and packaging stage, the statistical component is introduced to count the module identification of all execution modules that can be introduced by the public plug-in, and the plug-in identification information and the module identification are written into the target public file, so that when the code of the public plug-in is updated subsequently, the plug-in identification information of the public plug-in is identified by using the target public file, all function modules or execution modules corresponding to the public plug-in are identified according to the plug-in identification information, and synchronous updating processing is achieved in time, and the situation of missing updating is also avoided. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the scheme in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0058] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0059] Figure 2 is a flowchart of one embodiment of the plug-in updating method according to the present application;
[0060] Figure 3 is a flowchart of one specific embodiment of the step 203 shown in Figure 2
[0061] Figure 4 is a flowchart of one specific embodiment of the step 205 shown in Figure 2
[0062] Figure 5 yes Figure 4 A flowchart of a specific embodiment of step 405 is shown;
[0063] Figure 6 is a structural diagram of an embodiment of a plug-in updating device according to the present application;
[0064] Figure 7 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0066] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0067] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0068] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0069] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0070] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, and the like.
[0071] The server 105 can be a server providing various services, such as a background server providing support for a page displayed on the terminal devices 101, 102, and 103.
[0072] It should be noted that the plug-in updating method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the plug-in updating apparatus is generally arranged in a server / terminal device.
[0073] It should be understood that Figure 1 The number of terminal devices, networks, and servers in
[0074] With reference to Figure 2 , a flowchart of one embodiment of the plug-in updating method according to the present application is shown. The plug-in updating method includes the following steps:
[0075] In step 201, the code of a compiled common plug-in to be packaged is obtained.
[0076] In the present embodiment, the common plug-in refers to a plug-in that can be commonly used by multiple different functional modules or execution modules in a target business system, including a financial business system, such as a bank business system, a mobile banking APP, and the like. Taking the mobile banking APP as an example, generally, the mobile banking APP is an APP serving a user end, and when used by a user, the mobile banking APP provides an interface to the user, the interface header and the interface footer of which are fixed and unchangeable, and only the display content in the middle of the page is executed according to user operations to realize the conversion between pages. At this time, the code corresponding to the interface header and the interface footer can be encapsulated as common plug-ins, and no matter what operation is issued by the user, the common plug-ins are called to render the interface header and the interface footer when the page is rendered.
[0077] In the embodiment, the step of obtaining the code of the compiled common plug-in to be packaged specifically comprises: extracting the common code in the functional business code by encapsulation when the functional business code is completed.
[0078] In step 202, the code of the common plug-in is packaged by a preset plug-in packaging tool to generate a target common file, the common plug-in, and plug-in identification information of the common plug-in. During the packaging process, according to a statistical component pre-introduced in the plug-in packaging tool, the module identification of all executable modules that can be introduced by the common plug-in is counted, and the module identification and the plug-in identification information are added to the target common file.
[0079] In the embodiment, the step of packaging the code of the common plug-in by the preset plug-in packaging tool to generate a target common file, the common plug-in, and plug-in identification information of the common plug-in specifically comprises: packaging the common code by a webpack plug-in packaging tool, obtaining the common plug-in, and generating plug-in identification information and plug-in descriptive text information corresponding to the common plug-in; and generating the target common file according to the plug-in identification information and the plug-in descriptive text information.
[0080] By generating the plug-in identification information corresponding to the common plug-in and generating the target common file according to the plug-in identification information and the plug-in descriptive text information, it is convenient to identify the plug-in identification information of the common plug-in through the target common file when the code of the common plug-in is updated, and it is also convenient to identify all functional modules or executable modules corresponding to the common plug-in according to the plug-in identification information, so that unified updating can be performed in time.
[0081] In the embodiment, the step of counting, according to a statistical component pre-introduced in the plug-in packaging tool, the module identification of all executable modules that can be introduced by the common plug-in, and adding the module identification and the plug-in identification information to the target common file specifically comprises: performing a functional business code compiling step to obtain a compiling result; determining, according to the compiling result, all executable modules that can be introduced by all common plug-ins and the module identification of the all executable modules; constructing an introduction correlation graph between the common plug-ins and the executable modules according to the plug-in identification information and the module identification; constructing a key-value pair based on the introduction correlation graph, taking the plug-in identification information of each common plug-in as key data and the module identification of the executable modules that can be introduced by each common plug-in as value data, wherein the key data of each key-value pair is unique, and the value data is array-form data including one or more module identifications; and adding the key-value pair to the target common file to add the module identification to the target common file.
[0082] By determining all execution modules that all public plugins can be introduced into respectively and module identifiers of the all execution modules according to the compilation result; constructing an introduction correlation graph between the public plugins and the execution modules according to the plugin identifier information and the module identifiers; and constructing a key-value pair based on the introduction correlation graph, taking the plugin identifier information of each public plugin as key data and the module identifiers of the execution modules that each public plugin can be introduced into as value data, and adding the key-value pair to the target public file, so as to add the module identifiers to the target public file. This facilitates identifying the plugin identifier information of the public plugin through the target public file when the code of the public plugin is updated subsequently, and identifying all function modules or execution modules corresponding to the public plugin according to the key-value pair corresponding to the plugin identifier information, so that unified updating can be performed in time.
[0083] In step 203, it is determined whether the code of the public plugin is modified in the process of being referenced according to a preset judging component.
[0084] With reference to Figure 3 , Figure 3 is Figure 2 a flowchart of one specific embodiment of step 203, including:
[0085] In step 301, the execution module into which the public plugin is introduced this time is taken as a target execution module.
[0086] In step 302, the plugin code before the public plugin is introduced into the target execution module is taken as first code, and
[0087] In step 302, the plugin code before the public plugin is introduced into the target execution module is taken as first code, and
[0088] In step 303, the first code and the second code are compared.
[0089] In step 304, if the second code is consistent with the first code through comparison, it is determined that the code of the public plugin is not modified in the process of being referenced.
[0090] In step 305, if the second code is inconsistent with the first code through comparison, it is determined that the code of the public plugin is modified in the process of being referenced.
[0091] In this embodiment, after the step of determining that the code of the public plugin is modified in the process of being referenced if the second code is inconsistent with the first code through comparison, the method further includes obtaining a module identifier of the target execution module.
[0092] In this embodiment, a preset judgment component is used to determine whether the code of the public plug-in has been modified during the reference process. This allows for timely screening and judgment each time the public plug-in is introduced by the execution module, thereby enabling timely discovery of the modified public plug-in when it is modified.
[0093] Step 204: If the code of the common plug-in has not been modified during the reference process, the target common file is parsed to obtain the module identifier, and the code of the common plug-in is introduced into all execution modules according to the module identifier.
[0094] In this embodiment, if the code of the common plug-in has not been modified during the reference process, the target common file is parsed to obtain the module identifier, and the code of the common plug-in is introduced into all the execution modules according to the module identifier. This indicates that the common plug-in has not been modified during the multiple introductions and uses of the common plug-in, indicating that no plug-in update has occurred. Therefore, there is no need to update the plug-in.
[0095] Step 205: If the code of the common plug-in is modified during the reference process, the target common file is parsed to obtain the module identifier, all execution modules that can be introduced by the common plug-in are identified according to the module identifier, and the modified common plug-in code is introduced into all the execution modules to update the unmodified common plug-in code introduced by all the execution modules, thereby completing the update of the common plug-in in the target business system.
[0096] In this embodiment, if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identifier, and all execution modules that can be introduced by the public plug-in are identified according to the module identifier, and the modified public plug-in code is introduced into all the execution modules to update the code of the public plug-in before modification introduced by all the execution modules, and the update of the public plug-in in the target business system is completed. This means that the public plug-in has been modified during the multiple introduction and use of the public plug-in, indicating that a plug-in update has occurred. Therefore, in order to ensure the unified update effect of the public plug-in, it is necessary to combine the execution module for timely update processing.
[0097] Continue to refer Figure 4 , Figure 4 yes Figure 2 The flowchart of a specific embodiment of step 205 shown includes:
[0098] Step 401: Identify the key-value pair corresponding to the public plug-in through the target public file and the plug-in identification information of the public plug-in;
[0099] Step 402: Parse the key-value pair corresponding to the public plug-in to obtain the value data in the key-value pair;
[0100] Step 403: parse the value data using an array parsing method to obtain a parsing result;
[0101] Step 404: If the parsing result indicates that the value data contains only one module identifier, the code of the common plug-in introduced by all the execution modules has been modified, and the code update of the common plug-in in the target business system is completed.
[0102] Through identification, if the value data contains only one module identifier, it means that the common plug-in is only introduced in the target execution module. Since the code of the common plug-in introduced by the target execution module has been modified, there is no need to reintroduce and modify it, that is, the code update of the common plug-in in the target business system has been completed.
[0103] Step 405: If it is identified through the analysis result that the value data contains several module identifiers, all execution modules corresponding to the common plug-in are identified through the several module identifiers, and the code of the modified common plug-in is introduced into all execution modules except the target execution module to complete the code update of the common plug-in in the target business system.
[0104] Through the target public file, all execution modules introduced by the public plug-in are identified, and then, according to the module identifications of all the execution modules, the updated and modified code of the public plug-in is introduced into all the execution modules to implement the code update of the public plug-in in the target business system, wherein the target business system is a financial business system. In this way, when the public plug-in is updated in the financial business system, the execution module applied to the public plug-in in the financial business system can be updated in time, thereby ensuring synchronous update.
[0105] Continue to refer Figure 5 , Figure 5 yes Figure 4 The flowchart of a specific embodiment of step 405 shown includes:
[0106] Step 501: Identify all execution modules corresponding to the common plug-in through the plurality of module identifiers;
[0107] Step 502: identifying all execution modules other than the target execution module from among all execution modules according to the module identifier of the target execution module;
[0108] Step 503: Obtain module identifiers of all execution modules except the target execution module, and construct a module identifier array;
[0109] Step 504: Filter out different execution modules in sequence according to the module identification array;
[0110] Step 505 : Introduce the modified code of the common plug-in into the selected different execution modules to complete the code update of the common plug-in in the target business system.
[0111] By parsing the value data in the key-value pair, all execution modules other than the target execution module are identified within all execution modules, and a module identification array is constructed. Different execution modules are sequentially screened based on the module identification array. The modified common plug-in code is introduced into the screened different execution modules to complete the code update of the common plug-in in the target business system. When the target execution module introduces the common plug-in or modifies the common plug-in, other execution modules in the target business system that reference the common plug-in are promptly identified, and the common plug-in is synchronously updated in a timely manner.
[0112] The present application obtains the code of the compiled public plug-in to be packaged; packages the code of the public plug-in through a preset plug-in packaging tool to generate a target public file, a public plug-in and the plug-in identification information of the public plug-in, wherein, during the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifications of all execution modules that the public plug-in can introduce are counted, and the module identification and plug-in identification information are added to the target public file; according to the preset judgment component, it is judged whether the code of the public plug-in has been modified during the reference process; if it has not been modified, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continued to be introduced into all execution modules according to the module identification; if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identification, and all execution modules that the public plug-in can introduce are identified according to the module identification, and the modified public plug-in code is introduced into all execution modules to update the code of the public plug-in before modification introduced by all execution modules, thereby completing the update of the public plug-in in the target business system. By introducing a statistical component during the compilation and packaging stage, the module identifications of all execution modules that can be introduced by the public plug-in are counted, and the plug-in identification information and module identification are written into the target public file. This makes it easier for the target public file to identify the plug-in identification information of the public plug-in when the code of the subsequent public plug-in is updated, and all functional modules or execution modules corresponding to the public plug-in are identified based on the plug-in identification information, so that synchronous updates can be carried out in a timely manner and the occurrence of missed updates can be avoided.
[0113] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0114] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, large-scale plug-in update technology, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0115] In an embodiment of the present application, the code of the compiled public plug-in to be packaged is obtained; the code of the public plug-in is packaged and processed by a preset plug-in packaging tool to generate a target public file, a public plug-in and the plug-in identification information of the public plug-in, wherein, during the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifications of all execution modules that the public plug-in can introduce are counted, and the module identification and plug-in identification information are added to the target public file; according to the preset judgment component, it is judged whether the code of the public plug-in has been modified during the reference process; if it has not been modified, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continued to be introduced into all execution modules according to the module identification; if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identification, and all execution modules that the public plug-in can introduce are identified according to the module identification, and the code of the modified public plug-in is introduced into all execution modules to update the code of the public plug-in before modification introduced by all execution modules, thereby completing the update of the public plug-in in the target business system. By introducing a statistical component during the compilation and packaging stage, the module identifications of all execution modules that can be introduced by the public plug-in are counted, and the plug-in identification information and module identification are written into the target public file. This makes it easier for the target public file to identify the plug-in identification information of the public plug-in when the code of the subsequent public plug-in is updated, and all functional modules or execution modules corresponding to the public plug-in are identified based on the plug-in identification information, so that synchronous updates can be carried out in a timely manner and the occurrence of missed updates can be avoided.
[0116] Further references Figure 6 , as a response to the above Figure 2 In order to realize the method shown in FIG, the present application provides an embodiment of a plug-in updating device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0117] like Figure 6 As shown, the plug-in updating device 600 of this embodiment includes: a code acquisition module 601 to be packaged, a common plug-in packaging processing module 602, a modification judgment module 603, a first branch processing module 604 and a second branch processing module 605. Among them:
[0118] The module 601 for obtaining the code to be packaged is used to obtain the compiled public plug-in code to be packaged;
[0119] The public plug-in packaging processing module 602 is configured to package the code of the public plug-in using a preset plug-in packaging tool to generate a target public file, the public plug-in, and plug-in identification information of the public plug-in. During the packaging process, the module identifications of all executable modules that can be introduced by the public plug-in are counted according to a statistics component pre-introduced in the plug-in packaging tool, and the module identifications and plug-in identification information are added to the target public file.
[0120] A modification determination module 603 is configured to determine, based on a preset determination component, whether the code of the public plug-in has been modified during the reference process;
[0121] The first branch processing module 604 is configured to parse the target public file to obtain the module identifier if the code of the public plug-in has not been modified during the reference process, and then continue to introduce the code of the public plug-in into all the execution modules according to the module identifier;
[0122] The second branch processing module 605 is used to parse the target public file if the code of the public plug-in is modified during the reference process, obtain the module identifier, identify all execution modules that can be introduced by the public plug-in according to the module identifier, and introduce the modified public plug-in code into all the execution modules to update the unmodified public plug-in code introduced by all the execution modules, thereby completing the update of the public plug-in in the target business system.
[0123] The present application obtains the code of the compiled public plug-in to be packaged; packages the code of the public plug-in through a preset plug-in packaging tool to generate a target public file, a public plug-in and the plug-in identification information of the public plug-in, wherein, during the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifications of all execution modules that the public plug-in can introduce are counted, and the module identification and plug-in identification information are added to the target public file; according to the preset judgment component, it is judged whether the code of the public plug-in has been modified during the reference process; if it has not been modified, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continued to be introduced into all execution modules according to the module identification; if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identification, and all execution modules that the public plug-in can introduce are identified according to the module identification, and the modified public plug-in code is introduced into all execution modules to update the code of the public plug-in before modification introduced by all execution modules, thereby completing the update of the public plug-in in the target business system. By introducing a statistical component during the compilation and packaging stage, the module identifications of all execution modules that can be introduced by the public plug-in are counted, and the plug-in identification information and module identification are written into the target public file. This makes it easier for the target public file to identify the plug-in identification information of the public plug-in when the code of the subsequent public plug-in is updated, and all functional modules or execution modules corresponding to the public plug-in are identified based on the plug-in identification information, so that synchronous updates can be carried out in a timely manner and the occurrence of missed updates can be avoided.
[0124] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0125] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0126] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.
[0127] The computer device 7 includes a memory 7a, a processor 7b, and a network interface 7c that are interconnected through a system bus. It should be noted that the figure only shows a computer device 7 with components 7a-7c, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0128] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0129] The memory 7a includes at least one type of readable storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 7a may be an internal storage unit of the computer device 7, such as the hard disk or memory of the computer device 7. In other embodiments, the memory 7a may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the computer device 7. Of course, the memory 7a may also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 7a is generally used to store the operating system and various application software installed on the computer device 7, such as computer-readable instructions for a plug-in update method. In addition, the memory 7a can also be used to temporarily store various types of data that have been output or are to be output.
[0130] In some embodiments, the processor 7b may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other plug-in update chip. The processor 7b is generally used to control the overall operation of the computer device 7. In this embodiment, the processor 7b is used to execute computer-readable instructions or process data stored in the memory 7a, such as computer-readable instructions for executing the plug-in update method.
[0131] The network interface 7c may include a wireless network interface or a wired network interface. The network interface 7c is generally used to establish a communication connection between the computer device 7 and other electronic devices.
[0132] The computer device proposed in this embodiment belongs to the field of financial technology and is applied to the scenario of synchronous update of public plug-ins in financial business systems. This application obtains the code of the compiled public plug-in to be packaged; the code of the public plug-in is packaged and processed by a preset plug-in packaging tool to generate a target public file, a public plug-in and the plug-in identification information of the public plug-in, wherein, during the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifications of all execution modules that the public plug-in can introduce are counted, and the module identification and plug-in identification information are added to the target public file; according to the preset judgment component, whether the code of the public plug-in has been modified during the reference process is judged; if it has not been modified, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continued to be introduced into all execution modules according to the module identification; if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identification, and all execution modules that the public plug-in can introduce are identified according to the module identification, and the code of the modified public plug-in is introduced into all execution modules to update the code of the public plug-in introduced by all execution modules before modification, thereby completing the update of the public plug-in in the target business system. By introducing a statistical component during the compilation and packaging stage, the module identifications of all execution modules that can be introduced by the public plug-in are counted, and the plug-in identification information and module identification are written into the target public file. This makes it easier for the target public file to identify the plug-in identification information of the public plug-in when the code of the subsequent public plug-in is updated, and all functional modules or execution modules corresponding to the public plug-in are identified based on the plug-in identification information, so that synchronous updates can be carried out in a timely manner and the occurrence of missed updates can be avoided.
[0133] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to enable the processor to perform the steps of the plug-in updating method as described above.
[0134] The computer-readable storage medium proposed in this embodiment belongs to the field of financial technology and is applied to the scenario of synchronous update of public plug-ins in financial business systems. This application obtains the code of the compiled public plug-in to be packaged; the code of the public plug-in is packaged and processed by a preset plug-in packaging tool to generate a target public file, a public plug-in and the plug-in identification information of the public plug-in, wherein, during the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifications of all execution modules that the public plug-in can introduce are counted, and the module identification and plug-in identification information are added to the target public file; according to the preset judgment component, whether the code of the public plug-in has been modified during the reference process is judged; if it has not been modified, the target public file is parsed to obtain the module identification, and the code of the public plug-in is continued to be introduced into all execution modules according to the module identification; if the code of the public plug-in is modified during the reference process, the target public file is parsed to obtain the module identification, and all execution modules that the public plug-in can introduce are identified according to the module identification, and the code of the modified public plug-in is introduced into all execution modules to update the code of the public plug-in introduced by all execution modules before modification, thereby completing the update of the public plug-in in the target business system. By introducing a statistical component during the compilation and packaging stage, the module identifications of all execution modules that can be introduced by the public plug-in are counted, and the plug-in identification information and module identification are written into the target public file. This makes it easier for the target public file to identify the plug-in identification information of the public plug-in when the code of the subsequent public plug-in is updated, and all functional modules or execution modules corresponding to the public plug-in are identified based on the plug-in identification information, so that synchronous updates can be carried out in a timely manner and the occurrence of missed updates can be avoided.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0136] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A plug-in update method, characterized in that: The steps include: Get the compiled public plug-in code to be packaged; The code of the public plug-in is packaged by a preset plug-in packaging tool to generate a target public file, the public plug-in, and plug-in identification information of the public plug-in, specifically including: Using the webpack plug-in packaging tool, the common code in the functional business code is packaged to obtain the common plug-in, and the plug-in identification information and plug-in descriptive text information corresponding to the common plug-in are generated; Generate the target public file according to the plug-in identification information and the plug-in descriptive text information, In the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifiers of all executable modules that can be introduced by the public plug-in are counted, and the module identifiers and the plug-in identification information are added to the target public file, specifically including: Execute the functional business code compilation step to obtain the compilation result; Determining, based on the compilation result, all execution modules that can be introduced by all public plug-ins and module identifiers of all the execution modules; Constructing an introduction association graph between the common plug-in and the execution module according to the plug-in identification information and the module identification; Based on the introduction association graph, a key-value pair is constructed with the plug-in identification information of each public plug-in as key data and the module identification of the importable executable module corresponding to each public plug-in as value data, wherein the key data of each key-value pair is unique, and the value data is an array of data including one or more module identifications; Adding the key-value pair to the target public file to add the module identifier to the target public file; Determine, based on a preset judgment component, whether the code of the public plug-in has been modified during the reference process; If the code of the common plug-in has not been modified during the reference process, parsing the target common file to obtain the module identifier, and continuing to introduce the code of the common plug-in into all the execution modules according to the module identifier; If the code of the common plug-in is modified during the reference process, the target common file is parsed to obtain the module identifier, and all execution modules that can be introduced by the common plug-in are identified according to the module identifier. The modified common plug-in code is introduced into all the execution modules to update the unmodified common plug-in code introduced by all the execution modules, thereby completing the update of the common plug-in in the target business system.
2. The plug-in updating method according to claim 1, wherein: The step of obtaining the compiled public plug-in code to be packaged specifically includes: When the functional service code is completed, the common code in the functional service code is extracted through encapsulation.
3. The plug-in updating method according to claim 1, wherein: The step of determining, based on a preset determination component, whether the code of the public plug-in has been modified during the reference process specifically includes: The execution module into which the common plug-in is introduced at this time is used as the target execution module; obtaining the plug-in code of the common plug-in before being introduced into the target execution module as the first code, and Obtaining a plug-in code after the common plug-in is introduced into the target execution module as a second code; comparing the first code and the second code; If the second code is consistent with the first code through comparison, the code of the public plug-in has not been modified during the reference process; If the second code is inconsistent with the first code through comparison, the code of the public plug-in is modified during the reference process.
4. The plug-in updating method according to claim 3, wherein: After executing the step of modifying the code of the common plug-in during the referencing process if the second code is inconsistent with the first code through comparison, the method further includes: Obtain the module identifier of the target execution module.
5. The plug-in updating method according to claim 3 or 4, characterized in that: The step of introducing the modified common plug-in code into all the execution modules to update the common plug-in code before modification introduced by all the execution modules, thereby completing the code update of the common plug-in in the target business system, specifically includes: Identifying a key-value pair corresponding to the public plug-in through the target public file and the plug-in identification information of the public plug-in; Parsing the key-value pair corresponding to the public plug-in to obtain the value data in the key-value pair; Parsing the value data using an array parsing method to obtain a parsing result; If, through the parsing result, it is identified that the value data contains only one module identifier, the code of the common plug-in introduced by all the execution modules has been modified, and the code update of the common plug-in in the target business system is completed; If the analysis result identifies that the value data contains several module identifiers, all execution modules corresponding to the common plug-in are identified through the several module identifiers, and the code of the modified common plug-in is introduced into all execution modules except the target execution module to complete the code update of the common plug-in in the target business system.
6. The plug-in updating method according to claim 5, characterized in that: The step of identifying all execution modules corresponding to the common plug-in by using the multiple module identifiers, and introducing the modified common plug-in code into all execution modules except the target execution module to complete the code update of the common plug-in in the target business system specifically includes: Identify all execution modules corresponding to the common plug-in through the multiple module identifiers; identifying, according to the module identifier of the target execution module, all execution modules other than the target execution module from among all the execution modules; Obtaining module identifiers of all execution modules except the target execution module, and constructing a module identifier array; According to the module identification array, different execution modules are sequentially screened out; The modified code of the common plug-in is introduced into the different selected execution modules to complete the code update of the common plug-in in the target business system.
7. A plug-in updating device, characterized in that: include: The module for obtaining the code to be packaged is used to obtain the compiled public plug-in code to be packaged; The public plug-in packaging processing module is used to package the code of the public plug-in through a preset plug-in packaging tool to generate a target public file, the public plug-in and the plug-in identification information of the public plug-in, specifically including: Using the webpack plug-in packaging tool, the common code in the functional business code is packaged to obtain the common plug-in, and the plug-in identification information and plug-in descriptive text information corresponding to the common plug-in are generated; Generate the target public file according to the plug-in identification information and the plug-in descriptive text information, In the packaging process, according to the statistical component pre-introduced in the plug-in packaging tool, the module identifiers of all executable modules that can be introduced by the public plug-in are counted, and the module identifiers and the plug-in identification information are added to the target public file, specifically including: Execute the functional business code compilation step to obtain the compilation result; Determining, based on the compilation result, all execution modules that can be introduced by all public plug-ins and module identifiers of all the execution modules; Constructing an introduction association graph between the common plug-in and the execution module according to the plug-in identification information and the module identification; Based on the introduction association graph, a key-value pair is constructed with the plug-in identification information of each public plug-in as key data and the module identification of the importable executable module corresponding to each public plug-in as value data, wherein the key data of each key-value pair is unique, and the value data is an array of data including one or more module identifications; Adding the key-value pair to the target public file to add the module identifier to the target public file; A modification judgment module, configured to judge, based on a preset judgment component, whether the code of the public plug-in has been modified during the reference process; a first branch processing module, configured to parse the target public file to obtain the module identifier if the code of the public plug-in has not been modified during the reference process, and continue to introduce the code of the public plug-in into all the execution modules according to the module identifier; The second branch processing module is used to parse the target public file if the code of the public plug-in is modified during the reference process, obtain the module identifier, identify all execution modules that can be introduced by the public plug-in according to the module identifier, and introduce the modified public plug-in code into all the execution modules to update the unmodified public plug-in code introduced by all the execution modules, thereby completing the update of the public plug-in in the target business system.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the plug-in updating method according to any one of claims 1 to 6 when executing the computer-readable instructions.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the plug-in updating method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Web front-end item processing method and device, electronic equipment and storage medium
CN113254043A
Code modification method, device and equipment and readable storage medium
CN116795355A