A component management method, device and computer equipment of an application program
The centralized management of the component management server solves the problem of managing component information and dependencies in large-scale component development, thereby improving data consistency and development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, when the number of components is large, simple componentization cannot meet development needs, especially in terms of managing the components' developers, code addresses, and dependencies.
The component management server stores component dependency information for centralized management. Each component management client uses the same data to achieve unified management of component information and dependencies, and provides processing and feedback for component information operation requests.
It reduces data discrepancies in component management clients, meets the development needs of large-scale component data, provides standard component usage specifications, and improves development efficiency and stability.
Smart Images

Figure CN113094041B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a component management method and device of application program and computer equipment. BACKGROUND
[0002] In the software development process, with the passage of time, the software function is more and more complex, the code will become more and more, considering the easy maintenance, the design principle of reducing coupling degree, the concept of componentization is produced. The concept of componentization has been widely used in the development of application program, but when the components become more and more, the development team size becomes larger and larger, simple componentization can not meet the daily development, for example, when you want to know who is responsible for the development of a component, what is the code address of the component, what is the dependency relationship between the application program and the component, etc., it is impossible to determine by brain memory and code structure in the project. Therefore, it is urgent to propose a component management method of application program to realize the management of components, dependency relationship between components and dependency relationship between components and application program. SUMMARY
[0003] Therefore, the technical problem to be solved by the present application is to overcome the defect that simple componentization cannot meet the development requirements when the number of components is large in the prior art, so as to provide a component management method, device and computer equipment of application program.
[0004] According to the first aspect, the present application discloses a component management method of application program, comprising the following steps: receiving a component information operation request sent by a component management client, the component information operation request carrying identification information; according to the identification information and the component dependency relationship, executing the operation corresponding to the component information operation request; according to the operation result, sending operation feedback information to the component management client.
[0005] The present application realizes the centralized management of component information through the component dependency information stored by the component management server, each component management client uses the same component data, reduces the data difference of the component management client, and realizes the management of component information and component dependency relationship according to the component information operation request of the component management client, which meets the development requirements when the component data amount is large.
[0006] Optionally, the component information operation request comprises an application-component dependency relationship adding request, the identification information comprises identification information of a target application and identification information of a target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: determining whether the target application and the target component have a direct dependency relationship according to the identification information of the target application, the identification information of the target component and the component dependency relationship; and when the target application and the target component do not have a direct dependency relationship, associating the target application with the target component.
[0007] Optionally, when the target application and the target component do not have a direct dependency relationship, the associating the target application with the target component comprises: when the target application and the target component do not have a direct dependency relationship, determining whether the target component version number is carried in the application-component dependency relationship adding request; and when the target component version number is carried in the application-component dependency relationship adding request, associating the target application with the target component version number.
[0008] Optionally, when the target component version number is not carried in the application-component dependency relationship adding request, associating the target application with a first preset component version number of the target component.
[0009] Optionally, the component information operation request comprises an application-component dependency relationship adding request, the identification information comprises identification information of a target application and identification information of a target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: determining whether the target application and the target component have a direct dependency relationship according to the identification information of the target application, the identification information of the target component and the component dependency relationship; and when the target application and the target component do not have a direct dependency relationship, associating the target application with the target component.
[0010] Optionally, when the target application and the target component do not have a direct dependency relationship, the associating the target application with the target component comprises: when the target application and the target component do not have a direct dependency relationship, determining whether the target component version number is carried in the application-component dependency relationship adding request; and when the target component version number is carried in the application-component dependency relationship adding request, associating the target application with the target component version number.
[0011] Optionally, the component information operation request comprises a component version number designation request, the identification information is identification information of a target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: obtaining a second preset version number from the component version number designation request; and setting a target component version number of the target component to the second preset version number according to the identification information of the target component, so that the component management client uses the second preset version number of the target component when the component version number of the target component is updated.
[0012] According to a second aspect, the application further discloses a component management method of an application program, comprising the following steps: sending a component information operation request to a component management server in response to operation information of a user; and receiving operation feedback information sent by the component management server after performing an operation corresponding to the component information operation request according to the component operation request and a component dependency relationship.
[0013] The application centrally manages component information through component dependency information stored by a component management server, and each component management client uses the same component data, thereby reducing data differences of the component management clients, and the component management client sends a component information operation request to the component management server to manage component information and a component dependency relationship, thereby meeting development requirements when the component data is large.
[0014] Optionally, the component information operation request comprises a component query request, and after receiving the feedback information of the component management server, the method further comprises: obtaining a component information list; traversing the component information list; and generating a plurality of target files according to a component dependency relationship and component information of each component in the component information list.
[0015] The application generates a configuration file of a component through a development script of a component management client, thereby providing a standard component use specification for a developer and avoiding problems caused by non-uniform use specifications of developers.
[0016] According to a third aspect, the application further discloses a component management device of an application program, comprising: a first receiving module configured to receive a component information operation request sent by a component management client, the component information operation request carrying identification information; an execution module configured to perform an operation corresponding to the component information operation request according to the identification information and a component dependency relationship; and a first sending module configured to send operation feedback information to the component management client according to an operation result.
[0017] According to a fourth aspect, the application further discloses a component management apparatus of an application program, comprising: a second sending module configured to send a component information operation request to a component management server in response to user operation information; and a second receiving module configured to receive operation feedback information sent by the component management server after performing an operation corresponding to the component information operation request according to the component operation request and a component dependency relationship.
[0018] According to a fifth aspect, the application further discloses a computer device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the component management method of the application program according to the first aspect or any optional implementation manner of the first aspect or the steps of the component management method of the application program according to the second aspect or any optional implementation manner of the second aspect.
[0019] According to a sixth aspect, the application further discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the component management method of the application program according to the first aspect or any optional implementation manner of the first aspect or the steps of the component management method of the application program according to the second aspect or any optional implementation manner of the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0021] Figure 1 A specific example of the component management system of the application program in the embodiments of the application;
[0022] Figure 2 A flowchart of a specific example of the component management method of the application program in the embodiments of the application;
[0023] Figure 3 A flowchart of another specific example of the component management method of the application program in the embodiments of the application;
[0024] Figure 4 A flowchart of still another specific example of the component management method of the application program in the embodiments of the application;
[0025] Figure 5A principle block diagram of one specific example of the component management device of the application embodiment for the application program;
[0026] Figure 6 A principle block diagram of another specific example of the component management device of the application embodiment for the application program;
[0027] Figure 7 A diagram of one specific example of the computer device of the application embodiment. DETAILED DESCRIPTION
[0028] The technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0029] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0030] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal communication of two elements, it can be wireless connection, or wired connection. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0031] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0032] For example, Figure 1As shown, the component management system of the application program comprises a component management client 11 and a component management server 12 connected with each other, wherein the component management server 12 stores component information of a plurality of components, dependency relationships between the components and dependency relationships between the application program and the components, so as to facilitate the component management client 11 to query the component information, the dependency relationships between the components and the dependency relationships between the application program and the components, create the components, add the dependency relationships between the application program and the components, etc. The component management client 11 is a terminal of a developer and provides a man-machine interface and a development environment for the developer. Those skilled in the art can know that the component management system can further comprise a component performance monitoring system, a version management system and a file packaging system, etc.
[0033] Therefore, the embodiment of the application discloses a component management method of an application program, which is applied to a component management server, such as Figure 2 As shown, the method comprises the following steps:
[0034] S21: receiving a component information operation request sent by the component management client, wherein the component information operation request carries identification information.
[0035] Exemplarily, the component information operation request can comprise a component creation request, a component information modification / deletion request, an application program and component dependency relationship deletion / addition request, etc. The embodiment of the application does not make a specific limitation on the component information operation request, and those skilled in the art can determine it according to actual needs. The identification information can comprise identification information of the component and identification information of the application program. The identification information can be a component name or an application program name, or can be pre-set number information. The embodiment of the application does not make a specific limitation on the identification information, and those skilled in the art can also determine it according to actual conditions.
[0036] The component management client can be directly connected with the component management server or can be communicatively connected with the component management server. Correspondingly, the component information operation request can be sent by the component management client through a wired network or a wireless network.
[0037] S22: performing an operation corresponding to the component information operation request according to the identification information and a component dependency relationship.
[0038] Exemplarily, the component dependency relationship can comprise dependency relationships between the components and dependency relationships between the application program and the components. The embodiment of the application does not make a specific limitation on the component dependency relationship, and those skilled in the art can determine it according to actual conditions. Wherein, one application program can depend on one or more components, and the dependency relationship is unidirectional, and the component cannot depend on the application program; one component can also depend on one component or a plurality of components, but two components cannot depend on each other.
[0039] The operation corresponding to the component information operation request according to the identification information and the component dependency relationship can be determined according to the component information operation request. For example, when the component information operation request is an application and component dependency relationship query request, the component management server queries the component depended by the application according to the identification information of the application and the component dependency relationship.
[0040] S23: sending operation feedback information to the component management client according to the operation result.
[0041] Exemplarily, the feedback information can include storage success, modification success, query result, etc. The feedback information is not specifically limited in the embodiment of the application, and can be determined by a person skilled in the art according to the actual component information operation request.
[0042] The sending method of the operation feedback information can be a method of sending by the component management server through a wired network or a wireless network.
[0043] The embodiment of the application realizes centralized management of component information through the component dependency information stored by the component management server, and each component management client uses the same component data, thereby reducing the data difference of the component management client. Meanwhile, the management of the component information and the component dependency relationship is realized according to the component information operation request of the component management client, thereby meeting the development requirement when the component data is large.
[0044] As an optional implementation of the embodiment of the application, when the component information operation request is a component creation request, the component creation request can carry the name of the component to be created, the creator, the version number, the function description, etc. The component creation request is not specifically limited in the embodiment of the application, and can be determined by a person skilled in the art according to the actual situation. The component management server can create the component and store it according to the information carried in the component creation request. When the creation is completed, the component management server sends feedback information of creation success to the component management client.
[0045] As an optional implementation of the embodiment of the application, when the component information operation request is a component information modification request, the component information modification request carries the component information to be modified and the replacement information of the component information. The identification information can include the identification information of the target component. The component management client determines the component to be modified according to the identification information of the target component, and then stores the component information after replacing the component information to be modified by using the replacement information of the component information. For example, the name of the target component is modified from A to B. When the modification is completed, the component management server sends feedback information of modification completion to the component management client.
[0046] As an optional implementation of the embodiment of the present application, when the component information operation request is a request for adding a dependency relationship between an application and a component, the identification information can include identification information of the target application and identification information of the target component, and the step S22 includes:
[0047] First, whether there is a direct dependency relationship between the target application and the target component is determined according to the identification information of the target application, the identification information of the target component and the component dependency relationship.
[0048] Second, when there is no direct dependency relationship between the target application and the target component, the target application and the target component are associated.
[0049] For example, whether there is a direct dependency relationship between the target application and the target component is determined by the component management server according to the identification information of the target application, the identification information of the target component and the component dependency relationship. If there is already a direct dependency relationship between the target application and the target component, the component management server sends prompt information that the dependency relationship already exists to the component management client. If there is no direct dependency relationship between the target application and the target component, the target application and the target component are associated.
[0050] As an optional implementation of the embodiment of the present application, when there is no direct dependency relationship between the target application and the target component, the target application and the target component are associated, which includes:
[0051] First, when there is no direct dependency relationship between the target application and the target component, whether the component version number of the target component is carried in the request for adding a dependency relationship between an application and a component is determined.
[0052] Second, when the component version number of the target component is carried in the request for adding a dependency relationship between an application and a component, the component version number of the target application and the target component are associated.
[0053] Third, when the component version number of the target component is not carried in the request for adding a dependency relationship between an application and a component, the first preset component version number of the target application and the target component are associated.
[0054] Exemplarily, when the target application program has no direct dependency relationship with the target component, the component management server needs to determine whether the component version number of the target component is carried in the dependency relationship adding request of the application program and the component, and when the component version number is carried, the component version number of the target application program and the target component is associated; when the component version number is not carried, the first preset component version number of the target application program and the target component is associated, and the first preset version number can be the latest component version number or the component version number with good performance preset in advance. The first preset component version number is not limited in the embodiment of the application, and can be determined by the person skilled in the art according to the actual situation.
[0055] As an optional embodiment of the embodiment of the application, when the component version number of the target component of the target application program is determined, it is determined whether the component version identifier corresponding to the target component version number exists in the component management server, and when the component version identifier exists, the component version identifier is obtained from the component management server and associated; when the component version identifier does not exist, a component version identifier is added according to the component version number and then associated.
[0056] As an optional embodiment of the embodiment of the application, when the component management server performs the association processing of the target application program and the target component, it can be determined according to the locally stored component dependency relationship whether other application programs depend on the component, and when other application programs depend on the component, the target application program is directly associated with the target component, and when no other application programs depend on the component, the first adding mark of the target component is determined as the target application program and stored when the target application program is associated with the target component.
[0057] As an optional embodiment of the embodiment of the application, the component information operation request includes: a component dependency relationship query request of an application program, the identification information includes: identification information of a target application program, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, including:
[0058] Firstly, it is determined whether the target application program has a direct dependency component according to the identification information of the target application program and the component dependency relationship.
[0059] Secondly, when the target application program has a direct dependency component, the component information of the direct dependency component is determined as the query result.
[0060] Exemplarily, in the embodiment of the present application, the direct dependency relationship between the application program and the component refers to that the application program is directly associated with the component, i.e., the application program directly references the component. For example, the application program a depends on the component b, and the component b depends on the component c, then the component b is a direct dependency component of the application program a, and the component c is an indirect dependency component of the application program a. The number of the direct dependency components can be one or multiple. The number of the direct dependency components is not specifically limited in the embodiment of the present application, and can be determined by the person skilled in the art according to the actual situation.
[0061] The component information can include the component name, the component version number, the first added application program, etc. The component information is not specifically limited in the embodiment of the present application, and can be determined by the person skilled in the art according to the actual situation.
[0062] As an optional implementation manner of the embodiment of the present application, when the target application program has the direct dependency component, the component information of the direct dependency component is determined as the query result, which includes:
[0063] Firstly, when the target application program has the direct dependency component, whether the direct dependency component has the dependency component is determined according to the component dependency relationship.
[0064] Secondly, when the direct dependency component has the dependency component, the component information of the dependency component of the direct dependency component is determined as the query result.
[0065] Exemplarily, when the direct dependency component of the target application program is determined from the component dependency relationship, the dependency component of the direct dependency component is determined according to the direct dependency component and the component dependency relationship. When the direct dependency component has the dependency component, the component information of the dependency component of the direct dependency component is written into the query result set. When the direct dependency component does not have the dependency component, the dependency file related to the direct dependency component is obtained from the branch with the most stable development process code in the code repository (gitlab) to determine whether the direct dependency component has the dependency component. When the dependency component of the direct dependency component cannot be obtained from the dependency file, the dependency component of the direct dependency component is set to be empty. When the dependency component of the direct dependency component is obtained from the dependency file, the component information of the dependency component of the direct dependency component is written into the query result set.
[0066] As an optional implementation manner of the embodiment of the present application, the component information operation request includes the component version number specifying request, the identification information is the identification information of the target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, which includes:
[0067] Firstly, the second preset version number is obtained from the component version number specifying request.
[0068] Secondly, the target component version number of the target component is set as a second preset version number according to the identification information of the target component, so that the component management client uses the second preset version number of the target component when the component version number of the target component is updated.
[0069] Exemplarily, when the target component X is just updated, the application Y wants to be on the market, and there is no time to complete the test on the latest version of the target component X, and the technician tends to select a version with relatively stable performance to be on the market, and therefore, it is necessary to set a target version number for each component. The second preset version number can be a version number with relatively good performance of the target component. The second preset version number can be the same as the first preset version number.
[0070] The embodiment of the application sets a target component version number with relatively good performance for each component, facilitates the use of the application, and improves the stability of the application.
[0071] The embodiment of the application also discloses a component management method of an application, as described above. Figure 2 The component management method comprises the following steps:
[0072] S31: In response to the operation information of the user, a component information operation request is sent to the component management server.
[0073] Exemplarily, in the embodiment of the application, the user clicks a related virtual button on the man-machine interactive interface of the component management client to realize a related operation, and the component management client sends a component information operation request to the component management server in response to the operation information of the user. The component information operation request can be sent to the component management server by the component management client through a wired network or a wireless network, and the sending method of the component information operation request is not limited in the embodiment of the application, and can be determined by the connection relationship between the component management client and the component management server. The specific content of the component information operation request can be referred to the description of step S21, and will not be described here.
[0074] S32: Operation feedback information sent by the component management server after executing the operation corresponding to the component information operation request according to the component operation request and the component dependency relationship is received. The specific implementation process is referred to the description of step S23, and will not be described here.
[0075] The application centrally manages the component information through the component dependency information stored by the component management server, and each component management client uses the same component data, so that the data difference of the component management client is reduced, and the component management client sends a component information operation request to the component management server to realize the management of the component information and the component dependency relationship, so that the development requirement when the component data is large is met.
[0076] As an optional implementation of the embodiment of the present application, the component information operation request comprises a component query request, and after receiving the feedback information of the component management server, the component management method of the application further comprises:
[0077] Firstly, a component information list is acquired.
[0078] Secondly, the component information list is traversed.
[0079] Thirdly, a plurality of target files are generated according to the component dependency relationship of each component in the component information list and the component information.
[0080] Exemplarily, the component information list can comprise the component information of all components in the component query request, which can be acquired from the feedback information of the component management server. The target file can comprise a component declaration file, an exclusion dependency conflict file, a specified version file and the like.
[0081] Wherein, the dependency conflict refers to that in the development process, the code of the same component can be packaged into different Group_ID, when an application references different Group_ID of the same component, a conflict occurs, which cannot be compiled, and the Group_ID indicates the Group corresponding to the component uploaded to the Maven warehouse.
[0082] The component declaration refers to defining a long component address by using a variable, so that the user does not need to care about the specific address information, and directly uses the variable when using the component.
[0083] A specific generation method of the component declaration file can be: root Project.ext.set('KEY', Group_ID + '.git Group:module Name:latest.integration'); a specific generation method of excluding dependency conflict files can be: configurations{all*.exclude group:'com.ziroom.customer.GitGroup,module:'module Name'}; and a specific generation method of specifying version files can be: configurations.all{resolution Strategy{force 'com.ziroom.customer.Git Group,module:'module Name:version'}}. In the above examples, KEY represents a variable name, when the component is used, the KEY can be directly referenced; git Group represents a gitlab group, which is a path for storing projects; module Name is a component name, version represents a version number, and the others are syntaxes of a build script.
[0084] The embodiment of the application generates the configuration file of the component by the development script of the component management client, provides a standard component use specification for the developers, and avoids the problem that the developers use the specification in a non-uniform manner and the problem is difficult to troubleshoot.
[0085] The embodiment of the application further discloses a component management method of an application program. Figure 4 As shown in the figure, the component management system of the application program comprises a component management client and a component management server connected with each other, and comprises the following steps.
[0086] S31: The component management client sends a component information operation request to the component management server in response to operation information of a user.
[0087] The component management server receives the component information operation request sent by the component management client, and the component information operation request carries identification information.
[0088] S21: The component management server receives the component information operation request sent by the component management client, and the component information operation request carries identification information.
[0089] S22: The component management server performs an operation corresponding to the component information operation request according to the identification information and a component dependency relationship.
[0090] S23: The component management server sends operation feedback information to the component management client according to the operation result.
[0091] S32: The component management client receives operation feedback information sent by the component management server after the component management server performs an operation corresponding to the component information operation request according to the component operation request and the component dependency relationship.
[0092] The description of each step in the embodiment is the same as that of the above embodiment, and will not be repeated here.
[0093] The component management method of the application program provided by the embodiment stores component dependency information in the component management server to centrally manage component information, each component management client uses the same component data, the data difference of the component management client is reduced, and the management of component information and component dependency relationship is realized according to the component information operation request of the component management client, thereby meeting the development requirement when the component data is large.
[0094] The embodiment of the application further discloses a component management device of an application program, as shown in the figure, applied to a component management server, comprising: Figure 5
[0095] The first receiving module 41 is configured to receive a component information operation request sent by a component management client, and the component information operation request carries identification information; the specific implementation manner is described in the above embodiment, and will not be repeated here.
[0096] The execution module 42 is configured to perform an operation corresponding to the component information operation request according to the identification information and the component dependency relationship; the specific implementation manner is described in the above embodiment, and will not be repeated here.
[0097] The first sending module 43 is configured to send operation feedback information to the component management client according to the operation result. The specific implementation manner is described in the above embodiment, and will not be repeated here.
[0098] The component management method of the application program provided by the embodiment stores component dependency information in the component management server to centrally manage component information, each component management client uses the same component data, the data difference of the component management client is reduced, and the management of component information and component dependency relationship is realized according to the component information operation request of the component management client, thereby meeting the development requirement when the component data is large.
[0099] As an optional implementation manner of the embodiment, the component information operation request comprises an application and component dependency relationship addition request, the identification information comprises identification information of a target application and identification information of a target component, and the execution module 42 comprises:
[0100] The first determining module is configured to determine whether the target application program and the target component have a direct dependency relationship according to the identification information of the target application program, the identification information of the target component, and the component dependency relationship. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0101] The association module is configured to associate the target application program and the target component when the target application program and the target component do not have a direct dependency relationship. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0102] As an optional implementation of the embodiment of the application, when the target application program and the target component do not have a direct dependency relationship, the association module includes:
[0103] The second determining module is configured to determine whether the component version number of the target component is carried in the dependency relationship addition request of the application program and the component when the target application program and the target component do not have a direct dependency relationship. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0104] The first association submodule is configured to associate the target application program and the component version number of the target component when the component version number of the target component is carried in the dependency relationship addition request of the application program and the component. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0105] As an optional implementation of the embodiment of the application, the component management device of the application program further includes:
[0106] The second association submodule is configured to associate the target application program and the preset component version number of the target component when the component version number of the target component is not carried in the dependency relationship addition request of the application program and the component. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0107] As an optional implementation of the embodiment of the application, the component information operation request includes: a component dependency relationship query request of the application program, the identification information includes: identification information of the target application program, and the execution module 42 includes:
[0108] The third determining module is configured to determine whether the target application program has a direct dependency component according to the identification information of the target application program and the component dependency relationship. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0109] The fourth determining module is configured to determine the component information of the directly dependent component as the query result when the target application program has the directly dependent component. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0110] As an optional implementation of the embodiment of the application, the fourth determining module comprises:
[0111] The fourth determining sub-module is configured to determine whether the directly dependent component has a dependent component according to the component dependency relationship when the target application program has the directly dependent component. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0112] The query result determining module is configured to determine the component information of the directly dependent component and the dependent component of the directly dependent component as the query result when the directly dependent component has the dependent component. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0113] As an optional implementation of the embodiment of the application, the component information operation request comprises a component version number specifying request, and the identification information is the identification information of the target component. The execution module 42 comprises:
[0114] The first obtaining module is configured to obtain a first preset version number from the component version number specifying request. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0115] The setting module is configured to set the target component version number of the target component to the first preset version number according to the identification information of the target component, so that the component management client uses the first preset version number of the target component when the component version number of the target component is updated. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.
[0116] The embodiment of the application further discloses a component management device of an application program, as shown in the figure. Figure 6 The component management device is applied to a component management client and comprises:
[0117] The second sending module 51 is configured to send a component information operation request to the component management server in response to the operation information of the user. For details, refer to the related description of step S31 in the above embodiment, which will not be repeated here.
[0118] The second receiving module 52 is configured to receive operation feedback information sent by the component management server after the component management server executes an operation corresponding to the component information operation request according to the component operation request and the component dependency relationship. For details, refer to the related description of step S32 in the above embodiment, which will not be repeated here.
[0119] This invention centrally manages component information by storing component dependency information on the component management server. Each component management client uses the same component data, reducing data discrepancies between component management clients. At the same time, the component management client sends component information operation requests to its own management server to manage component information and component dependencies, meeting the development needs when the component data volume is large.
[0120] As an optional implementation of this invention, the component information operation request includes: a component query request, and the component management device of the application further includes:
[0121] The second acquisition module is used to acquire a list of component information; the specific implementation method is described in the relevant steps of the above embodiments, and will not be repeated here.
[0122] The traversal module is used to traverse the component information list; the specific implementation method is described in the relevant steps of the above embodiments, and will not be repeated here.
[0123] The generation module is used to generate multiple target files based on the component dependencies and component information of each component in the component information list. The specific implementation is described in the relevant steps of the above embodiments and will not be repeated here.
[0124] This invention also provides a computer device, such as... Figure 7 As shown, the computer device may include a processor 61 and a memory 62, wherein the processor 61 and the memory 62 may be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0125] Processor 61 can be a central processing unit (CPU). Processor 61 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0126] Memory 62, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the component management method of the application program in this embodiment of the invention (e.g., Figure 5the first receiving module 41, the executing module 42 and the first sending module 43 or Figure 6 the second sending module 51 and the second receiving module 52). The processor 61 performs various function applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 62, i.e. implements the component management method of the application program in the above-mentioned method embodiments.
[0127] The memory 62 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program required by a function; the data storage area can store data created by the processor 61 and the like. In addition, the memory 62 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory 62 can optionally include a memory remotely arranged with respect to the processor 61, and these remote memories can be connected to the processor 61 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0128] The one or more modules are stored in the memory 62 and, when executed by the processor 61, perform the component management method of the application program in the above-mentioned embodiments. Figure 2
[0129] The above-mentioned computer device specific details can be understood by referring to the corresponding related descriptions and effects in the above-mentioned embodiments, which will not be described here again. Figures 2-3
[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD) and the like; the storage medium can also include a combination of the above-mentioned kinds of memories.
[0131] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A component management method of an application program, characterized by, The method comprises the following steps: receiving a component information operation request sent by a component management client, the component information operation request carrying identification information; performing an operation corresponding to the component information operation request according to the identification information and a component dependency relationship; sending operation feedback information to the component management client according to an operation result; the component dependency relationship comprises a dependency relationship between components and a dependency relationship between an application program and a component, wherein one application program can depend on one or more components, the dependency relationship is unidirectional, a component cannot depend on an application program, one component can depend on one or more components, but two components cannot depend on each other; the component information operation request comprises an application program component dependency relationship query request, and the identification information comprises identification information of a target application program; the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, and the operation comprises: determining whether the target application program has a directly dependent component according to the identification information of the target application program and the component dependency relationship; when the target application program has a directly dependent component, determining component information of the directly dependent component as a query result; when the target application program has a directly dependent component, the operation of determining the component information of the directly dependent component as the query result comprises: determining whether the directly dependent component has a dependent component according to the component dependency relationship when the target application program has the directly dependent component; when the directly dependent component has a dependent component, determining the component information of the directly dependent component and the dependent component of the directly dependent component together as the query result.
2. The method of claim 1, wherein, the component information operation request comprises an application program and component dependency relationship addition request, the identification information comprises identification information of a target application program and identification information of a target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, and the operation comprises: determining whether the target application program and the target component have a direct dependency relationship according to the identification information of the target application program, the identification information of the target component and the component dependency relationship; when the target application program and the target component do not have a direct dependency relationship, associating the target application program with the target component.
3. The method of claim 2, wherein, when the target application program and the target component do not have a direct dependency relationship, the operation of associating the target application program with the target component comprises: when the target application program and the target component do not have a direct dependency relationship, determining whether the target component has a component version number carried in the application program and component dependency relationship addition request; when the target component has the component version number carried in the application program and component dependency relationship addition request, associating the target application program with the component version number of the target component.
4. The method of claim 3, wherein, When the application and the dependency relationship of the component do not carry the component version number of the target component in the addition request, the target application is associated with the first preset component version number of the target component.
5. The method of claim 1, wherein, The component information operation request comprises a component version number designation request, the identification information is identification information of a target component, and the operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: Obtaining a second preset version number from the component version number designation request; Setting a target component version number of the target component as the second preset version number according to the identification information of the target component, so that the component management client uses the second preset version number of the target component when the component version number of the target component is updated.
6. A component management method of an application program, characterized by, Comprising the following steps: In response to user operation information, a component information operation request is sent to a component management server; Receiving operation feedback information sent by the component management server after performing an operation corresponding to the component information operation request according to the identification information and the component dependency relationship; The component dependency relationship comprises a dependency relationship between components and a dependency relationship between applications and components, wherein one application can depend on one or more components, the dependency relationship is unidirectional, components cannot depend on applications, and one component can depend on one or more components, but two components cannot depend on each other; The component information operation request comprises a component dependency relationship query request of an application, and the identification information comprises identification information of a target application; The operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: According to the identification information of the target application and the component dependency relationship, it is determined whether the target application has a directly dependent component; When the target application has a directly dependent component, the component information of the directly dependent component is determined as a query result; When the target application has a directly dependent component, the component information of the directly dependent component is determined as a query result, comprising: When the target application has a directly dependent component, it is determined according to the component dependency relationship whether the directly dependent component has a dependent component; When the directly dependent component has a dependent component, the component information of the directly dependent component and the dependent component of the directly dependent component are determined as a query result.
7. The method of claim 6, wherein, The component information operation request comprises a component query request, and after receiving the feedback information of the component management server, the method further comprises: Obtaining a component information list; Traversing the component information list; Generating a plurality of target files according to the component dependency relationship and the component information of each component in the component information list.
8. An application component management apparatus characterized by comprising: Comprising: A first receiving module configured to receive a component information operation request sent by a component management client, the component information operation request carrying identification information; An execution module configured to perform an operation corresponding to the component information operation request according to the identification information and a component dependency relationship. The first sending module is used for sending operation feedback information to the component management client according to the operation result; The component dependency relationship comprises dependency relationships between components and between applications and components, wherein one application can depend on one or more components, the dependency relationship is unidirectional, a component cannot depend on an application, one component can depend on one or more components, but two components cannot depend on each other; The component information operation request comprises a component dependency relationship query request of an application, and the identification information comprises identification information of a target application; The execution module comprises a first determination submodule and a second determination submodule; The first determination submodule is used for determining whether the target application has a directly dependent component according to the identification information of the target application and the component dependency relationship; The second determination submodule is used for determining component information of the directly dependent component as the query result when the target application has the directly dependent component; The second determination submodule is used for determining, when the target application has the directly dependent component, whether the directly dependent component has a dependent component according to the component dependency relationship, and determining, when the directly dependent component has the dependent component, the component information of the directly dependent component and the dependent component of the directly dependent component together as the query result.
9. An application component management apparatus characterized by comprising: Comprise: The second sending module is used for sending a component information operation request to a component management server in response to user operation information; The second receiving module is used for receiving operation feedback information sent by the component management server after performing an operation corresponding to the component information operation request according to identification information and a component dependency relationship; The component dependency relationship comprises dependency relationships between components and between applications and components, wherein one application can depend on one or more components, the dependency relationship is unidirectional, a component cannot depend on an application, one component can depend on one or more components, but two components cannot depend on each other; The component information operation request comprises a component dependency relationship query request of an application, and the identification information comprises identification information of a target application; The operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: determining whether the target application has a directly dependent component according to the identification information of the target application and the component dependency relationship; determining component information of the directly dependent component as the query result when the target application has the directly dependent component; The operation corresponding to the component information operation request is performed according to the identification information and the component dependency relationship, comprising: determining, when the target application has the directly dependent component, whether the directly dependent component has a dependent component according to the component dependency relationship; determining, when the directly dependent component has the dependent component, the component information of the directly dependent component and the dependent component of the directly dependent component together as the query result.
10. A computer device, comprising: Comprise: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the component management method of the application program of any one of claims 1-5 or the steps of the component management method of the application program of claim 6 or 7.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the component management method of the application program of any one of claims 1-5 or the steps of the component management method of the application program of claim 6 or 7.
Citation Information
Patent Citations
Application component version management method and device
CN106293763A