CN113342765A - Service unit updating method, system and computer equipment - Google Patents
Service unit updating method, system and computer equipment Download PDFInfo
- Publication number
- CN113342765A CN113342765A CN202110694171.9A CN202110694171A CN113342765A CN 113342765 A CN113342765 A CN 113342765A CN 202110694171 A CN202110694171 A CN 202110694171A CN 113342765 A CN113342765 A CN 113342765A
- Authority
- CN
- China
- Prior art keywords
- service unit
- file
- basic
- updating
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000012986 modification Methods 0.000 claims abstract description 17
- 230000004048 modification Effects 0.000 claims abstract description 17
- 230000001360 synchronised effect Effects 0.000 claims abstract description 13
- 230000006870 function Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000012550 audit Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method for updating a service unit, which comprises the following steps: acquiring and updating a basic file according to the acquired modification of the basic component information; synchronizing the updated base file to the service unit; acquiring resource information of a service unit, and generating a file list according to the resource information and a basic file synchronized to the service unit; and modifying the parameter information of the service unit according to the file list to complete the updating of the service unit. The invention also discloses an updating system of the service unit and computer equipment. By the scheme of the invention, the modification of the basic components of the service units is quickly and conveniently transferred to all the service units, and the problems of low efficiency of independently updating the service units and easy error in manual processing are solved.
Description
Technical Field
The present invention relates to the field of micro service technologies, and in particular, to a method and a system for updating a service unit, and a computer device.
Background
With the micro-service dividend brought by DevOps and CI/CD technologies, development and submission of a single function and API speed are greatly improved, but deployment difficulty brought accordingly is also greatly improved, although deployment can be performed by using k8s and service mesh, etc., at the initial stage of functional testing, basic environment processing outside services is not suitable for architectures of k8s and service-mesh, most competitors in China still adopt a single service style at present, basic components of service units related to services are developed and deployed individually by hand, for example, basic component updating requires all service units to be updated, and restarting is likely to cause low efficiency and error if each service unit is updated individually.
Disclosure of Invention
The invention provides an updating method, an updating system and computer equipment of a service unit, which can quickly and conveniently transfer the modification of the basic components of the service unit to all the service units, and solve the problems of low efficiency of independently updating the service units and easy error of manual processing.
Based on the above object, an aspect of the present invention provides a method for updating a service unit, which specifically includes the following steps:
acquiring and updating a basic file according to the acquired modification of the basic component information;
synchronizing the updated basic file to a service unit;
acquiring resource information of the service unit, and generating a file list according to the resource information and the basic file synchronized to the service unit;
and modifying the parameter information of the service unit according to the file list to complete the updating of the service unit.
In some embodiments, modifying the parameter information of the service unit according to the file list to complete the update of the service unit includes:
restarting the service unit;
verifying whether the function of the service unit after restarting is normal.
In some embodiments, the method further comprises:
before updating the basic file, modifying the connection configuration of the basic component, and opening the access right of the connection configuration to the address of the service unit.
In some embodiments, the method further comprises:
the front-end application server and the database are updated before the base file is updated.
In some embodiments, the connection configuration comprises: middleware, redis, and nacos.
In some embodiments, synchronizing the updated base file to each service unit includes:
and synchronizing the updated basic file to each service unit by using SSH.
In some embodiments, generating a file list from the resource information and the base file synchronized to the service unit comprises:
extracting files from the resource information and the base files synchronized to the service unit to generate the file list.
In some embodiments, the parameter information comprises: file authority of a file in the file list, a port of the service unit, and directivity information of the service unit.
In another aspect of the present invention, a system for updating a service unit is further provided, including:
the updating module is configured to acquire and update the basic file according to the acquired modification of the basic component information;
a synchronization module configured to synchronize the updated base file to a service unit;
the generating module is configured to acquire resource information of the service unit and generate a file list according to the resource information and the basic file synchronized to the service unit;
and the modification module is configured to modify the parameter information of the service unit according to the file list so as to complete the update of the service unit.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method as above.
The invention has the following beneficial technical effects: through the scheme of the invention, the modification of the basic components of the service units is quickly and conveniently transferred to all the service units, the updating efficiency of the service units is improved, and the problem that manual processing is easy to make mistakes is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a block diagram of a method of updating a service unit according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an update system for a service unit according to an embodiment of the invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a method for updating a service unit. As shown in fig. 1, the method comprises the steps of:
s1, acquiring and updating a basic file according to the acquired modification of the basic component information;
s2, synchronizing the updated basic file to a service unit;
s3, acquiring the resource information of the service unit, and generating a file list according to the resource information and the basic file synchronized to the service unit;
and S4, modifying the parameter information of the service unit according to the file list to complete the update of the service unit.
The scheme provided by the invention can quickly and conveniently transfer the modification of the basic environment to all the service units, and solves the problems that the efficiency of independently updating the service units is low and the manual processing is easy to make mistakes.
Specifically, according to the research and development conditions of the product, the related information of the product is obtained, mainly the contents of a reference platform and a service center station are obtained, it is ensured that each service unit needs to use such resources as basic component information, and the resource information required by each service unit to provide services independently is obtained. And taking the platform and the service middle platform as an environment base, and making the basic component information and the resource information required by the service unit into a file list. In the process, service registration and service discovery are set simultaneously, so that the functions of the service unit can be used normally.
For example, the current product is an enterprise auditing system, and the selected service units are a financial accounting function and a financial repayment function. The basic component information obtained at this time mainly includes basic component information such as users, authorities, organizations, audits, database operations, and the like. The resource information required by the financial accounting function mainly comprises all metadata, a program set, a configuration file, files in a related front-end application server, a database and other resource information required by the financial accounting function, basic component information and all resource information are made into basic files, different files required by a service unit are extracted from the basic files according to the function of the service unit, and a file list is made. After the basic component information is obtained and modified, updating the modified content to a basic file according to the modification of the basic component information, wherein the modification comprises operations of adding, deleting, changing and the like; synchronizing the updated basic file to a service unit; the service unit extracts different files from the basic file according to the requirement to generate a file list; after the file list is obtained, the medium of the service unit is split in an automatic mode, and the parameter information of the service unit is automatically modified to complete the updating of the service unit.
In some embodiments, modifying the parameter information of the service unit according to the file list to complete the update of the service unit further comprises:
restarting the service unit;
verifying whether the function of the service unit after restarting is normal.
Specifically, service starting is executed on each service unit through cluster management, the service starting registers the service units according to a file list, modified parameter information and the setting of a registration center, and then a front-end application server verifies the functions of the service units through a unified login entry in a nginx reverse proxy mode.
Further, some non-core service units may be shut down, and then it is verified whether the backbone service of the service unit can be used normally.
It should be noted that each time the update is completed, the restart is required to ensure that the service unit can normally register and provide the service.
In some embodiments, the method further comprises:
before updating the basic file, modifying the connection configuration of the basic component, and opening the access right of the connection configuration to the address of the service unit.
Specifically, connection configurations such as middleware, redis, nacos and the like are added between the service unit and the front-end application server and the database, and the access authority of the connection configurations is opened to the address of the service unit required, so as to ensure that the front-end application server and the database can be normally connected and used by the service unit.
In some embodiments, the method further comprises:
the front-end application server and the database are updated before the base file is updated.
Specifically, in the template environment, the front-end application server and the database are updated.
In some embodiments, the connection configuration comprises: middleware, redis, and nacos.
In some embodiments, synchronizing the updated base file to each service unit includes:
and synchronizing the updated basic file to each service unit by using SSH.
In some embodiments, generating a file list from the resource information and the base file synchronized to the service unit comprises: extracting files from the resource information and the base files synchronized to the service unit to generate the file list.
In some embodiments, the parameter information comprises: file authority of a file in the file list, a port of the service unit, and directivity information of the service unit.
Specifically, the directivity information is the content of the customized setting of the service unit, such as the name of the service unit.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 2, an embodiment of the present invention further provides an update system of a service unit, the system including:
an update module 110 configured to obtain and update a basic file according to the obtained modification of the basic component information;
a synchronization module 120 configured to synchronize the updated base file to a service unit;
a generating module 130, configured to obtain resource information of the service unit, and generate a file list according to the resource information and the basic file synchronized to the service unit;
and the modifying module 140 is configured to modify the parameter information of the service unit according to the file list to complete the updating of the service unit.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, the embodiment of the present invention further provides a computer device 20, in which the computer device 20 includes a processor 210 and a memory 220, the memory 220 stores a computer program 221 capable of running on the processor, and the processor 210 executes the program to perform the steps of the above method.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for updating a service unit, comprising:
acquiring and updating a basic file according to the acquired modification of the basic component information;
synchronizing the updated basic file to a service unit;
acquiring resource information of the service unit, and generating a file list according to the resource information and the basic file synchronized to the service unit;
and modifying the parameter information of the service unit according to the file list to complete the updating of the service unit.
2. The method of claim 1, wherein modifying the parameter information of the service unit according to the file list to complete the update of the service unit further comprises:
restarting the service unit;
verifying whether the function of the service unit after restarting is normal.
3. The method of claim 1, further comprising:
before updating the basic file, modifying the connection configuration of the basic component, and opening the access right of the connection configuration to the address of the service unit.
4. The method of claim 1, further comprising:
the front-end application server and the database are updated before the base file is updated.
5. The method of claim 3, wherein the connection configuration comprises: middleware, redis, and nacos.
6. The method of claim 1, wherein synchronizing the updated base file to each service unit comprises:
and synchronizing the updated basic file to each service unit by using SSH.
7. The method of claim 1, wherein generating a file list based on the resource information and the base file synchronized to the service unit comprises:
extracting files from the resource information and the base files synchronized to the service unit to generate the file list.
8. The method of claim 1, wherein the parameter information comprises: file authority of a file in the file list, a port of the service unit, and directivity information of the service unit.
9. A system for updating a service unit, comprising:
the updating module is configured to acquire and update the basic file according to the acquired modification of the basic component information;
a synchronization module configured to synchronize the updated base file to a service unit;
the generating module is configured to acquire resource information of the service unit and generate a file list according to the resource information and the basic file synchronized to the service unit;
and the modification module is configured to modify the parameter information of the service unit according to the file list so as to complete the update of the service unit.
10. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110694171.9A CN113342765A (en) | 2021-06-22 | 2021-06-22 | Service unit updating method, system and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110694171.9A CN113342765A (en) | 2021-06-22 | 2021-06-22 | Service unit updating method, system and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113342765A true CN113342765A (en) | 2021-09-03 |
Family
ID=77477640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110694171.9A Pending CN113342765A (en) | 2021-06-22 | 2021-06-22 | Service unit updating method, system and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113342765A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108628626A (en) * | 2018-05-04 | 2018-10-09 | 北京小度信息科技有限公司 | development environment building method, code update method and device |
CN108989113A (en) * | 2018-07-24 | 2018-12-11 | 网宿科技股份有限公司 | A kind of dispositions method and management server of server |
CN110149396A (en) * | 2019-05-20 | 2019-08-20 | 华南理工大学 | A kind of platform of internet of things construction method based on micro services framework |
CN110225078A (en) * | 2019-04-26 | 2019-09-10 | 深圳法大大网络科技有限公司 | A kind of application service update method, system and terminal device |
CN112051994A (en) * | 2019-06-06 | 2020-12-08 | 阿里巴巴集团控股有限公司 | Visual component information processing and page visual design method and device |
CN112486547A (en) * | 2021-02-03 | 2021-03-12 | 苏州达家迎信息技术有限公司 | Application program updating method and device under multi-tenant scene and electronic equipment |
CN112947965A (en) * | 2021-03-01 | 2021-06-11 | 北京百度网讯科技有限公司 | Containerized service updating method and device |
-
2021
- 2021-06-22 CN CN202110694171.9A patent/CN113342765A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108628626A (en) * | 2018-05-04 | 2018-10-09 | 北京小度信息科技有限公司 | development environment building method, code update method and device |
CN108989113A (en) * | 2018-07-24 | 2018-12-11 | 网宿科技股份有限公司 | A kind of dispositions method and management server of server |
CN110225078A (en) * | 2019-04-26 | 2019-09-10 | 深圳法大大网络科技有限公司 | A kind of application service update method, system and terminal device |
CN110149396A (en) * | 2019-05-20 | 2019-08-20 | 华南理工大学 | A kind of platform of internet of things construction method based on micro services framework |
CN112051994A (en) * | 2019-06-06 | 2020-12-08 | 阿里巴巴集团控股有限公司 | Visual component information processing and page visual design method and device |
CN112486547A (en) * | 2021-02-03 | 2021-03-12 | 苏州达家迎信息技术有限公司 | Application program updating method and device under multi-tenant scene and electronic equipment |
CN112947965A (en) * | 2021-03-01 | 2021-06-11 | 北京百度网讯科技有限公司 | Containerized service updating method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107579848B (en) | Method for dynamically changing consensus node in practical Byzantine fault-tolerant consensus mechanism | |
CN109885311B (en) | Application program generation method and device | |
WO2018219178A1 (en) | Data synchronization method and apparatus, server, and storage medium | |
TWI472934B (en) | Method, article, and apparatus for cross-synchronization of data | |
US10447814B2 (en) | Joint servicing of software packages | |
CN113127150B (en) | Rapid deployment method and device of cloud primary system, electronic equipment and storage medium | |
WO2021072861A1 (en) | Application service processing method and apparatus, and terminal and storage medium | |
US9477497B2 (en) | Methods for determining resource dependency and systems thereof | |
CN112364049B (en) | Data synchronization script generation method, system, terminal and storage medium | |
CN112711397A (en) | Method and system for establishing system based on micro-service and top-level design | |
CN111064626A (en) | Configuration updating method, device, server and readable storage medium | |
CN112905337A (en) | Software and hardware hybrid deployment MySQL cluster scheduling method and device | |
US7739232B2 (en) | Programming system for occasionally-connected mobile business applications | |
WO2021136233A1 (en) | Service upgrading method, device and system | |
CN111488286B (en) | Method and device for independently developing Android modules | |
CN111935260B (en) | Account synchronization method and device, electronic equipment and storage medium | |
CN116233283B (en) | Dynamic expansion and hot plug method of equipment communication protocol | |
CN113342765A (en) | Service unit updating method, system and computer equipment | |
CN116466983A (en) | Code management device, method, storage medium and electronic device | |
EP3883183A1 (en) | Virtualization management method and device | |
Tzvetanov et al. | A first look at forensic analysis of sailfishos | |
CN110324425B (en) | Hybrid cloud transaction route processing method and device | |
US8347315B1 (en) | Configuration console for messaging middleware | |
US10929210B2 (en) | Collaboration system protocol processing | |
CN112822190A (en) | Message maintenance method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |