CN117971418A - Configuration method, configuration device and storage medium for life cycle rule - Google Patents
Configuration method, configuration device and storage medium for life cycle rule Download PDFInfo
- Publication number
- CN117971418A CN117971418A CN202311811911.8A CN202311811911A CN117971418A CN 117971418 A CN117971418 A CN 117971418A CN 202311811911 A CN202311811911 A CN 202311811911A CN 117971418 A CN117971418 A CN 117971418A
- Authority
- CN
- China
- Prior art keywords
- global
- configuration
- data
- lifecycle
- phase
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000013507 mapping Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 4
- 238000007726 management method Methods 0.000 description 37
- 238000013508 migration Methods 0.000 description 30
- 230000005012 migration Effects 0.000 description 30
- 230000007704 transition Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000013070 change management Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a configuration method, a configuration device and a storage medium of life cycle rules, wherein the method comprises the following steps: acquiring global configuration information corresponding to a configuration request of a received global lifecycle rule; when the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information; when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request; the global lifecycle rules are stored in a database and the data flows are added for the workplaces of all data to apply the global lifecycle rules. The invention achieves the effect of simplifying the life cycle management configuration by configuring the global life cycle management function for the working areas of all data.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for configuring a lifecycle rule, and a storage medium.
Background
The data lifecycle manages the flow of data used to manage the information system throughout the lifecycle, including the production, saving, reading, changing, migrating, archiving, reclaiming, reactivating, and exiting various stages of the lifecycle. To reduce the storage overhead of data, improve the performance of a database, etc., it is often necessary to manage the lifecycle of the data.
In the related art, a user can implement lifecycle management of data through migration scheduling of the data, but such lifecycle management method needs to establish a set of lifecycle management rules for each work area of the data. And because the operation and maintenance personnel manually configures the life cycle management rules of the migration schedule for the working areas, when the working areas needing to be subjected to the migration schedule are more, the operation and maintenance personnel also need to pay attention to the bottom layer scheduling rules of each working area, and further configure corresponding migration scheduling sites for different working areas. Thus, such lifecycle management methods have the problem of complicated configuration when a migration dispatch site needs to be established for a large number of workspaces.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a configuration method, a configuration device and a storage medium for life cycle rules, which solve the problem of complex configuration of a life cycle management method in the prior art.
In order to achieve the above object, the present invention provides a method for configuring a lifecycle rule, the method comprising the steps of:
acquiring global configuration information corresponding to a configuration request of a received global lifecycle rule;
When the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information;
when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request;
the global lifecycle rules are stored in a database and the data flows are added for the workplaces of all data to apply the global lifecycle rules.
Optionally, the step of storing the global lifecycle rule in a database and adding the data stream for the workplace of all data to apply the global lifecycle rule includes:
Configuring a site phase label for the work area based on the phase label list;
acquiring a configuration permission and a configuration name corresponding to the received data stream configuration request of the working area;
When the configuration authority is legal and the configuration name does not exist in the working area, starting a life cycle lock and acquiring a working area data stream which is the same as the configuration name from the global configuration information based on the configuration name;
analyzing and mapping the data flow of the working area to obtain complete entity data, and creating a scheduling task according to the complete entity data;
Storing the workspace data stream and the scheduling identification of the scheduling task in the database and releasing the lifecycle lock to enable the workspace to apply the global lifecycle rule.
Optionally, before the step of configuring the site phase label for the workspace based on the phase label list, the method further includes:
acquiring a site attribute corresponding to a received site setting request bound by the working area;
After detecting that the site attribute contains the attribute of the setting of the support tag, setting a site for the work area in a configuration service center based on the site setting request.
Optionally, after the step of configuring the site phase label for the workspace based on the phase label list, the method further includes:
When a phase label updating request of a station bound by the working area is received, acquiring a phase label name corresponding to the updating request and an updating authority associated with the updating request;
And when the update authority is legal and the phase tag name exists in the phase tag list, calling a configuration service to update the phase tag of the station.
Optionally, before the step of obtaining global configuration information corresponding to the configuration request of the received global lifecycle rule, the method further includes:
Acquiring a preset stage label corresponding to the received global stage label adding information and the global configuration information;
and if the global configuration information does not exist, adding the preset stage label into a data table corresponding to the stage label list.
Optionally, after the step of obtaining the preset stage label corresponding to the received addition information of the global stage label and the global configuration information, the method further includes:
If the global configuration information exists, detecting whether the preset stage label is stored in the database;
If the preset stage label is not stored in the database, storing the preset stage label into a data table corresponding to the stage label list; or alternatively
And if the data table stores the preset stage label, outputting error information.
Optionally, after the step of storing the global lifecycle rule in a database and adding the data stream to the working area of all data to apply the global lifecycle rule, the method further includes:
Obtaining task information corresponding to a creation request of the disposable flow of the working area;
Acquiring the information of the stations bound by the life cycle lock and the working area;
if the phase label corresponding to the phase label list exists in the site information, transmitting the task information to a content service node, wherein after the content service node creates a task according to the task information, the task is stored in the database, and a storage identifier is returned;
And after receiving the storage identification, releasing the life cycle lock and feeding back the storage identification to the client.
Optionally, when the cache policy configured by the working area is AUTO, after the step of storing the global lifecycle rule in the database and adding the data stream to the working areas of all data to apply the global lifecycle rule, the method further includes:
When a file reading instruction sent by a site bound by the working area is detected, acquiring the access frequency of a file corresponding to the file reading instruction;
And caching the file corresponding to the file reading instruction in the site bound by the working area when the access frequency meets the preset caching frequency.
In addition, in order to achieve the above object, the present invention also provides a device for configuring a lifecycle rule, the device including a memory, a processor, and a control program of the device for configuring a lifecycle rule stored in the memory and executable on the processor, the control program of the device for configuring a lifecycle rule implementing the steps of the method for configuring a lifecycle rule as described above when executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a control program of a lifecycle rule configuring apparatus, which when executed by a processor, implements the steps of the lifecycle rule configuring method as described above.
The embodiment of the invention provides a configuration method, a configuration device and a storage medium of a life cycle rule, which are characterized in that global configuration information corresponding to a configuration request of the received global life cycle rule is obtained, a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream are determined based on the global configuration information when the global configuration information is legal, the phase label is contained in the phase label list, the global life cycle rule is configured based on the configuration request when the same data name does not exist, the global life cycle rule is stored in a database, and the data stream is added for all working areas of data to apply the global life cycle rule. According to the invention, the global life cycle management function is configured for all the data working areas at one time, so that a user can systematically manage migration tasks among all stations through the global life cycle management system, the workload of the user when a plurality of life cycles need to be configured is reduced, and the effect of simplifying the life cycle management configuration is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a first embodiment of a lifecycle rule configuration method of the present invention;
FIG. 2 is an overall flowchart of a lifecycle rule configuration of the lifecycle rule configuration method of the present invention;
FIG. 3 is a schematic diagram of an operational flow for configuring global lifecycle rules;
FIG. 4 is a flowchart of a second embodiment of a lifecycle rule configuration method of the present invention;
FIG. 5 is a schematic diagram of an operation flow of a configuration data stream for a work area;
FIG. 6 is a flow chart of a third embodiment of a method for configuring lifecycle rules of the present invention;
FIG. 7 is a schematic diagram of an operation flow for adding global phase tags;
FIG. 8 is a flow chart of a fourth embodiment of a lifecycle rule configuration method of the present invention;
FIG. 9 is a schematic diagram of an operational flow for configuring a one-time migration function;
FIG. 10 is a flowchart of a fifth embodiment of a lifecycle rule configuration method of the present invention;
FIG. 11 is an overall operational flow of a caching strategy;
fig. 12 is a schematic diagram of a terminal hardware structure of various embodiments of a configuration method of lifecycle rules of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the related art, a user can implement lifecycle management of data through migration scheduling of the data, but such lifecycle management method needs to establish a set of lifecycle management rules for each work area of the data. And because the operation and maintenance personnel manually configures the life cycle management rules of the migration schedule for the working areas, when the working areas needing to be subjected to the migration schedule are more, the operation and maintenance personnel also need to pay attention to the bottom layer scheduling rules of each working area, and further configure corresponding migration scheduling sites for different working areas. Thus, such lifecycle management methods have the problem of complicated configuration when a migration dispatch site needs to be established for a large number of workspaces.
In order to solve the above-mentioned drawbacks, an embodiment of the present invention provides a method for configuring a lifecycle rule, where the main solution includes the following steps:
acquiring global configuration information corresponding to a configuration request of a received global lifecycle rule;
When the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information;
when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request;
the global lifecycle rules are stored in a database and the data flows are added for the workplaces of all data to apply the global lifecycle rules.
The configuration method of the life cycle rule is used for configuring the global life cycle management function for the working areas of all data at one time, so that a user can systematically manage migration tasks among all sites through the global life cycle management system, the workload of the user when a plurality of life cycles need to be configured is reduced, and the effect of simplifying the life cycle management configuration is achieved.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, fig. 1 is a flowchart illustrating a first embodiment of a method for configuring a lifecycle rule according to the present invention.
The scheme of the embodiment is suitable for life cycle management of the data migration scheduling service.
In the solution of this embodiment, please refer to fig. 2, the SCM user performs the lifecycle management configuration operation through an SCM (java driver) client driver, the client sends a request to the SCM gateway node, the gateway service node forwards the request to the corresponding dispatch service node, and the dispatch service performs the operation on the lifecycle rule configuration. It should be noted that, an external interface supporting the life cycle global configuration operation is provided in the SCM client, through which the SCM user can perform the life cycle global configuration operation, and a REST (Representational state transfer) interface for newly adding the life cycle rule global configuration management by the schedule-server is used for processing the request of the life cycle rule global configuration operation sent by the SCM client. Wherein the user can determine the current state of the data through the phase tags in the global lifecycle rules. In order to facilitate the storage of the lifecycle rules, a table global_life_cycle_configuration (GLOBAL lifecycle configuration table) may be added to SCMSYSTEM (SCM system) tables, for recording GLOBAL lifecycle rule configuration and custom site phase tag information.
In this embodiment, the configuration method of the lifecycle rule includes the following steps:
Step S10, global configuration information corresponding to a received configuration request of a global lifecycle rule is obtained;
In this embodiment, please refer to fig. 3, driver is SCM driver. The configuration request of the global lifecycle rule is configured by the SCM user through the SCM client driver. After receiving the corresponding configuration information, the SCM driver checks the parameters of the life cycle rule, checks whether the parameters are legal, converts the life cycle rule content of the parameters into json character strings after the parameters are legal, and puts the json character strings into request parameters, and then the SCM driver sends the configuration request of the global life cycle rule to the scheduling service through an external interface.
And then, when the dispatch service center obtains a configuration request of the global lifecycle rule through the interface, analyzing the request content to obtain corresponding global configuration information, wherein the global configuration information comprises user information for sending the configuration request of the global lifecycle rule, the content of a phase label corresponding to the global lifecycle rule, the phase label used by the data stream, the data name of the data stream and the like. Based on the method, the corresponding global configuration information is obtained by analyzing the received configuration request of the global life cycle rule through the scheduling service, so that the scheduling service can verify the request, and meanwhile, SCM users only need to configure the corresponding information through driving and do not need to care about the realization of the bottom layer scheduling rule. In the process of detecting whether the user is an administrator user, if not, outputting corresponding error reporting information, namely 'error no permission' shown in fig. 3, and the global configuration table is the same.
Step S20, when the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information;
In this embodiment, the phase tag list is a state corresponding to the data migration schedule in the global lifecycle rule, the default phase tag includes hot, wram and cold, which respectively represent the change states of the lifecycle of the data when the data is migrated, hot represents that the data access frequency is higher, and so on, cold represents that the data access frequency is lower, that is, if the access frequency of the data in the preset time is lower, the phase tag of the data can be changed from warm to cold, and the user can view the lifecycle rule of the current data migration schedule through the change of the phase tag. In addition, the global lifecycle rules can configure custom phase tags. The user or the tester can further realize the object life cycle change management by checking the change of the phase label corresponding to the data, and the establishment of data scheduling does not need to be concerned.
In the scheme of the application, the data flow is characterized by Transition (Transition, migration) in a database and is used for characterizing the migration scheduling rule of the data. The data stream includes a name (data stream name, unique identification of each data stream, the same data stream name cannot appear in the database), and a Flow (data stream, defined in the form of a phase tag). It will be appreciated that only configured phase tags (including default phase tags and custom phase tags) in the global lifecycle rules can be identified in the system, so that the corresponding phase tags in the data stream should be phase tags in the phase tag list in the global configuration information.
In this embodiment, please continue to refer to fig. 3, in order to check whether the configuration request of the global lifecycle rule is legal, after the scheduling service analyzes the configuration request of the global lifecycle to obtain global configuration information, it is required to detect the authority of the requesting user corresponding to the global configuration information, and detect whether a global lifecycle rule already exists in the global lifecycle configuration table corresponding to the global configuration information in the database. And if the authority of the requesting user is the authority of the administrator and other global lifecycle configuration rules are not stored in the global lifecycle configuration table, the global configuration information is considered legal.
When the global configuration information is legal, the scheduling service can analyze the json character string in the request parameter, extract a phase label list in the global configuration information, a phase label used by a data stream in the global configuration information and a data name of the data stream, so that the scheduling service can configure the global life cycle rule when the content of the global configuration information meets the requirement.
Step S30, when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request;
In this embodiment, please continue to refer to fig. 3, by traversing all data flows, it is checked whether the corresponding phase label in all data is a phase label defined in the global lifecycle rule, and whether the data flow name is duplicated, so as to ensure establishment of the global lifecycle rule and storage of data. When the content of the global configuration information meets the requirement (i.e. the data stream uses the label of the defined phase label list, the data stream name is not repeated), the scheduling service can configure the global life cycle rule.
Step S40, storing the global lifecycle rule in a database, and adding the data stream for the working area of all data to apply the global lifecycle rule.
In this embodiment, after the scheduling service adds the configuration information of the lifecycle rule in the global lifecycle configuration table of the database, if a data stream configuration request of the working areas of all data is received, a transition (data stream) may also be added to the working areas of all data, so that the scheduling service of each data can be applied to the global lifecycle.
It should be noted that, in the process of adding the transition for the working areas of all data, only the SCM driver is required to set the adding operation, the SCM driver can automatically check whether the transition content is legal, whether the authority information meets the requirement, whether the name is repeated or not, and whether the transition content is called, and the process is completed by the scheduling service, that is, after the SCM user writes the global life cycle rule configuration file, the SCM user does not need to repeatedly write different life cycle rule configuration files for each working area, only after the simple session is created, the SCM driver is required to specify the working area to configure the data flow, after the corresponding authority is met, the configuration of the life cycle rule of the working area can be completed, and the configuration of the bottom code in the data scheduling process is not required to be directly participated, that is, the SCM user does not need to pay much attention to the trend of the data migration scheduling.
Optionally, a lifecycle lock may be added for the thread creating the global lifecycle rule to ensure consistency of concurrent access of data.
In a specific implementation scenario, after a GLOBAL LIFE CYCLE management rule is written by an SCM user through an XML file format and a temporary session is created, an XML file is imported through an SCM driver, after the imported file is checked by the SCM driver, file contents are converted into json format and then transmitted to a scheduling service, the scheduling service analyzes the requested contents, whether records exist in SCM user permission and a data table GLOBAL_LIFE_CYCLE_CONFIG or not is checked, after the two records pass the check, the transition contents are traversed, and when the transition data meet the requirements, the creation of the GLOBAL LIFE CYCLE management rule is completed.
Optionally, after completing the configuration of the global lifecycle management rule, the global lifecycle management rule in the database may be queried, the SCM user sends the configuration of the query lifecycle rule in the SCM driver, after completing the parameter verification of the SCM driver, the query request is sent to the scheduling service, and the scheduling service obtains the corresponding configuration information from the data table corresponding to the global lifecycle rule, and converts the configuration information into a json format character string to return to the SCM driver.
Optionally, the SCM user may also perform a delete operation of the global lifecycle management rule through the SCM driver. It should be noted that, a site serves data bound to a working area, a site does not belong to an internal attribute of the working area, in other words, a site does not belong to the working area, different working areas can bind the same site as the data serving the same site, and the sites exist independently. If a station bound to a certain working area is using a phase tag configured by a global lifecycle rule, the global lifecycle rule cannot be deleted.
In the technical scheme disclosed in this embodiment, a configuration request of a global lifecycle rule sent by an SCM driver is obtained, the configuration request is analyzed to obtain global configuration information, when the global configuration information is legal, a phase tag list in the global configuration information, a phase tag used by a data stream and a data name of the data stream are determined, when the phase tag list contains the phase tag and the same data name does not exist, the global lifecycle rule is configured based on the configuration request, the global lifecycle rule is stored in a database, and finally, the data stream is added to all the working areas of the data to apply the global lifecycle rule. The SCM driver sends a global lifecycle rule configuration request, and after the global lifecycle rule is established, a global lifecycle management function is configured for all the working areas of the data, so that an SCM user can establish a set of lifecycle management rule for each working area of the data through a migration task between all stations of the working area by the global lifecycle management system, the SCM user is prevented from paying attention to management of migration scheduling of the working areas, the workload of the SCM user is reduced, and the effect of simplifying lifecycle management configuration is achieved.
Referring to fig. 4, in the second embodiment, based on the first embodiment, step S40 specifically includes:
Step S41, configuring a site stage label for the working area based on the stage label list;
In this embodiment, when adding a data stream to a working area, the phase label used must be a phase label configured in the global lifecycle rule, that is, a label corresponding to the phase label list. Therefore, when configuring the data stream for the working area, the corresponding site stage label is required to be configured for the working area according to the content of the stage label list of the global lifecycle rule, so as to ensure that the site bound by the working area can use the global lifecycle rule.
Optionally, in order to enable the workspace to configure the corresponding site phase tag, i.e. enable the site to which the workspace is bound to support the addition of the phase tag, a site supporting the phase tag needs to be added to the workspace. I.e. before this step, it is also necessary that:
acquiring a station attribute corresponding to a received station setting request bound by the working area, and setting a station for the working area in a configuration service center based on the station setting request after detecting that the station attribute contains the set attribute of the support tag.
In this embodiment, the site attribute includes whether the site supports the setting of the phase tag, and only if the site attribute includes the attribute supporting the setting of the phase tag, the workspace can further satisfy the requirement of using the lifecycle management function subsequently by configuring the corresponding site phase tag.
Optionally, after configuring the corresponding site phase label for the working area, the site phase label corresponding to the working area can be updated, so as to ensure that the current site phase label is successfully configured. I.e. after this step, further comprises:
When a phase label updating request of a station bound by the working area is received, acquiring a phase label name corresponding to the updating request and an updating authority associated with the updating request;
And when the update authority is legal and the phase tag name exists in the phase tag list, calling a configuration service to update the phase tag of the station.
Step S42, obtaining the received configuration authority and configuration name corresponding to the data stream configuration request of the working area;
In this embodiment, in order to ensure that the name of the Transition is globally unique, the used Transition data stream that has been configured cannot be repeatedly configured in the same working area, and when the Transition is configured for the working area, if the name of the added Transition already exists, the added Transition cannot be added. Thus, when a corresponding transition configuration request is received, a transition configuration name needs to be acquired.
For example, referring to fig. 5, after the SCM user sets a request for adding a data stream of a global lifecycle rule, the SCM driver checks a parameter of the request, checks whether the parameter is legal, and after the parameter is legal, converts the data stream content of the parameter into a json string, and places the json string into the request parameter, and then the SCM driver sends a configuration request of the global data stream to the scheduling service through an external interface. And then, when the dispatching service center obtains the configuration request of the global data stream through the interface, analyzing the request content to obtain the corresponding configuration permission and the configuration name. Based on the configuration request of the received data stream of the global life cycle rule is analyzed through the scheduling service to obtain the corresponding configuration permission and configuration name, so that the scheduling service is ensured to verify the request, and meanwhile, the SCM user only needs to configure corresponding request information through driving and does not need to care about the realization of the bottom layer scheduling rule.
Step S43, when the configuration authority is legal and the configuration name does not exist in the working area, starting a life cycle lock and acquiring the working area data stream which is the same as the configuration name from the global configuration information based on the configuration name;
In this embodiment, please continue to refer to fig. 5, in order to check whether the data stream configuration request is legal, it is necessary to detect the authority of the requesting user corresponding to the data stream configuration request, and detect whether the data stream corresponding to the request has been used in the working area. If the authority of the requesting user is legal, namely the requesting user has the authority of creating the data stream, and the data stream is not used in other working areas, acquiring a life cycle lock to ensure the consistency of concurrent access of data, and acquiring the data stream corresponding to the data name in the global life cycle rule.
Optionally, if the data stream of the corresponding data name in the global lifecycle rule does not exist, an error message is returned.
S44, analyzing and mapping the data flow of the working area to obtain complete entity data, and creating a scheduling task according to the complete entity data;
In this embodiment, if the obtained working area data stream further includes a coverage attribute, the original data stream is covered. After the working area data stream of the global lifecycle rule configuration information is obtained, the data stream can be analyzed and mapped to scheduleFullEntity (scheduling complete entity data), and scheduling tasks of each data in the site are created based on the data stream.
Optionally, if the mapping of the data stream fails, outputting error information of the mapping failure.
Step S45, storing the working area data stream and the scheduling identifier of the scheduling task in the database and releasing the life cycle lock, so that the working area applies the global life cycle rule.
In this embodiment, the scheduling tasks have unique scheduling identifiers, after the scheduling service creates corresponding scheduling information, in order to ensure that the working area can be applied to the global lifecycle rule, the obtained working area data stream and the scheduling identifiers of the scheduling tasks need to be stored in the WORKSPACE-LIFE-CYCLE-CONFIG working area lifecycle table of the database, and then the lifecycle lock is released to indicate that the data stream of the current working area has been configured.
Optionally, after the working area is configured with the data stream, deleting the data stream of the working area, and when deleting the data stream of the working area, removing the corresponding scheduling task in the working area station.
Optionally, after the data stream is configured in the working area, the data stream configuration information of the working area can be obtained through the SCM driver, and when the corresponding authority information is met, the scheduling service returns the data stream information corresponding to the working area.
Optionally, after configuring the data streams for the required working areas, the list of the data streams in all the working areas and configured data streams can be obtained through the SCM driver, so that the SCM user can select unused data streams for other working areas based on the used data stream information, and the systematic management of each working site is ensured.
Optionally, the SCM user can also query the working areas using the data stream through the SCM driver according to the name of the data stream, so that the SCM user can systematically manage the sites bound by each working area.
In the technical scheme disclosed by the embodiment, a station stage label is configured for a working area based on a stage label list, configuration permission and a configuration name corresponding to a received data stream configuration request of the working area are obtained, when the configuration permission is legal and the configuration name does not exist in the working area, the working area data stream is obtained in global configuration information, then the working area data stream is analyzed and mapped to obtain dispatching complete entity data, dispatching tasks in a working area station are created based on the dispatching complete entity data, and then dispatching identifications of the working area data stream and the dispatching tasks are stored in a database, so that the working area can apply the global lifecycle rule, and SCM users can systematically manage migration tasks of all station services based on configured station services.
Referring to fig. 6, in the third embodiment, based on the first embodiment, before step S10, the method further includes:
Step S50, obtaining a preset stage label corresponding to the received global stage label adding information and the global configuration information;
because current SCM sites do not support phase tags, it is desirable to provide the sites with functionality that supports phase tag management to meet the need for subsequent use of lifecycle management functionality. Based on this, the content of the global phase tag needs to be set in advance.
In this embodiment, referring to fig. 7, after the SCM user sets the adding information of the global phase tag in the SCM driver, the SCM driver checks the parameter of the request, checks whether the parameter is legal, and after the parameter is legal, converts the data stream content of the parameter into json character strings, and puts the json character strings into the request parameter, and then the SCM driver sends the adding information of the global phase tag to the scheduling service through the external interface. And then, when the scheduling service obtains the added information of the global stage label through the interface, analyzing the request content to obtain the preset stage label, and obtaining the information stored in the global life cycle rule configuration table in the database. And further, the scheduling service can be guaranteed to verify the added information.
Step S60, if the global configuration information does not exist, adding the preset stage label to a data table corresponding to the stage label list.
Specifically, referring to fig. 7, the global configuration information does not have relevant data characterized in that the global lifecycle rule configuration table in the database does not store the global lifecycle, and at this time, the scheduling service may directly add the phase tag to the data table corresponding to the phase tag list in the database.
Optionally, if the global configuration information exists, when detecting whether the database stores the preset stage label, if the database does not store the preset stage label, storing the preset stage label into a data table corresponding to the stage label list.
In this embodiment, the global configuration information is characterized in that the global lifecycle rule configuration table in the database stores the data of the global lifecycle. The preset phase label may be a new phase label, so if the detection database does not store the preset phase label, the global phase label request is the self-defined phase label, and the phase label may be directly added to the data table corresponding to the phase label list in the database and the original data is not covered.
Optionally, if the data table stores the preset stage label, the content of the added information corresponding to the stage label is already stored in the database, and cannot be stored repeatedly, so that error information can be output in the SCM driver.
In the technical scheme disclosed in this embodiment, the preset phase label and the global configuration information corresponding to the addition information of the global phase label are obtained, if the global configuration information does not exist, it is indicated that the current working area is not configured with the global life cycle, but in order to satisfy the use of the life cycle management function, the function of supporting phase label management needs to be provided for the site bound by the working area, at this time, the preset phase label can be stored in a corresponding data table, and each parameter of the data table can be the content of the phase label list. If the global configuration information exists, the fact that the complete local life cycle rule is configured at present can be indicated, whether parameters which are the same as the preset stage labels are stored in the database or not can be detected, if not, the content of the preset stage labels can be newly added into the data table, the existing labels are not affected, if yes, corresponding error prompts are output, and repeated storage is avoided.
Referring to fig. 8, in the fourth embodiment, after step S40, based on the first embodiment, the method further includes:
Step S70, obtaining task information corresponding to a creation request of the disposable flow of the working area;
In an actual production environment, the archived data needs to be reused, and the current processing mode is to perform frequent stage migration on the data. In this embodiment, in order to improve the data access performance, the station may migrate the data at one time, for example, migrate the data of the original cold tag to the hot tag at one time.
Referring to fig. 9, when the scm driver receives a request for creating a disposable flow, parameters can be checked, after the check is successful, the request is sent to a scheduling service, and when the scheduling service receives the request for creating the disposable flow of a working area, the content of the request needs to be parsed into task information, so that the remote service can call the task information to establish a corresponding disposable migration thread task.
Step S80, acquiring the life cycle lock and the site information bound by the working area;
in this embodiment, by acquiring the life cycle lock, further, data concurrency consistency is guaranteed, and site information bound by the working area is acquired, based on which, whether the current site supports a one-time migration labeling function can be checked.
Step S90, if a phase label corresponding to the phase label list exists in the site information, transmitting the task information to a content service node, wherein after the content service node creates a task according to the task information, the task is stored in the database, and a storage identifier is returned;
In this embodiment, when the phase label corresponding to the phase label list exists in the site information, it indicates that the currently configured site that performs one-time migration has a phase label function. At the moment, the scheduling service transmits the task information to the content service node, and the content service node creates a task according to the task information, stores the task in a corresponding database, and returns a storage identifier.
Step S100, after receiving the storage identification, releasing the life cycle lock and feeding back the storage identification to the client.
The client refers to an SCM driver, and if the SCM driver receives the storage identification, the current one-time stream configuration is considered to be successful, namely, the site bound by the current working area can realize one-time migration scheduling of the data.
For example, in a prospective marketing campaign, a large amount of archive data needs to be frequently used, if the data is not thermalized in advance, the data access performance may be greatly affected, at this time, cold data (data of cold phase label) needs to be migrated into hot data (data of hot phase label) in advance, and the data access performance may be improved in future holding campaigns. The one-time migration implementation principle is that the bottom layer is a thread task, corresponding data is migrated from cold to hot according to user configuration requirements, and the data can be migrated once by one thread task.
In the technical scheme disclosed in the embodiment, a creation request of a disposable flow of a working area is received, the creation request is converted into task information, the task information is transmitted to a content service node, a task is created by the content service node according to the task information and is stored in a database, and then a corresponding storage identifier is returned. Based on the method, the creation of the one-time migration scheduling function of the data is realized, and the access performance of the data is improved.
Referring to fig. 10, in the fifth embodiment, after step S40, based on any of the above embodiments, the method further includes:
Step S110, when a file reading instruction sent by a site bound by the working area is detected, acquiring the access frequency of a file corresponding to the file reading instruction;
step S120, when the access frequency meets a preset caching frequency, caching the file corresponding to the file reading instruction in the site bound by the working area.
In this embodiment, data may be stored as archive data in a device with poor storage performance if not accessed for a certain period of time. If the archived data is accessed frequently at a certain stage, the access performance is poor and the data feedback time is long if the archived data is accessed frequently in a short time because of the poor performance of the storage device. Therefore, the data can be stored into hot data (hot tag pair-to-parallel data), so that the performance of data access is improved. In this process, it is equivalent to configuring a new lifecycle for the data.
For example, referring to fig. 11, the website B stores archived data, and when downloading file (file) contents, if the website a connected by the SCM driver does not have data, the website B having the file contents forwards the download request; after the website A takes the content data, whether the access frequency of the file meets the requirement of caching can be checked, if so, the content of the file is cached, and the data cached at the website A is hot data of a hot tag. Based on the method, the need of sending requests across sites is avoided, and meanwhile, the access performance of data is improved.
In the technical scheme disclosed by the embodiment, the archive data of the work area site is converted into the hot tag data of another work area site, and the cache policy is configured for the site bound by the work area, so that migration scheduling is performed on the cached data based on the cache policy (the archive data is changed into the hot tag data), thereby improving the access performance of the data in the life cycle management rule.
Referring to fig. 12, fig. 12 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 12, the terminal may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a network interface 1003, a memory 1004. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a wireless interface (e.g., a wireless FIdelity (WI-FI) interface). The Memory 1004 may be a high-speed RAM Memory (Random Access Memory, RAM) or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 12 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 12, a memory 1004, which is a computer storage medium, may include therein an operating system, a network communication module, and a configuration program of life cycle rules.
In the terminal shown in fig. 12, the network interface 1003 is mainly used for connecting to a background server, and performing data communication with the background server; the processor 1001 may call a configuration program of life cycle rules stored in the memory 1004 and perform the following operations:
acquiring global configuration information corresponding to a configuration request of a received global lifecycle rule;
When the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information;
when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request;
the global lifecycle rules are stored in a database and the data flows are added for the workplaces of all data to apply the global lifecycle rules.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
Configuring a site phase label for the work area based on the phase label list;
acquiring a configuration permission and a configuration name corresponding to the received data stream configuration request of the working area;
When the configuration authority is legal and the configuration name does not exist in the working area, starting a life cycle lock and acquiring a working area data stream which is the same as the configuration name from the global configuration information based on the configuration name;
analyzing and mapping the data flow of the working area to obtain complete entity data, and creating a scheduling task according to the complete entity data;
Storing the workspace data stream and the scheduling identification of the scheduling task in the database and releasing the lifecycle lock to enable the workspace to apply the global lifecycle rule.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
acquiring a site attribute corresponding to a received site setting request bound by the working area;
After detecting that the site attribute contains the attribute of the setting of the support tag, setting a site for the work area in a configuration service center based on the site setting request.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
When a phase label updating request of a station bound by the working area is received, acquiring a phase label name corresponding to the updating request and an updating authority associated with the updating request;
And when the update authority is legal and the phase tag name exists in the phase tag list, calling a configuration service to update the phase tag of the station.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
Acquiring a preset stage label corresponding to the received global stage label adding information and the global configuration information;
and if the global configuration information does not exist, adding the preset stage label into a data table corresponding to the stage label list.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
If the global configuration information exists, detecting whether the preset stage label is stored in the database;
If the preset stage label is not stored in the database, storing the preset stage label into a data table corresponding to the stage label list; or alternatively
And if the data table stores the preset stage label, outputting error information.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
Obtaining task information corresponding to a creation request of the disposable flow of the working area;
Acquiring the information of the stations bound by the life cycle lock and the working area;
if the phase label corresponding to the phase label list exists in the site information, transmitting the task information to a content service node, wherein after the content service node creates a task according to the task information, the task is stored in the database, and a storage identifier is returned;
And after receiving the storage identification, releasing the life cycle lock and feeding back the storage identification to the client.
Further, the processor 1001 may call a configuration program of the lifecycle rule stored in the memory 1004, and further perform the following operations:
When a file reading instruction sent by a site bound by the working area is detected, acquiring the access frequency of a file corresponding to the file reading instruction;
And caching the file corresponding to the file reading instruction in the site bound by the working area when the access frequency meets the preset caching frequency.
Furthermore, it will be appreciated by those of ordinary skill in the art that implementing all or part of the processes in the methods of the above embodiments may be accomplished by computer programs to instruct related hardware. The computer program comprises program instructions, and the computer program may be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the control terminal to carry out the flow steps of the embodiments of the method described above.
The present invention thus also provides a computer-readable storage medium storing a configuration program of lifecycle rules, which when executed by a processor implements the steps of the method of configuring lifecycle rules as described in the above embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A method of configuring lifecycle rules, the method comprising:
acquiring global configuration information corresponding to a configuration request of a received global lifecycle rule;
When the global configuration information is legal, determining a phase label list, a phase label used by a data stream of the global configuration information and a data name of the data stream based on the global configuration information;
when the phase label list contains the phase label and the same data name does not exist, configuring the global life cycle rule based on the configuration request;
the global lifecycle rules are stored in a database and the data flows are added for the workplaces of all data to apply the global lifecycle rules.
2. The method of claim 1, wherein the step of storing the global lifecycle rule in a database and adding the data stream for all data workspaces to apply the global lifecycle rule comprises:
Configuring a site phase label for the work area based on the phase label list;
acquiring a configuration permission and a configuration name corresponding to the received data stream configuration request of the working area;
When the configuration authority is legal and the configuration name does not exist in the working area, starting a life cycle lock and acquiring a working area data stream which is the same as the configuration name from the global configuration information based on the configuration name;
analyzing and mapping the data flow of the working area to obtain complete entity data, and creating a scheduling task according to the complete entity data;
Storing the workspace data stream and the scheduling identification of the scheduling task in the database and releasing the lifecycle lock to enable the workspace to apply the global lifecycle rule.
3. The method of claim 2, wherein prior to the step of configuring site phase labels for the workspace based on the phase label list, further comprising:
acquiring a site attribute corresponding to a received site setting request bound by the working area;
After detecting that the site attribute contains the attribute of the setting of the support tag, setting a site for the work area in a configuration service center based on the site setting request.
4. The method of claim 2, wherein after the step of configuring site phase labels for the workspace based on the phase label list, further comprising:
When a phase label updating request of a station bound by the working area is received, acquiring a phase label name corresponding to the updating request and an updating authority associated with the updating request;
And when the update authority is legal and the phase tag name exists in the phase tag list, calling a configuration service to update the phase tag of the station.
5. The method of claim 1, wherein prior to the step of obtaining global configuration information corresponding to the received configuration request for the global lifecycle rule, further comprising:
Acquiring a preset stage label corresponding to the received global stage label adding information and the global configuration information;
and if the global configuration information does not exist, adding the preset stage label into a data table corresponding to the stage label list.
6. The method of claim 5, wherein after the step of obtaining the preset phase tag corresponding to the received global phase tag addition information and the global configuration information, the method further comprises:
If the global configuration information exists, detecting whether the preset stage label is stored in the database;
If the preset stage label is not stored in the database, storing the preset stage label into a data table corresponding to the stage label list; or alternatively
And if the data table stores the preset stage label, outputting error information.
7. The method of claim 1, wherein after the step of storing the global lifecycle rule in a database and adding the data stream for all data workspaces to apply the global lifecycle rule, further comprising:
Obtaining task information corresponding to a creation request of the disposable flow of the working area;
Acquiring the information of the stations bound by the life cycle lock and the working area;
if the phase label corresponding to the phase label list exists in the site information, transmitting the task information to a content service node, wherein after the content service node creates a task according to the task information, the task is stored in the database, and a storage identifier is returned;
And after receiving the storage identification, releasing the life cycle lock and feeding back the storage identification to the client.
8. The method according to any one of claims 1-7, wherein when the cache policy configured by the working area is AUTO, the step of storing the global lifecycle rule in a database and adding the data stream to the working area of all data to apply the global lifecycle rule further comprises:
When a file reading instruction sent by a site bound by the working area is detected, acquiring the access frequency of a file corresponding to the file reading instruction;
And caching the file corresponding to the file reading instruction in the site bound by the working area when the access frequency meets the preset caching frequency.
9. A lifecycle rule configuring apparatus, the apparatus comprising: memory, a processor and a configuration program of lifecycle rules stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the configuration method of the lifecycle rules as claimed in any of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a configuration program of lifecycle rules, which when executed by a processor implements the steps of the configuration method of lifecycle rules according to any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311811911.8A CN117971418A (en) | 2023-12-26 | 2023-12-26 | Configuration method, configuration device and storage medium for life cycle rule |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311811911.8A CN117971418A (en) | 2023-12-26 | 2023-12-26 | Configuration method, configuration device and storage medium for life cycle rule |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117971418A true CN117971418A (en) | 2024-05-03 |
Family
ID=90858672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311811911.8A Pending CN117971418A (en) | 2023-12-26 | 2023-12-26 | Configuration method, configuration device and storage medium for life cycle rule |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117971418A (en) |
-
2023
- 2023-12-26 CN CN202311811911.8A patent/CN117971418A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2742289C1 (en) | Service registration in communication network | |
US8874091B2 (en) | Automatic device capabilities change notification | |
KR101863398B1 (en) | Method and system for synchronization mechanism on multi-server reservation system | |
CN111917571B (en) | Policy management method, device and system | |
CN103946833A (en) | System and method for managing dedicated caches | |
JP2006178554A (en) | Distributed policy cooperation method | |
CN103946841A (en) | Systems and methods for dynamic service integration | |
CN101727475B (en) | Method, device and system for acquiring database access process | |
CN111083219A (en) | Request processing method, device, equipment and computer readable storage medium | |
CN114168179B (en) | Micro-service management method, micro-service management device, computer equipment and storage medium | |
JP2003051056A (en) | Automatic vending machine management system | |
CN111158752A (en) | SAAS multi-version control system and use method thereof | |
CN114422602B (en) | Micro-service calling method and device based on K8S cluster, electronic equipment and storage medium | |
CN116708266A (en) | Cloud service topological graph real-time updating method, device, equipment and medium | |
CN108279924A (en) | Program dissemination method and device | |
EP3742807A1 (en) | Method and apparatus for edge transfer based on movement of user device | |
CN117971418A (en) | Configuration method, configuration device and storage medium for life cycle rule | |
CN113064732A (en) | Distributed system and management method thereof | |
US9092397B1 (en) | Development server with hot standby capabilities | |
EP2200395A1 (en) | Managing method, system and device for an appearance packet | |
CN115827105A (en) | Micro front end architecture based method for dynamically loading main and sub applications | |
CN110532000B (en) | Kbroker distributed operating system for operation publishing and operation publishing system | |
CN111061723A (en) | Workflow implementation method and device | |
CN112532473B (en) | DNS-based multi-environment test access method and device | |
US10579722B1 (en) | Structured metadata for dynamic data encapsulation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |