Software product storage method, device, equipment, storage medium and program product
By obtaining the target business information from the query request, matching the storage strategy, and determining the target artifact library, the problem that existing technologies cannot meet personalized storage needs is solved, and efficient software artifact storage in complex business scenarios is achieved.
Patent Information
- Application Number
- CN202411102391.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing technologies cannot meet the storage needs of software artifacts in real and complex business scenarios, especially personalized storage needs, such as storage based on the geographical location of engineering teams or enterprise branches.
By obtaining the target business information from the query request, matching it with the pre-set storage strategy, determining the target storage strategy, and identifying the target artifact library based on the artifact library identifier in the target storage strategy, fine-grained storage matching is achieved to ensure that the artifact library meets the user's personalized needs.
It enables distributed storage of software artifacts in real and complex business scenarios, improves storage business processing efficiency, and ensures that artifacts are stored in an artifact library that meets the target business requirements.
Smart Images

Figure CN119094525B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud computing, and particularly relates to a software product storage method and device, equipment, storage medium and program product. BACKGROUND
[0002] With the development of big data, in order to improve the efficiency of data storage, distributed storage is usually used. Similarly, the corresponding product library storage of software development can also be implemented based on distribution. In distributed storage, the configurations and performances of each storage node are mostly inconsistent. Users expect to be able to store based on the characteristics of the storage node and the characteristics of the product data, thereby maximizing the efficiency of data storage, and when the corresponding business of the product changes, the storage node of the product data can be dynamically updated.
[0003] In the prior art, the load data of each storage node is obtained, and the final storage node is selected based on the principle of load balancing, or the product data corresponding to different businesses is stored in the storage node corresponding to the different businesses based on the business classification method.
[0004] However, the prior art cannot meet the real complex business scenarios. SUMMARY
[0005] The present application provides a software product storage method, device, equipment, storage medium and program product to solve the technical problem that the prior art cannot meet the real complex business scenarios.
[0006] In a first aspect, an embodiment of the present application provides a software product storage method, comprising:
[0007] Obtaining a query request, the query request being used to determine a target product library for storing a to-be-stored product;
[0008] According to target business information of the to-be-stored product carried in the query request, a target storage strategy is determined from a plurality of storage strategies preset in advance; wherein the target business information includes an environment type for producing the to-be-stored product and corresponding environment parameter values, the environment type includes at least one of a tenant, a machine room and a physical subsystem, the environment parameter values include at least one of a production location, a production organization identifier and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between business information and a product library identifier;
[0009] According to a product library identifier contained in the target storage strategy, a target product library is determined;
[0010] The to-be-stored product is stored in the target product library.
[0011] In a possible design, the target storage strategy is determined from a plurality of preset storage strategies according to target service information of the to-be-stored product carried in the query request, and the target storage strategy includes the following steps.
[0012] The storage strategy with the same service information as the target service information is determined as the target storage strategy.
[0013] In a possible design, the target storage strategy is determined as follows:
[0014] The storage strategy with the same service information as the target service information is determined as the initial storage strategy.
[0015] If the number of the initial storage strategies is more than one, the initial storage strategy with the highest priority is determined as the target storage strategy.
[0016] If the number of the initial storage strategies is one, the initial storage strategy is determined as the target storage strategy.
[0017] In a possible design, the target product library is determined according to a product library identifier included in the target storage strategy.
[0018] The initial product library corresponding to the product library identifier is determined according to the product library identifier included in the target storage strategy.
[0019] If the number of the initial product libraries is one, the initial product library is determined as the target product library.
[0020] If the number of the initial product libraries is more than one, the target product library is determined from the plurality of initial product libraries according to a weight pre-assigned to each initial product library.
[0021] In a possible design, before the query request is obtained, the method further includes the following step.
[0022] According to the preset storage requirement and the storage performance of each product library, a weight is configured for each product library corresponding to the storage strategy in each storage strategy.
[0023] In a possible design, after the to-be-stored product is stored in the target product library, the method further includes the following step.
[0024] The weight of the target product library in the target storage strategy is reduced.
[0025] In a possible design, after the to-be-stored product is stored in the target product library, the method further includes the following step.
[0026] The weights of all the product libraries in the target storage strategy are updated.
[0027] In a second aspect, an embodiment of the present application provides a software product storage device, comprising:
[0028] an acquisition module, configured to acquire a query request, the query request being used to determine a target product library for storing a to-be-stored product;
[0029] a first processing module, configured to determine a target storage strategy from a plurality of storage strategies pre-set according to target business information of the to-be-stored product carried in the query request, wherein the target business information comprises an environment type for producing the to-be-stored product and corresponding environment parameter values, the environment type comprises at least one of a tenant, a computer room, and a physical subsystem, the environment parameter values comprise at least one of a production location, a production organization identifier, and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between business information and a product library identifier;
[0030] a second processing module, configured to determine the target product library according to a product library identifier contained in the target storage strategy;
[0031] a third processing module, configured to store the to-be-stored product into the target product library.
[0032] In a possible implementation, the first processing module is configured to determine the target storage strategy from the storage strategies based on the target business information, and specifically:
[0033] a storage strategy with the same business information as the target business information is determined as the target storage strategy.
[0034] In a possible implementation, the first processing module is configured to determine the target business strategy through matching of the target business information and storage strategy business information, and specifically:
[0035] a storage strategy with the same business information as the target business information is determined as an initial storage strategy;
[0036] if the number of the initial storage strategies is more than one, an initial storage strategy with the highest priority is determined as the target storage strategy;
[0037] if the number of the initial storage strategies is one, the initial storage strategy is determined as the target storage strategy.
[0038] In a possible implementation, the second processing module is further configured to determine the target product library according to the product library identifier, and specifically:
[0039] an initial product library corresponding to the product library identifier is determined according to the product library identifier contained in the target storage strategy;
[0040] If the number of initial product libraries is one, the initial product library is determined as the target product library; if the number of initial product libraries is multiple, the target product library is determined from the multiple initial product libraries according to the weight pre-assigned to each initial product library.
[0041] In a possible implementation, the obtaining module is further configured to configure a weight for each product library, specifically:
[0042] According to the preset storage requirement and the storage performance of each product library, a weight is configured for each product library corresponding to the storage strategy in each storage strategy.
[0043] In a possible implementation, the third processing module is further configured to reduce the weight of the target product library after the software product is stored, specifically:
[0044] The weight of the target product library in the target storage strategy is reduced.
[0045] In a possible implementation, the third processing module is further configured to:
[0046] The weight of all product libraries in the target storage strategy is updated.
[0047] In a third aspect, an embodiment of the present application provides a software product storage device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the software product storage method of the first aspect and various possible designs of the first aspect.
[0048] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions; when a processor executes the computer execution instructions, the software product storage method of the first aspect and various possible designs of the first aspect is implemented.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program; when the computer program is executed by a processor, the software product storage method of the first aspect and various possible designs of the first aspect is implemented.
[0050] The software product storage method, device, equipment, storage medium and program product provided by the embodiments of the present application, in the method, a query request corresponding to a to-be-stored product is acquired, and target service information corresponding to the to-be-stored product is acquired based on the query request; the target service information is matched with service information in a plurality of storage strategies set in advance, and a target storage strategy meeting the target service information is acquired; a target product library available for the to-be-stored product is determined based on a product library identifier contained in the target storage strategy, and the to-be-stored product is stored based on the target product library. In the technical solution, the target product library is determined through matching of the target service information and the plurality of storage strategies, and the storage mode based on the target service information is implemented, fine storage matching is implemented at the service information level, and it is ensured that the product can be stored in the product library meeting the target service requirement; the storage of the product is implemented through the target service information hitting the storage strategy, the situation that the service requirement is not considered in the balanced storage is avoided, and the situation that the complex service scenario is not considered in the classified storage is avoided, so that the effect of improving the storage service processing efficiency is achieved, and the distributed storage requirement of the software storage in the real complex service scenario is effectively met. BRIEF DESCRIPTION OF DRAWINGS
[0051] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0052] Figure 1 Flowchart of a software product storage method provided by the present application Figure 1 ;
[0053] Figure 2 Flowchart of a software product storage method provided by the present application Figure 2 ;
[0054] Figure 3 Flowchart of a software product storage strategy routing method provided by the present application
[0055] Figure 4 Flowchart of a software product storage polling method provided by the present application
[0056] Figure 5 Structure diagram of a software product storage device provided by the present application
[0057] Figure 6 Hardware structure diagram of a software product storage device provided by the present application
[0058] The specific embodiments of the application have been shown by way of example in the above figures, and will be described in more detail hereafter. These figures and this written description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate the inventive concept to one of ordinary skill in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0059] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description herein is intended for illustrating the inventive concept by reference to specific embodiments, and is not intended to limit the scope of the inventive concept in any way.
[0060] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data comply with relevant laws and regulations and do not violate public order and good customs.
[0061] It should be noted that in the embodiments of the present application, some existing industry solutions such as software, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0062] Terminology:
[0063] Software product: refers to any product or result produced by the software development process.
[0064] In the prior art, the load data of each storage node is obtained, and the final storage node is selected based on the principle of load balancing, or the product data corresponding to different services is stored in the storage node corresponding to the different services based on the service classification method.
[0065] However, in real complex business scenarios, users' storage requirements for software products are not only load balancing storage or classification storage, but also have some personalized requirements. For example, an organization may want to store software products into different product libraries according to different engineering or teams. For example, the products of development team A are stored in library A, and the products of development team B are stored in library B. This can help teams better manage and control their own products, and also facilitate permission management and access control. For example, for multinational enterprises, users may want to determine the storage library of the software products of the enterprise branch according to the geographical location of the branch, so as to be closer to the user or reduce data transmission delay. These personalized requirements cannot be met by the prior art, i.e. the prior art cannot meet the real complex business scenarios.
[0066] In view of the above technical problems, the present application proposes the following technical concept: considering that users have personalized needs for software products, the business information in a complex business scenario can be analyzed, and the business information is used as the core to guide the storage allocation, so as to determine a storage strategy that can guide the storage allocation and meet the personalized storage needs of the user. In this way, when a query request is obtained, the target storage strategy matched with the query request can be determined according to the business information carried in the query request, and then the target product library that meets the personalized storage needs of the user can be determined according to the target storage strategy. By combining the product library and the business information, the storage nodes are combined with the business information, so that the storage matching is refined at the business information level, and it is ensured that the product can be stored in the product library that meets the target business needs, thereby solving the problem that the product data storage does not meet the user's expectations in the prior art, and meeting the needs of distributed storage of software products in real complex business scenarios.
[0067] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.
[0068] Figure 1 Flowchart of the software product storage method provided by the present application Figure 1 As shown in Figure 1 , the method comprises:
[0069] S101, obtaining a query request.
[0070] The execution subject of the embodiment of the present application is a software product storage device, which can be a terminal device such as a mobile phone, a notebook computer, a desktop computer, etc., and can also be a server. In actual application, whether the software product storage device is implemented as a terminal device or a server can be determined according to actual conditions, and the present application embodiment does not specifically limit this.
[0071] In this step, the query request is used to determine a target product library for storing a to-be-stored product.
[0072] In a possible implementation, the query request can be generated in response to a query operation of a user. For example, a software product storage device displays a software product control and a submit control in a graphical user interface. A user can click the software product control to select a software product to be stored, and then click the submit control. The software product storage device determines the product to be stored in response to the click operation of the user on the software product control, and generates the query request in response to the click operation of the user on the submit control. In this example, the query operation of the user is the click operation of the user on the software product control and the click operation of the user on the submit control.
[0073] In a possible implementation, the query request can be sent by a terminal device used by a user. Specifically, the terminal device used by the user generates and sends the query request to the software product storage device in response to a query operation of the user. Accordingly, the software product storage device receives the query request.
[0074] It should be understood that the software product storage device and the terminal device used by the user can communicate and interact through a wired or wireless manner, and the communication manner of the software product storage device and the terminal device used by the user is not limited in the present application.
[0075] S102, determining a target storage strategy from a plurality of storage strategies pre-configured according to target business information of the product to be stored carried in the query request.
[0076] In this step, the target business information includes an environment type of producing the product to be stored and a corresponding environment parameter value, the environment type includes at least one of a tenant, a computer room, and a physical subsystem, the environment parameter value includes at least one of a production location, a production organization identifier, and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between business information and a product library identifier.
[0077] Optionally, in a possible implementation, the specific implementation of determining the target storage strategy from the plurality of storage strategies pre-configured can be as follows:
[0078] The target business information is matched with the business information in the storage strategies. If the business information of any storage strategy is the same as the target business information, it is considered that the storage strategy is matched with the target business information successfully. Further, the target storage strategy is determined from the storage strategies matched with the target business information successfully.
[0079] Specifically, if there is only one storage strategy matched with the target business information successfully, the storage strategy is directly determined as the target storage strategy. If there are a plurality of storage strategies matched with the target business information successfully, one of the storage strategies can be randomly determined as the target storage strategy, or the target storage strategy is determined according to a pre-configured condition.
[0080] Optionally, the preset condition can be determining the target storage strategy from the plurality of storage strategies matching the target business information according to the priority of the storage strategies, which is implemented as follows Figure 2 Further explanation is made in the illustrated embodiments, which will not be repeated here.
[0081] It should be understood that the business information of the target storage strategy is the same as the target business information, which means that the environment type in the target business information is the same as the environment type of the target storage strategy, and the environment parameter value in the target business information is the same as the environment parameter value of the target storage strategy.
[0082] It should be understood that the target business information can include one or more target sub-business information, and the business information of the storage strategy can also include one or more sub-business information. In the process of matching the target business information with the storage strategy, as long as the target sub-business information is the same as the sub-business information of any storage strategy, it means that the target business information matches the storage strategy successfully.
[0083] It should be understood that the target sub-business information or the sub-business information is a combination of one environment type and one environment parameter value
[0084] For example, the target business information includes two target sub-business information, which are target sub-business information 1, tenant: A address, and target sub-business information 2, machine room: B organization.
[0085] The storage strategy includes:
[0086] The first storage strategy, environment type: tenant; environment parameter value: A address; first product library information;
[0087] The second storage strategy, environment type: tenant; environment parameter value: C address; second product library information;
[0088] The third storage strategy, environment type: machine room; environment parameter value: D organization; third product library information.
[0089] According to the matching of the target business information and the storage strategy, the environment type in the first storage strategy is the same as the tenant in the target sub-business information 1; the environment parameter value is the same as A address, so it is determined that the storage strategy meeting the target business information includes the first storage strategy. The environment parameter value of the second storage strategy and the third storage strategy does not match the target business information, so the second storage strategy and the third storage strategy are excluded.
[0090] In this embodiment, the plurality of storage strategies set in advance can be updated based on business changes, and the addition, deletion and modification of the storage strategies can be performed before the storage starts, while the storage is in progress, or after the storage ends. The storage strategies have diversity, and the setting of the storage strategies can be customized based on actual application scenarios.
[0091] S103, determine the target product library according to the product library identifier contained in the target storage strategy.
[0092] In this step, the product library identifier contained in the target storage strategy can be regarded as a set, and the set contains at least one product library identifier. In the case that the product library identifier contained in the set corresponding to the target storage strategy is one, the product library corresponding to the product library identifier is determined as the target product library; in the case that the product library identifier is multiple, any product library corresponding to the product library identifier can be randomly determined as the target product library, or the target product library can be determined from the product libraries corresponding to the multiple product library identifiers according to the weight of the product library. The way of determining the target product library based on the weight is explained in the following Figure 2 further explained in the embodiment shown in the figure, which will not be described in detail here.
[0093] It should be noted that the product library identifier in the present application corresponds to a product library, and after the target product library is determined, the detailed information of the target product library is obtained.
[0094] For example, the detailed information of the target product library includes but is not limited to the storage port of the product library, the network address of the product library, the product library identifier, the product library capacity, and the product library type. The present application does not limit the detailed information of the product library, and the detailed information of the product library is associated with the actual hardware storage, which can be limited according to the actual situation.
[0095] S104, store the product to be stored into the target product library.
[0096] In this step, after the target product library is determined, the detailed information of the target product library can be determined according to the identifier of the target product library.
[0097] Optionally, one possible implementation of storing the product to be stored into the target product library is as follows: based on the detailed information of the target product library, the storage port and the network address of the target product library are determined. Then, the target product library is accessed based on the network address of the target product library, and the target product library is connected based on the storage port of the target product library. Finally, the product to be stored is transmitted to the target product library through the storage port, so as to realize the storage of the product to be stored.
[0098] The software product storage method provided in the embodiments of the present application comprises the following steps: obtaining a query request corresponding to a to-be-stored product, and obtaining target business information corresponding to the to-be-stored product based on the query request; matching the target business information with business information in a plurality of storage strategies set in advance, and obtaining a target storage strategy that meets the target business information; determining a target product library that can be used by the to-be-stored product based on a product library identifier contained in the target storage strategy, and storing the to-be-stored product based on the target product library. Through the matching of the target business information and the plurality of storage strategies, the target product library is determined, and the storage mode based on the target business information is realized, so that fine storage matching is realized at the business information level, and it is ensured that the product can be stored in a product library that meets the target business demand. The storage of the product is realized through the way that the target business information hits the storage strategy, so that the situation that the business demand is not considered in the balanced storage is avoided, and the situation that the complex business scenario is not considered in the classified storage is avoided, and the distributed storage demand of the real complex business scenario for the software storage is effectively met.
[0099] Optionally, before the software product storage method shown in the above embodiments is executed, the weight of the product library can also be configured, specifically as follows:
[0100] According to the preset storage demand and the storage performance of each product library, the weight of each product library corresponding to the storage strategy is configured in each storage strategy.
[0101] It should be noted that the configuration of the weight of the product library is related to the storage strategy, and specifically can be as follows:
[0102] Based on each storage strategy, a product library grouping corresponding to each storage strategy is determined; and the weight of the product library in the grouping is configured based on the storage demand and the storage performance of each product library in the product library grouping.
[0103] If a product library exists in a plurality of groupings, the weight of the product library in different groupings can be consistent or inconsistent. The weight of the product library is associated with the grouping to which it belongs, and the weight of the same product library in different groupings is independent of each other.
[0104] In the embodiments, the storage demand is a demand that needs to be met by the product library for realizing storage.
[0105] The storage demand can be that a specific product library type needs to be stored, or a specific capacity product library needs to be stored. For example, the storage demand indicates that the data needs to be stored in a product library suitable for fast reading and writing, and then the weight of the product library that meets this condition is configured to be higher than that of other types of product libraries.
[0106] The storage performance of the article library includes at least one of the following: storage margin, throughput, read-write rate, storage delay, storage bandwidth, data reliability, storage availability, storage scalability, and data consistency.
[0107] The storage margin is the remaining storage space of the article library; the throughput is the amount of data processed by the article library in a unit of time; the read-write rate is the number of input and output operations that can be processed by the article library in a unit of time; the storage delay is the time required for the article library to respond after receiving a storage request; the storage bandwidth is the amount of data processed by the article library in a unit of time under network transmission conditions; the data reliability is the ability of the article library to maintain data integrity and availability over a long period of time; the storage availability is the degree of availability of the article library in a specific period of time; the storage scalability is the performance improvement capability of the article library after increasing hardware storage resources; and the data consistency is the ability of the article library to ensure data consistency with other nodes when the article library is in a distributed node.
[0108] Further, after the to-be-stored article is stored in the target article library, the weight of the article library can be updated.
[0109] In a possible implementation, the weight of the target article library in the target storage strategy can be reduced.
[0110] Specifically, the way to reduce the weight of the target article library can be to reduce the weight based on a preset value or to reduce the weight based on a random value.
[0111] In another possible implementation, the weight of each article library corresponding to the target storage strategy can be recalculated according to a preset storage requirement and the current storage performance of each article library corresponding to the target storage strategy.
[0112] The reduction of the weight of the target article library is used to balance the target article library corresponding to the storage strategy. By reducing the weight, the probability of the target article library being selected for storage next time is reduced, thereby ensuring uniform distribution among the article libraries.
[0113] Optionally, after the article library runs for a period of time, the weight of the target article library also needs to be updated regularly, specifically:
[0114] The weights of all the article libraries in the target storage strategy are updated.
[0115] After the storage usage time reaches a preset time length, the article libraries in the target storage strategy need to be updated in weight. The load of each article library in the target storage strategy can be calculated based on performance data, and the weight can be updated and calculated based on the load.
[0116] For example, the product pools in the target storage strategy include a first product pool and a second product pool; and the weight is updated according to the ratio between the remaining amounts of the product pools. Before storage, the remaining amount of the first product pool is 5T, and the remaining amount of the second product pool is 5T; and the weight ratio before storage is 1:1. After storage, the remaining amount of the first product pool is 5T, and the remaining amount of the second product pool is 4T; and the weight ratio after storage can be 5:4.
[0117] Figure 2 Flowchart of the software product storage method provided in the present application Figure 2 As shown in the figure, the present embodiment is based on the embodiment shown in the figure Figure 2 As shown in the figure, the present embodiment is based on the embodiment shown in the figure Figure 1 The process of how to determine the target storage strategy and further determine the target product pool is described in detail, which can be implemented by the following steps:
[0118] S201, the storage strategy with the same business information as the target business information is determined as the target storage strategy.
[0119] Optionally, a specific implementation of determining the target storage strategy can be:
[0120] The storage strategy with the same business information as the target business information is determined as the initial storage strategy. If the number of initial storage strategies is more than one, the initial storage strategy with the highest priority is determined as the target storage strategy; if the number of initial storage strategies is one, the initial storage strategy is determined as the target storage strategy.
[0121] In the present embodiment, the target business information contains at least one environment type and the corresponding environment parameter value, i.e., the target business information contains at least one target sub-business information. One environment type and one environment parameter value can be regarded as one product key-value pair, i.e., one target sub-business information is one product key-value pair, and the target business information contains at least one product key-value pair.
[0122] Optionally, the storage strategy can be a single storage strategy or a composite storage strategy, and the difference between the two is whether the business information of the two is a single key-value pair or multiple key-value pairs. That is, the single storage strategy contains only one product key-value pair, and the composite storage strategy contains multiple product key-value pairs.
[0123] Exemplarily, the embodiment of the present application provides a format of a storage strategy data table, a format of a storage strategy priority data table, a format of a product library data table, and a format of target business information. The storage strategy data table is used to store a plurality of preset storage strategies; the storage strategy priority data table is used to store a priority corresponding to each storage strategy; and the product library data table is used to store detailed information of each product library. Specifically, the storage strategy data table comprises: a primary key identifier for identifying each storage strategy, an environment type and an environment parameter value contained in each storage strategy, and a primary key identifier of a product library corresponding to each storage strategy. The storage strategy priority data table comprises: a primary key identifier for identifying each storage strategy priority, a primary key identifier for identifying each storage strategy, and a priority corresponding to each storage strategy. The product library data table comprises: a primary key identifier of each product library, an environment type corresponding to each product library, a storage address of each product library, and a storage port of each product library. The target business information comprises: an environment type and an environment parameter value.
[0124] For example, the target business information contains two target sub-business information, which are target sub-business information 1, tenant: A address, and target sub-business information 2, machine room: B organization.
[0125] The storage strategy data table comprises:
[0126] Strategy 1, environment type: tenant, environment parameter value: A address; product library information (1, 2, 3);
[0127] Strategy 2, environment type: tenant, environment parameter value: D address; product library (1, 2, 3);
[0128] Strategy 3, sub-business information 31, environment type: tenant, environment parameter value: B address. Sub-business information 32, environment type: physical subsystem, environment parameter value: C organization. Product library information (2, 3, 4);
[0129] Strategy 4, sub-business information 41, environment type: physical subsystem, environment parameter value: C organization. Sub-business information 42, environment type: machine room, environment parameter value: F address. Product library information (1, 3, 5).
[0130] The target business information can be regarded as composite business information, and strategy 3 and strategy 4 can be regarded as composite storage strategies. The composite business information contains two or more environment types and environment parameter values corresponding to each environment type in the business information. The composite storage strategy contains two or more environment types and environment parameter values corresponding to each environment type in the storage strategy.
[0131] The storage strategy priority data table comprises:
[0132] Priority 1, policy 1; priority: 4;
[0133] Priority 2, policy 2; priority: 2;
[0134] Priority 3, policy 3; priority: 3;
[0135] Priority 4, policy 4; priority: 1.
[0136] Based on the target business information and the storage policy, the initial storage policy obtained includes: policy 1, policy 3, and policy 4; according to the priority of the storage policy, the storage policy with the highest priority obtained is policy 1; policy 1 is taken as the target storage policy, and the product library corresponding to policy 1 includes product libraries (1, 2, and 3).
[0137] If the target business information is: machine room: F address; the initial storage policy matched is policy 4, and policy 4 can be directly taken as the target storage policy.
[0138] S202, according to the product library identifier contained in the target storage policy, the initial product library corresponding to the product library identifier is determined.
[0139] In this embodiment, the target storage policy includes at least one product library identifier. For example, the target storage policy contains three product library identifiers, and the product libraries corresponding to the three product library identifiers are determined as the initial product libraries.
[0140] S203, if the number of initial product libraries is one, the initial product library is determined as the target product library.
[0141] In this embodiment, the number of initial product libraries and the weight of the initial product library are related to the finally selected target product library. If there is only one initial product library, the initial product library can be determined as the target product library. If there are multiple initial product libraries, the target product library needs to be determined according to the weight of the initial product library.
[0142] S204, if the number of initial product libraries is multiple, the target product library is determined from the multiple initial product libraries according to the weight pre-assigned to each initial product library.
[0143] In this embodiment, the weight of the initial product library represents the probability of being selected by the disposal product library. For example, the weight of the first initial product library is 2, the weight of the second initial product library is 1, and the weight of the third initial product library is 1. The probability of being selected by the first initial product library is twice the probability of being selected by the second initial product library, and is also twice the probability of being selected by the third initial product library.
[0144] It should be noted that the weight of the product library is selected as the probability, and when the data amount of the software product exceeds the remaining storage range of the product library with the highest weight, the remaining data of the software product can also be stored in the product library with a relatively low weight. Alternatively, the data of the software product is proportionally stored according to the proportion of the weights between the product libraries. Under the premise of ensuring data security and reliability, the selection of the target product library according to the weight can be diversified. The weight of the product library is related to the preset storage demand and the storage performance, and the weight of the product library with a large storage capacity is not necessarily large. The weight needs to be configured in combination with the preset storage demand.
[0145] In the embodiment, the target service information is matched with the service information in the plurality of storage strategies, and an original storage strategy is obtained. A target storage strategy conforming to the target service information is determined according to the number and priority of the original storage strategies. Meanwhile, an original product library that can be used to implement software product storage is determined based on the target storage strategy. The target product library finally used by the software product is determined according to the number and weight of the original product libraries. Through the dual selection of priority and weight, the fineness of software product storage is maximized in the load service scenario, the use efficiency of the product library and the data storage applicability are guaranteed, and the efficiency of data storage service processing is improved.
[0146] On the basis of the above embodiment, based on Figure 3 The determination of the storage strategy is further described in the embodiment. Figure 3 A flowchart of a software product storage strategy routing method provided by the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the method comprises the following steps.
[0147] a1, obtaining target service information based on a query request.
[0148] a2, obtaining a plurality of preset storage strategies based on a database corresponding to the plurality of preset storage strategies, and sorting the plurality of preset storage strategies according to priority.
[0149] a3, matching the target service information and the plurality of sorted storage strategies in turn according to the priority from high to low.
[0150] a4, determining whether the target storage strategy is matched successfully.
[0151] If the current storage strategy is matched successfully, the matching process is ended and the current storage strategy is determined as the target storage strategy. If the current storage strategy is not matched successfully, a3 is continued. If the current storage strategy is the last storage strategy in the sorting, the matching process is ended regardless of whether the current storage strategy is matched successfully.
[0152] In the embodiment, a method for obtaining a target storage strategy is provided. The method sorts all preset storage strategies according to priorities, and matches the storage strategies according to the order, so that the initial storage strategy that is matched successfully for the first time is the storage strategy with the highest priority, thereby determining the target storage strategy. The method avoids the problem of large amount of calculation caused by matching all storage strategies.
[0153] Figure 4 A flowchart of a polling method for software product storage is provided in the application. Based on the above embodiment, the weight update of the multiple target product libraries is described in detail, as shown in Figure 4 The specific method can be as follows: Figure 4
[0154] b1, obtain storage configurations corresponding to all product libraries for implementing software product storage, and initialize the weights of the product libraries in each storage strategy according to multiple storage strategies.
[0155] b2, determine a product library group belonging to the target storage strategy and a polling data object corresponding to the product library group based on the target storage strategy determined in S201.
[0156] In this step, the product library group includes all product libraries in the target storage strategy.
[0157] b3, store the polling data of the weights of the product libraries and the weight of the product library group as a polling data object; store the product library group as key value information corresponding to the polling data object; and determine the target product library based on the product library group and the polling data object.
[0158] In this step, a possible implementation of determining the target product library is as follows:
[0159] Determine the weight of each product library and the weight of the product library group based on the product library group. The weight of each product library is determined based on a preset storage requirement and the storage performance of each product library.
[0160] Determine the probability of selection of each product library in the product library group based on the polling data object. Determine the target product library used for software product storage based on the probability of selection of each product library.
[0161] b4, implement software product storage based on the target product library, and update the weight of the target product library.
[0162] In this step, when the use time of the product library group reaches a preset time, update the weight of each product library in the product library group and the weight of the product library group.
[0163] In this embodiment, the update of the weight of the product library is not limited to the product library group in the target storage strategy; since the storage performance of the product library changes at the physical layer after the product library is assigned with the data corresponding to the software product, the weight of the product library in the group corresponding to other storage strategies also needs to be updated, and therefore, the update of the weight of the product library includes the product library group in each storage strategy to which the product library belongs.
[0164] It should be noted that the manner of updating the weight of the product library in the product library group in this embodiment is used to balance the probability of selection of each product library and ensure that the product libraries are evenly distributed, so that the storage space is maximally utilized. Meanwhile, when a new product library exists in the product library group, the new product library can be dynamically added to the selection of the product library through the manner of weight update, so as to ensure that the new product library is utilized. The weight update manner of the product library mentioned in this embodiment is applicable to various scenarios. For example, in distributed storage, each storage node can be regarded as a product library, and the weight of the storage node can be dynamically updated through the form of real-time performance data reporting of the node, so as to ensure the balanced use of each storage node.
[0165] In this embodiment, the weight of the product library in the storage strategy is dynamically updated, so as to ensure that the probability of selection of each product library in the product library group corresponds to the storage performance of the product library itself, ensure that the storage of the product library is effectively utilized, and ensure the load balancing between multiple product libraries.
[0166] Figure 5 The structural schematic diagram of the software product storage device provided in this application is shown in FIG. 1. Figure 5 As shown in FIG. 1, the software product storage device 50 provided in this embodiment includes an acquisition module 501, a first processing module 502, a second processing module 503, and a third processing module 504.
[0167] The acquisition module 501 is configured to acquire a query request, the query request being used to determine a target product library for storing a to-be-stored product.
[0168] The first processing module 502 is configured to determine a target storage strategy from a plurality of storage strategies pre-set according to target business information of the to-be-stored product carried in the query request; the target business information includes an environment type for producing the to-be-stored product and a corresponding environment parameter value, the environment type includes at least one of a tenant, a computer room, and a physical subsystem, the environment parameter value includes at least one of a production location, a production organization identifier, and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between business information and a product library identifier.
[0169] The second processing module 503 is configured to determine the target product library according to a product library identifier included in the target storage strategy.
[0170] The third processing module 504 is configured to store the to-be-stored software product into the target software product library.
[0171] In some embodiments, the first processing module 502 is configured to determine the target storage strategy from the storage strategies based on the target service information, specifically as follows.
[0172] The storage strategy with the same service information as the target service information is determined as the target storage strategy.
[0173] In some embodiments, the first processing module 502 is configured to determine the target service strategy by matching the target service information and the service information of the storage strategies, specifically as follows.
[0174] The storage strategy with the same service information as the target service information is determined as the initial storage strategy.
[0175] If the number of the initial storage strategies is more than one, the initial storage strategy with the largest priority is determined as the target storage strategy.
[0176] If the number of the initial storage strategies is one, the initial storage strategy is determined as the target storage strategy.
[0177] In some embodiments, the second processing module 503 is further configured to determine the target software product library according to the software product library identifier, specifically as follows.
[0178] The initial software product library corresponding to the software product library identifier is determined according to the software product library identifier contained in the target storage strategy.
[0179] If the number of the initial software product libraries is one, the initial software product library is determined as the target software product library; if the number of the initial software product libraries is more than one, the target software product library is determined from the multiple initial software product libraries according to the weight pre-assigned to each initial software product library.
[0180] In some embodiments, the obtaining module 501 is further configured to assign a weight to each software product library, specifically as follows.
[0181] The weight of each software product library corresponding to each storage strategy is assigned according to the preset storage requirement and the storage performance of each software product library.
[0182] In some embodiments, the third processing module 504 is further configured to reduce the weight of the target software product library after the software product is stored, specifically as follows.
[0183] The weight of the target software product library in the target storage strategy is reduced.
[0184] In some embodiments, the third processing module 504 is further configured to:
[0185] Update the weight of all artifact repositories in the target storage policy.
[0186] The software artifact storage apparatus provided by the embodiments of the present application can be used to execute the technical solutions of the software artifact storage method in the above embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0187] It should be noted that the division of each module of the above apparatus is only a logical division of functions, and all or part of the modules can be integrated into one physical entity, or can be physically separated. The modules can all be implemented in the form of software called by a processing element; all can be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the acquisition module 501 can be a separate processing element, or can be integrated into a chip of the above apparatus, in addition, the acquisition module 501 can also be stored in the form of program code in the memory of the above apparatus, and the functions of the acquisition module 501 can be called and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of the modules can be integrated together, or can be independently implemented. The processing element herein can be an integrated circuit having a signal processing capability. In the implementation process, each step of the above method or each module can be completed by the integrated logic circuit of hardware or the instruction of software in the processing element.
[0188] Figure 6 The structure diagram of the software artifact storage apparatus provided by the embodiments of the present application is shown in FIG. 2. Figure 6 As shown in FIG. 2, the software artifact storage apparatus can include a transceiver 601, a processor 602, and a memory 603.
[0189] The processor 602 executes the computer execution instructions stored in the memory, so that the processor 602 executes the solutions in the above embodiments. The processor 602 can be a general-purpose processor, including a central processing unit CPU, a network processor NP, etc.; and can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0190] The memory 603 is connected with the processor 602 through a system bus and completes mutual communication, and the memory 603 is used for storing computer program instructions.
[0191] The transceiver 601 can be used to acquire a to-be-run task and configuration information of the to-be-run task.
[0192] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like. The system bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries and read-only libraries). The memory can include random access memory (RAM) and can also include non-volatile memory.
[0193] The embodiment of the present application also provides a chip for running instructions, which is used for executing the technical solution of the software product storage method in the above embodiment.
[0194] The embodiment of the present application also provides a computer readable storage medium, which stores computer instructions, and when the computer instructions run on a computer, the computer executes the technical solution of the software product storage method in the above embodiment.
[0195] The embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and when the at least one processor executes the computer program, the technical solution of the software product storage method in the above embodiment can be realized.
[0196] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed modules can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0197] The modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected to implement the embodiment scheme according to actual needs.
[0198] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present alone, or two or more modules can be integrated in one unit. The above-mentioned modules can be realized in the form of hardware or in the form of hardware plus software functional modules.
[0199] The integrated modules realized in the form of software functional modules can be stored in a computer readable storage medium. The software functional modules stored in a storage medium include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of the steps of the method of each embodiment of the present application.
[0200] It should be understood that the above-mentioned processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.
[0201] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, for example, at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0202] The bus can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0203] The aforementioned storage medium can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0204] An exemplary storage medium is coupled to the processor so that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can exist as discrete components in the electrical control unit or the host device.
[0205] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by relevant hardware instructed by programs. The aforementioned programs can be stored in a computer readable storage medium. When the programs are executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes various storage media that can store program codes, such as a ROM, a RAM, a magnetic disk or an optical disk.
[0206] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit the same; although the present application has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or make equivalent replacements to some or all of the technical features; and these modifications or replacements do not cause the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A software article storage method, characterized by, The method comprises the following steps: acquiring a query request, the query request being used to determine a target product warehouse for storing a to-be-stored product; determining a target storage strategy from a plurality of preset storage strategies according to target business information of the to-be-stored product carried in the query request, wherein the target business information comprises an environment type for producing the to-be-stored product and corresponding environment parameter values, the environment type comprises at least one of a tenant, a machine room and a physical subsystem, the environment parameter values comprise at least one of a production location, a production organization identifier and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between business information and a product warehouse identifier; determining the target product warehouse according to a product warehouse identifier contained in the target storage strategy; and storing the to-be-stored product into the target product warehouse.
2. The method of claim 1, wherein, The step of determining the target storage strategy from the plurality of preset storage strategies according to the target business information of the to-be-stored product carried in the query request comprises the following steps: determining, as the target storage strategy, a storage strategy whose business information is the same as the target business information.
3. The method of claim 2, wherein, The step of determining, as the target storage strategy, the storage strategy whose business information is the same as the target business information comprises the following steps: determining, as an initial storage strategy, the storage strategy whose business information is the same as the target business information; if the number of initial storage strategies is more than one, determining, as the target storage strategy, an initial storage strategy with the highest priority; if the number of initial storage strategies is one, determining, as the target storage strategy, the initial storage strategy.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the target product warehouse according to the product warehouse identifier contained in the target storage strategy comprises the following steps: determining, according to the product warehouse identifier contained in the target storage strategy, an initial product warehouse corresponding to the product warehouse identifier; if the number of initial product warehouses is one, determining, as the target product warehouse, the initial product warehouse; if the number of initial product warehouses is more than one, determining, as the target product warehouse, an initial product warehouse according to a weight pre-assigned to each initial product warehouse.
5. The method of claim 4, wherein, Before the step of acquiring the query request, the method further comprises the following step: configuring, in each storage strategy, a weight for each product warehouse corresponding to the storage strategy according to a preset storage requirement and a storage performance of each product warehouse.
6. The method of claim 5, wherein, After the step of storing the to-be-stored product into the target product warehouse, the method further comprises the following step: decreasing the weight of the target product warehouse in the target storage strategy.
7. The method of claim 5, wherein, After the step of storing the to-be-stored product into the target product warehouse, the method further comprises the following step: updating the weights of all product warehouses in the target storage strategy.
8. An article of manufacture for software comprising: The method comprises the following steps: an acquiring module is configured to acquire a query request, the query request being used to determine a target product warehouse for storing a to-be-stored product; The first processing module is configured to determine a target storage strategy from a plurality of preset storage strategies according to target service information of the to-be-stored product carried in the query request, wherein the target service information comprises an environment type of producing the to-be-stored product and corresponding environment parameter values, the environment type comprises at least one of a tenant, a computer room and a physical subsystem, the environment parameter values comprise at least one of a production location, a production organization identifier and a physical subsystem identifier, and the storage strategy is used to store a mapping relationship between service information and a product library identifier. The second processing module is configured to determine the target product library according to a product library identifier contained in the target storage strategy. The third processing module is configured to store the to-be-stored product into the target product library.
9. A software article storage device characterized by, Comprise: A processor and a memory connected with the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-7.
11. A computer program product, characterised in that, The computer program is executed by the processor to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Method and device for providing storage service for tenant in cloud storage environment
CN105893139A
Business management software customization platform and method
CN108008940A