Unitized configuration file loading method, device, equipment and medium
By automatically loading and verifying unitized configuration files in unitized devices, generating and loading Map collections and List collections, the problem of low manual configuration efficiency is solved, and efficient device configuration and disaster recovery improvement is achieved.
Patent Information
- Application Number
- CN202310610693.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-05-26
AI Technical Summary
In the existing unitized structure, each device needs to be configured manually, resulting in low configuration efficiency.
When a preset loading trigger event is monitored, the unitized configuration file is obtained, it is verified, multiple Map collections and List collections are generated, and a secondary verification is performed based on these collections. After the verification is passed, the data is loaded into memory.
Improve configuration efficiency, ensure normal operation of united equipment, reduce failure rate, and improve disaster recovery.
Smart Images

Figure CN116723228B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed systems, and in particular to a method, apparatus, device, and medium for loading a unitized configuration file. Background Art
[0002] With the advancement of technology and the increase in business volume, enterprises are developing disaster recovery architectures, such as those based in two locations and three data centers, to ensure continuous service provision and uninterrupted business processing. Furthermore, they are implementing unitization, enabling each unit to complete a complete business process. This improves disaster recovery capabilities, reduces cross-data center calls, and minimizes performance loss.
[0003] In existing technologies, when processing large amounts of business data, different units handle it independently, which necessitates data diversion. Equipment in the computer room can determine the business data it can process based on its own configuration. Device configuration is typically performed manually for each device.
[0004] In summary, in the existing unitized structure, each device needs to be manually configured, resulting in low configuration efficiency. Summary of the Invention
[0005] The present application provides a unitized configuration file loading method, apparatus, device and medium to solve the problem in existing unitized structures that manual configuration of each device is required, resulting in low configuration efficiency.
[0006] In a first aspect, the present application provides a unitized configuration file loading method, comprising:
[0007] When a preset loading trigger event is detected, the unitized configuration file is obtained;
[0008] Verifying the unitized configuration file to obtain a first verification result, where the first verification result is used to indicate that the unitized configuration file verification has preliminarily passed or that the unitized configuration file verification has failed;
[0009] If the first verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; wherein each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one business data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier; each physical unit data includes a physical unit identifier, a traffic access identifier, and a region; the first Map set includes the business data diversion identifiers in all logical unit data and each business data diversion identifier. The second Map set includes the physical unit identifiers in all physical unit data and the first business data diversion identifier set corresponding to each physical unit identifier, the third Map set includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier, the fourth Map set includes the user identity identifiers in all logical unit data and the third business data diversion identifier set corresponding to each user identity identifier, the fifth Map set includes the physical unit identifiers of all physical data with the target business data diversion identifier and the fifth business data diversion identifier set corresponding to each physical unit identifier, and the List set includes the business data diversion identifiers in all logical unit data;
[0010] Verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, where the second verification result is used to indicate whether the unitized configuration file verification passes or fails;
[0011] If the second verification result indicates that the unitized configuration file verification has passed, determining the total number of business data offload identifiers in all logical unit data to obtain the total number of business data offload identifiers, and for each third business data offload identifier set in the fourth Map set, sorting the third business data offload identifiers in the third business data offload identifier set to obtain an updated fourth Map set;
[0012] The first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers are loaded into the memory.
[0013] In a second aspect, the present application provides a unitized configuration file loading device, comprising:
[0014] The acquisition module is used to obtain the unitized configuration file when a preset loading trigger event is detected;
[0015] Processing module for:
[0016] Verifying the unitized configuration file to obtain a first verification result, where the first verification result is used to indicate that the unitized configuration file verification has preliminarily passed or that the unitized configuration file verification has failed;
[0017] If the first verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; wherein each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one business data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier; each physical unit data includes a physical unit identifier, a traffic access identifier, and a region; the first Map set includes the business data diversion identifiers in all logical unit data and each business data diversion identifier. The second Map set includes the physical unit identifiers in all physical unit data and the first business data diversion identifier set corresponding to each physical unit identifier, the third Map set includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier, the fourth Map set includes the user identity identifiers in all logical unit data and the third business data diversion identifier set corresponding to each user identity identifier, the fifth Map set includes the physical unit identifiers of all physical data with the target business data diversion identifier and the fifth business data diversion identifier set corresponding to each physical unit identifier, and the List set includes the business data diversion identifiers in all logical unit data;
[0018] Verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, where the second verification result is used to indicate whether the unitized configuration file verification passes or fails;
[0019] If the second verification result indicates that the unitized configuration file verification has passed, determining the total number of business data offload identifiers in all logical unit data to obtain the total number of business data offload identifiers, and for each third business data offload identifier set in the fourth Map set, sorting the third business data offload identifiers in the third business data offload identifier set to obtain an updated fourth Map set;
[0020] The first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers are loaded into the memory.
[0021] In a third aspect, the present application provides an electronic device, comprising:
[0022] Processor, memory, communication interface;
[0023] The memory is used to store executable instructions of the processor;
[0024] The processor is configured to execute the unitized configuration file loading method described in any one of the first aspects by executing the executable instructions.
[0025] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the unitized configuration file loading method described in any one of the first aspects is implemented.
[0026] The unitized configuration file loading method, apparatus, device and medium provided in the present application verify the obtained unitized configuration file after monitoring a preset loading trigger event; if the verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; verification is performed again based on the first Map set and the List set, and if the verification result indicates that the unitized configuration file verification has been passed, the total number of business data diversion identifiers is determined and the fourth Map set is updated; finally, the obtained Map set and the total number of business data diversion identifiers are loaded into the memory. This solution effectively improves configuration efficiency by obtaining five Map sets and the total number of business data diversion identifiers according to the configuration file after monitoring a preset loading trigger event and loading them into the memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0028] Figure 1 This is a flow chart of the first embodiment of the unitized configuration file loading method provided by this application;
[0029] Figure 2 This is a flow chart of Example 2 of the unitized configuration file loading method provided by this application;
[0030] Figure 3This is a flow chart of Example 3 of the unitized configuration file loading method provided by this application;
[0031] Figure 4 This is a flow chart of Example 4 of the unitized configuration file loading method provided by this application;
[0032] Figure 5 This is a schematic diagram of the structure of an embodiment of a unitized configuration file loading device provided by this application;
[0033] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.
[0034] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0036] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] With the development of science and technology and the increase in business volume of various enterprises, in order to improve disaster tolerance, a disaster recovery architecture such as two locations and three centers can be established to ensure that services can be provided continuously and business processing is uninterrupted. It is also necessary to unitize so that each unit can complete the complete business process, improve disaster recovery capabilities, reduce cross-computer room calls, and reduce performance loss. A unit refers to a self-contained collection that can complete all business operations. This collection includes all services required for all businesses, as well as the data assigned to this unit. Unitization uses the unit as the basic unit of deployment, and deploys several units in all computer rooms throughout the site. The number of units in each computer room is not fixed. Any unit is deployed with all applications required by the system, and the data is a part of the full data divided according to a certain dimension.
[0038] In existing technologies, different units process business data independently, which requires data diversion. Equipment in the computer room can determine the business data it can process based on its own configuration. However, device configuration is typically done manually, resulting in low efficiency.
[0039] In response to the problems existing in the prior art, the inventors discovered during their research on the unitized configuration file loading method that, in order to improve configuration efficiency, the unitized configuration file can be preset in the equipment in the computer room. When the equipment starts up, the unitized configuration file is automatically loaded to complete the configuration. The equipment in the computer room can be called unitized equipment. When the equipment is detected to be powered on or when the unitized configuration file is updated, the unitized equipment can obtain the unitized configuration file and then perform a first verification on the unitized configuration file. After the verification is passed, multiple Map sets and a List set can be generated based on the logical unit data and physical unit data in the unitized configuration file. Then, a second verification is performed based on the List set. After the verification is passed, the total number of business data diversion identifiers is calculated and the Map set is updated. Finally, the Map set, List set, and the total number of business data diversion identifiers are loaded into the memory to complete the configuration. When the unitized equipment is subsequently running, it can determine the business data it processes based on the Map set, List set, and the total number of business data diversion identifiers. Based on the above-mentioned inventive concept, the unitized configuration file loading scheme in this application is designed.
[0040] The execution subject of the unitized configuration file loading method in this application is the equipment in the computer room, also called unitized equipment, which can be a server, or a switch, router and other equipment. This application does not limit it.
[0041] The following is an example of an application scenario of the unitized configuration file loading method provided in this application.
[0042] For example, in this application scenario, multiple computer rooms in different regions form a disaster recovery architecture and are divided into units. Before the equipment in the computer room is officially put into operation, the staff can send the unitized configuration file to each device in the computer room, that is, the unitized device, through the terminal device. Then, when the unitized device is started and operated, the unitized configuration file is loaded into the memory to complete the configuration.
[0043] When a modular device starts up, it retrieves the modular configuration file and verifies it. After verification, it generates multiple Map sets and List sets. The modular configuration file is then verified again against the List sets. After verification, it generates the total number of business data diversion identifiers, updates the Map set, and finally loads the Map set and the total number of business data diversion identifiers into memory. Both the Map set and the total number of business data diversion identifiers are required by the modular device during subsequent operation.
[0044] It should be noted that terminal devices include, but are not limited to, devices that communicate via a data connection / network and / or via a wireless interface, such as devices for cellular networks, wireless local area networks (WLANs), and / or Internet of Things (IoT) devices. Terminal devices configured to communicate via a wireless interface may be referred to as "wireless communication terminals," "wireless terminals," or "mobile terminals." Examples of mobile terminals include, but are not limited to, satellite or cellular telephones; Personal Communications System (PCS) terminals that may combine cellular radiotelephones with data processing, fax, and data communication capabilities; Personal Digital Assistants (PDAs) that may include a radiotelephone, pager, Internet / Intranet access, web browser, notepad, calendar, and / or Global Positioning System (GPS) receiver; and conventional laptop and / or palmtop receivers or other electronic devices that include a radiotelephone transceiver. The term "access terminal" may refer to an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user apparatus. The access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a PDA, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a 5G network, a terminal device in a satellite network, or a terminal device in a future evolved PLMN, etc., and this solution does not impose any restrictions on this.
[0045] It should be noted that the above scenario is only an example of an application scenario provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of the various devices included in the scenario, nor does it limit the interaction method between the devices. In the specific application of the solution, it can be set according to actual needs.
[0046] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0047] Figure 1This is a flow chart of the first embodiment of the method for loading a unitized configuration file provided by the present application. In this embodiment, when the unitized device detects a preset loading trigger event, the unitized configuration file is obtained, and then the unitized configuration file is verified. After the verification is passed, a Map set and the total number of business data diversion identifiers are generated, and the Map set and the total number of business data diversion identifiers are loaded into the memory to complete the configuration. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. Figure 1 As shown, the unitized configuration file loading method specifically includes the following steps:
[0048] S101: When a preset loading trigger event is detected, a unitized configuration file is obtained.
[0049] In this step, in order to improve configuration efficiency, the staff will set the unitized configuration file in the unitized device, so that the unitized device can obtain the unitized configuration file when detecting the preset loading trigger event.
[0050] It should be noted that the preset loading triggering events include booting up or completion of updating of the unitized configuration file.
[0051] It should be noted that the preset loading trigger event for the completion of the unitized configuration file update is that when the staff finds an error in the unitized configuration file, they set the new configuration file in the unitized device; or when reconfiguration is needed, the staff sets the new configuration file in the unitized device, and the unitized device can monitor it; at this time, the unitized device can be reloaded without shutting down.
[0052] S102: Verify the unitized configuration file to obtain a first verification result.
[0053] In this step, after the unitized device obtains the unitized configuration file, in order to determine whether there are any errors in the subsequent business data processing, it is necessary to verify the unitized configuration file to verify whether the relevant data exists and whether the correspondence between the data is correct, and obtain a first verification result. The first verification result is used to indicate that the unitized configuration file verification has been preliminarily passed or the unitized configuration file verification has failed.
[0054] S103: If the first verification result indicates that the unitized configuration file verification has preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file.
[0055] In this step, after the unitized device verifies the unitized configuration file, if the first verification result indicates that the unitized configuration file verification has preliminarily passed, it means that further processing can be performed to generate the first Map set, the second Map set, the third Map set, the fourth Map set, the fifth Map set and the List set based on the logical unit data and the physical unit data in the unitized configuration file.
[0056] Each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one service data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier. Since the logical unit data only includes one logical unit identifier, there is a correspondence between the logical unit identifier and the user identity identifier, and between the user identity identifier and the service data diversion identifier. Therefore, there is also a correspondence between the logical unit identifier and the service data diversion identifier, and there is also a correspondence between the logical unit data and the service data diversion identifier. Each physical unit data includes a physical unit identifier, a traffic access identifier, and a region.
[0057] The first Map set includes the service data diversion identifiers in all the logical unit data and the logical unit data corresponding to each service data diversion identifier.
[0058] The second Map set includes the physical unit identifiers in all physical unit data and the first service data offload identifier set corresponding to each physical unit identifier.
[0059] The third Map set includes the logical unit identifiers in all logical unit data and a second service data offload identifier set corresponding to each logical unit identifier.
[0060] The fourth Map set includes user identity identifiers in all logical unit data and a third service data offload identifier set corresponding to each user identity identifier.
[0061] The fifth Map set includes the physical unit identifiers of all physical data having the target business data offload identifier and the fifth business data offload identifier set corresponding to each physical unit identifier.
[0062] The List collection includes the business data diversion identifiers in all logical unit data.
[0063] It should be noted that a physical unit refers to a collection of devices that can complete all business data processing processes.
[0064] It should be noted that if the first verification result indicates that the unitized configuration file verification has failed, the first verification result is output. The first verification result can be output by displaying the first verification result on a display, playing the first verification result through a speaker, or sending the first verification result to a staff member's terminal device. This embodiment of the application does not limit the method for outputting the first verification result, and the method can be selected based on actual circumstances.
[0065] It should be noted that this application has no restrictions on user identity identification, which can effectively improve compatibility.
[0066] S104: Verify the unitized configuration file according to the first Map set and the List set to obtain a second verification result.
[0067] In this step, after the unitized device obtains five Map sets and List sets, it is necessary to verify the unitized configuration file again to ensure that there is no duplicate data in the unitized configuration file and that the business data diversion identifier is continuous. The unitized configuration file can be verified according to the first Map set and List set. The List set includes the business data diversion identifiers in all logical unit data, so it can be determined whether the business data diversion identifiers are continuous; then, based on whether the lengths of the first Map set and the List set are equal, it is determined whether the data is duplicated, and a second verification result is obtained. The second verification result is used to indicate whether the unitized configuration file verification has passed or the unitized configuration file verification has failed.
[0068] S105: If the second verification result indicates that the unitized configuration file verification has passed, determine the total number of business data diversion identifiers in all logical unit data to obtain the total number of business data diversion identifiers, and for each third business data diversion identifier set in the fourth Map set, sort the third business data diversion identifiers in the third business data diversion identifier set to obtain an updated fourth Map set.
[0069] In this step, after the unitized device re-verifies the unitized configuration file, if the second verification result indicates that the unitized configuration file verification has passed, it means that the remaining data for configuration can be generated, and the total number of business data diversion identifiers in all logical unit data is determined to obtain the total number of business data diversion identifiers. For each third business data diversion identifier set in the fourth Map set, the third business data diversion identifiers in the third business data diversion identifier set are sorted to obtain an updated fourth Map set.
[0070] It should be noted that if the second verification result indicates that the unitized configuration file has failed verification, the second verification result is output. The second verification result can be output via a display, played via a speaker, or sent to a staff member's terminal device. This embodiment of the application does not limit the method for outputting the second verification result; the method can be selected based on actual circumstances.
[0071] S106: Load the first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers into the memory.
[0072] In this step, after the unitized device updates the fourth Map set and obtains the total number of business data diversion identifiers, it loads the first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of business data diversion identifiers into the memory to complete the configuration process.
[0073] In the process of processing business data, the unitized device will process the business data according to these data. Each element in the Map set is in the form of a key-value pair. When it is necessary to find the corresponding logical unit data through the business data diversion identifier, it can be implemented according to the first Map set. When it is necessary to find the corresponding first business data diversion identifier set through the physical unit identifier, it can be implemented according to the second Map set. When it is necessary to find the corresponding second business data diversion identifier set through the logical unit identifier, it can be implemented according to the third Map set. When it is necessary to find the corresponding third business data diversion identifier set through the user identity identifier, it can be implemented according to the updated fourth Map set. When it is necessary to find the corresponding fifth business data diversion identifier set through the physical unit identifier, it can be implemented according to the fifth Map set.
[0074] When a piece of business data needs to be processed, it is necessary to determine which logical unit and which physical unit corresponding to the logical unit should process the business data. The remainder obtained by dividing the customer identity identifier in the business data by the total number of business data diversion identifiers can be calculated. The remainder can represent the business data diversion identifier. Combined with the third Map set, it can be determined which logical unit should process it. Then, combined with the second Map set, it can be determined which physical unit will process the business data. In addition, for overseas business data, the user identity identifier in the overseas business data can be hashed to obtain a hash value. Combined with the updated fourth Map set, the hash value-th business data diversion identifier in the third business data diversion identifier set corresponding to the user identity identifier can be determined. Combined with the third Map set, it can be determined which logical unit should process it.
[0075] It's important to note that the unitized configuration file is written in YAML and serves as a software development kit (SDK) based on the Spring Boot framework. Business components can rely on this SDK during development. When the unitized device starts, the unit information in the configuration file is automatically loaded into the bean. When services call each other, the unit information is retrieved from the bean, providing the unit information foundation for inter-service calls. This component uses annotations such as @ConfigurationProperties and @EnableConfigurationProperties to read configuration information from a YAML file (that is, the unitized configuration file) and load it into the unit information class. @ConfigurationProperties converts the data loaded from the unitized configuration file into a bean object, and @EnableConfigurationProperties enables @ConfigurationProperties. Adding @Configuration to a class designates it as a configuration class, and adding @Bean to a method instructs the method to create a bean managed by the Spring container. @SpringBootApplication automatically scans for configuration classes in a package and loads the beans created by @Bean into the Spring container. The beans generated by the unit information class of this component are managed and stored in memory by the Spring container. They also provide external interfaces for various forms of unit information queries.
[0076] The unitized configuration file loading method provided in this embodiment obtains the unitized configuration file when a preset loading trigger event is detected, and then verifies the unitized configuration file. After the verification is passed, multiple Map sets and List sets are generated. A second verification is then performed based on the List set. After the verification is passed, the total number of business data diversion identifiers is generated and one of the Map sets is updated. The Map set and the total number of business data diversion identifiers are then loaded into the memory to complete the configuration. Compared with the manual configuration in the prior art, this solution can realize the unitized device being powered on, or after the unitized configuration file is updated, the unitized device is configured according to the unitized configuration file, which effectively improves the configuration efficiency. In addition, during the configuration process, the unitized configuration file is verified multiple times to ensure the normal operation of the unitized device, reduce the failure rate, and improve disaster recovery.
[0077] Figure 2This is a flow chart of the second embodiment of the method for loading a unitized configuration file provided by this application. Based on the above embodiment, this embodiment of the application describes the situation where the unitized device verifies the unitized configuration file and obtains the first verification result. Figure 2 As shown, the unitized configuration file loading method specifically includes the following steps:
[0078] S201: Determine whether there is logical unit data in the unitized configuration file, whether there is physical unit data in the unitized configuration file, and whether there is a correspondence between the logical unit identifier in each logical unit data and the physical unit identifier in at least one physical unit data; if there is logical unit data in the unitized configuration file, and there is physical unit data, and there is a correspondence between the logical unit identifier in each logical unit data and the physical unit identifier in at least one physical unit data, then execute step S202; if there is no logical unit data in the unitized configuration file, and / or there is no physical unit data, and / or there is no correspondence between the logical unit identifier in at least one logical unit data and the physical unit identifier in the physical unit data, then execute step S203.
[0079] S202: Generate a first verification result indicating that the unitized configuration file has preliminarily passed verification.
[0080] S203: Generate a first verification result indicating that the unitized configuration file has failed verification.
[0081] In the above steps, after the unitized device obtains the unitized configuration file, in order to ensure that the data in the unitized configuration file is not missing and whether the correspondence between the data is correct, it is necessary to verify the unitized configuration file to determine whether there is logical unit data in the unitized configuration file, whether there is physical unit data in the unitized configuration file, and whether there is a correspondence between the logical unit identifier in each logical unit data and the physical unit identifier in at least one physical unit data.
[0082] If there is logical unit data and physical unit data in the unitized configuration file, and there is a correspondence between the logical unit identifier in each logical unit data and the physical unit identifier in at least one physical unit data, indicating that there is no missing data and the correspondence is correct, then a first verification result is generated to indicate that the unitized configuration file verification has preliminarily passed.
[0083] If there is no logical unit data in the unitized configuration file, and / or no physical unit data, and / or there is no correspondence between the logical unit identifier in at least one logical unit data and the physical unit identifier in the physical unit data, it means that the data is missing and / or the correspondence is incorrect, and a first verification result is generated to indicate that the unitized configuration file verification has failed.
[0084] It should be noted that it is also possible to determine whether a physical unit identifier in each physical unit data item corresponds to a logical unit identifier in the logical unit data item. If the physical unit identifier in at least one physical unit data item does not correspond to the logical unit identifier in the logical unit data item, a first verification result indicating that the unitized configuration file verification has failed is also generated. If logical unit data and physical unit data exist in the unitized configuration file, and the logical unit identifier in each logical unit data item corresponds to the physical unit identifier in at least one physical unit data item, and the physical unit identifier in each physical unit data item corresponds to the logical unit identifier in the logical unit data item, a first verification result indicating that the unitized configuration file verification has preliminarily passed is generated.
[0085] It should be noted that logical unit data can be divided into overseas logical unit data and local logical unit data, and physical unit data can be divided into overseas physical unit data and local physical unit data.
[0086] The unitized configuration file loading method provided in this embodiment verifies the unitized configuration file after obtaining it, thereby ensuring that the unitized device processes service data normally and reducing the failure rate.
[0087] Figure 3 This is a flow chart of the third embodiment of the method for loading a unitized configuration file provided by the present application. Based on the above embodiment, the embodiment of the present application describes the case where a unitized device generates a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set, and a List set according to the logical unit data and the physical unit data in the unitized configuration file, such as Figure 3 As shown, the unitized configuration file loading method specifically includes the following steps:
[0088] S301: Generate a sixth Map set and List set according to the logical unit data in the unitized configuration file.
[0089] In this step, when the unitized device obtains the first verification result, if the first verification result indicates that the unitized configuration file verification has been preliminarily passed, in order to perform a second verification and generate part of the data for loading into the memory, it is necessary to generate a sixth Map set and List set based on the logical unit data in the unitized configuration file.
[0090] Since the first verification result indicates that the unitized configuration file has preliminarily passed verification, the unitized configuration file includes at least one logical unit data. Since each logical unit data includes a logical unit identifier, a sixth Map set can be generated. The sixth Map set includes the logical unit identifiers in all logical unit data and the logical unit data corresponding to each logical unit identifier. Since the logical unit data includes a service data diversion identifier, a List set can be generated. The List set includes the service data diversion identifiers in all logical unit data.
[0091] S302: Generate a seventh Map set according to the physical unit data in the unitized configuration file.
[0092] In this step, when the unitized device obtains the first verification result, if the first verification result indicates that the unitized configuration file verification has been preliminarily passed, in order to perform a second verification and generate part of the data for loading into the memory, it is also necessary to generate the seventh Map set based on the physical unit data in the unitized configuration file.
[0093] Since the first verification result indicates that the unitized configuration file verification has preliminarily passed, it means that the unitized configuration file includes at least one physical unit data. Since each physical unit data includes a physical unit identifier, a seventh Map set can be generated. The seventh Map set includes the physical unit identifiers in all physical unit data and the physical unit data corresponding to each physical unit identifier.
[0094] It should be noted that the physical unit data may include a target business data diversion identifier, and the target business data diversion identifier in the seventh Map set may be converted to improve the subsequent processing speed. For example, the format of the target business data diversion identifier is:
[0095] activeShardingNos:
[0096] -$->{0..3}
[0097] -$->{5..6}
[0098] This can be converted to {0,1,2,3,5,6}.
[0099] It should be noted that the execution order of step S301 and step S302 can be: first execute step S301, then execute step S302; or first execute step S302, then execute step S301; or step S301 and step S302 can be executed simultaneously. This embodiment of the application does not limit the execution order of step S301 and step S302, and can be set according to actual circumstances.
[0100] It should be noted that the sixth Map set and the seventh Map set can also be loaded into the memory.
[0101] S303: Generate a first Map set, a third Map set, and a fourth Map set according to the sixth Map set.
[0102] In this step, after obtaining the sixth Map set, the unitized device may generate the first Map set, the third Map set, and the fourth Map set according to the sixth Map set.
[0103] Because each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, and at least one service data diversion identifier corresponding to each user identity identifier, a corresponding relationship exists between the service data diversion identifier and the logical unit data. Furthermore, because the sixth Map set includes the logical unit data corresponding to each logical unit identifier, a first Map set can be generated based on the sixth Map set. The first Map set includes the service data diversion identifiers in all logical unit data and the logical unit data corresponding to each service data diversion identifier.
[0104] Since each logical unit data includes: a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, and at least one business data diversion identifier corresponding to each user identity identifier, there is also a corresponding relationship between the logical unit identifier and the business data diversion identifier. Furthermore, since the sixth Map set includes the logical unit data corresponding to each logical unit identifier, according to the sixth Map set, for each logical unit identifier, all business data diversion identifiers corresponding to the logical unit identifier can be combined into a set as the second business data diversion identifier set corresponding to the logical unit identifier. Furthermore, a third Map set can be generated, which includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier.
[0105] Because each logical unit data includes at least one user identity and at least one service data diversion identifier corresponding to each user identity, and because the sixth Map set includes the logical unit data corresponding to each logical unit identifier, based on the sixth Map set, for each user identity, all service data diversion identifiers corresponding to that user identity can be grouped into a set as the third service data diversion identifier set corresponding to that user identity. This can then generate four Map sets, with the fourth Map set including all user identities in the logical unit data and the third service data diversion identifier set corresponding to each user identity.
[0106] S304: The physical unit data in the seventh Map set, in which the traffic admission identifier indicates traffic admission and has the target service data diversion identifier, is used as the first target physical unit data.
[0107] In this step, after obtaining the seventh Map set, the unitized device can generate the fifth Map set based on the seventh Map set. Since each physical unit data includes a physical unit identifier, a traffic access identifier, a region, and possibly a target service data diversion identifier, the physical unit data in the seventh Map set that has a traffic access identifier indicating traffic access and a target service data diversion identifier is used as the first target physical unit data.
[0108] It should be noted that, if there is physical unit data with a target service data diversion identifier, the traffic admission identifier included therein must indicate traffic admission.
[0109] S305: For each first target physical unit data, store the physical unit identifier in the first target physical unit data and the target service data offload identifier of the first target physical unit data into a blank Map set to obtain a fifth Map set.
[0110] In this step, after the unitization device determines the first target physical unit data in the seventh Map set, it stores the physical unit identifier and the target business data diversion identifier of each first target physical unit data in the blank Map set, thereby obtaining a fifth Map set. The fifth Map set includes the physical unit identifiers of all physical data with target business data diversion identifiers and the set of fifth business data diversion identifiers corresponding to each physical unit identifier. The set of fifth business data diversion identifiers corresponding to the physical unit identifier in each first target physical unit data is the set formed by the target business data diversion identifiers of the first target physical unit data.
[0111] S306: For each physical unit data whose traffic admission identifier in the seventh Map set indicates that traffic is not admitted, determine the first service data offload identifier set corresponding to the physical unit identifier of the physical unit data as an empty set.
[0112] In this step, after obtaining the seventh Map set, the unitized device may generate a second Map set based on the seventh Map set. For each physical unit data in the seventh Map set whose traffic admission identifier indicates that traffic is not admitted, a first service data diversion identifier set is generated to correspond to the physical unit identifier of the physical unit data, and the first service data diversion identifier set corresponding to the physical unit identifier of the physical unit data is determined to be an empty set.
[0113] S307: For each traffic access identifier in the seventh Map set indicating traffic access, and for physical unit data with a target business data diversion identifier, a set formed by all target business data diversion identifiers included in the physical unit data is determined as the first business data diversion identifier set corresponding to the physical unit identifier of the physical unit data.
[0114] In this step, for each traffic access identifier in the seventh Map set indicating traffic access, and for physical unit data with a target business data diversion identifier, the set formed by all target business data diversion identifiers included in the physical unit data is determined as the first business data diversion identifier set corresponding to the physical unit identifier of the physical unit data.
[0115] S308: Determine, from among all the physical unit data of the seventh Map set, an adjacent physical unit data having the same region as that in the physical unit data and whose physical unit identifier corresponds to the same logical unit identifier, and determine the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the first target logical unit identifier.
[0116] In this step, the unitized device indicates traffic admission for each traffic admission identifier, and there is physical unit data with a target business data diversion identifier. After determining the first business data diversion identifier set corresponding to the physical unit identifier of the physical unit data, the device determines, among all the physical unit data in the seventh Map set, an adjacent physical unit data having the same region as the physical unit data and a physical unit identifier corresponding to the same logical unit identifier, and determines the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the first target logical unit identifier. Based on the correspondence between the logical unit identifiers and the physical unit identifiers included in the logical unit data, it can be determined that the physical unit identifier of the physical unit data and the physical unit identifier of the adjacent physical unit correspond to the same logical unit identifier.
[0117] S309: Determine a set formed by business data diversion identifiers of all business data diversion identifiers in the logical unit data corresponding to the first target logical unit identifier, excluding all target business data diversion identifiers included in the physical unit data, as the first business data diversion identifier set corresponding to the physical unit identifiers of the adjacent physical unit data.
[0118] In this step, after the unitization device determines the adjacent physical unit data and the first target logical unit identifier, it determines the set formed by the business data diversion identifiers of all business data diversion identifiers in the logical unit data corresponding to the first target logical unit identifier, excluding all target business data diversion identifiers included in the physical unit data, as the first business data diversion identifier set corresponding to the physical unit identifier of the adjacent physical unit data.
[0119] S310: For each physical unit data in the seventh Map set that has not been determined to be in the first service data offload identifier set, a logical unit identifier corresponding to the physical unit identifier of the physical unit data is determined as a second target logical unit identifier.
[0120] In this step, since some physical unit data that can correspond to the first business data diversion identifier set have been determined in the seventh Map set in steps S309 and 310, the first business data diversion identifier set needs to be determined for the remaining physical unit data. Therefore, for each physical unit data in the seventh Map set that has not been determined to be in the first business data diversion identifier set, the logical unit identifier corresponding to the physical unit identifier of the physical unit data is determined as the second target logical unit identifier.
[0121] S311: Determine a set formed by all business data offload identifiers in the logical unit data corresponding to the second target logical unit identifier as a first business data offload identifier set corresponding to the physical unit identifier of the physical unit data.
[0122] S312: Store the physical unit identifier of each physical unit data in the seventh Map set and the first service data offload identifier set corresponding to the physical unit identifier into the blank Map set to obtain a second Map set.
[0123] In the above steps, after the unitization device determines the second target logical unit identifier, it determines the set formed by all service data offload identifiers in the logical unit data corresponding to the second target logical unit identifier as the first service data offload identifier set corresponding to the physical unit identifier of the physical unit data. Furthermore, the physical unit identifier of each physical unit data in the seventh Map set and the first service data offload identifier set corresponding to the physical unit identifier are stored in the blank Map set, thereby obtaining a second Map set.
[0124] It should be noted that the execution order of step S303, step S304-step S305, and step S306-step S312 can be: first execute step S304, then execute step S304-step S305, and finally execute step S306-step S312; it can also be: first execute step S304-step S305, then execute step S304, and finally execute step S306-step S312; it can also be: first execute step S306-step S312, then execute step S304-step S305, and finally execute step S304. The embodiment of the present application does not limit the execution order of step S303, step S304-step S305, and step S306-step S312, and can be set according to actual conditions.
[0125] The unitized configuration file loading method provided in this embodiment generates, based on the logical unit data and physical unit data in the unitized configuration file, a sixth Map set including the logical unit identifiers in all the logical unit data and the logical unit data corresponding to each logical unit identifier, and a seventh Map set including the physical unit identifiers in all the physical unit data and the physical unit data corresponding to each physical unit identifier; and then, based on the sixth Map set and the seventh Map set, as well as the correspondence between the traffic access identifier, the target business data diversion identifier, the physical unit identifier and the logical unit identifier, obtains the first Map set, the second Map set, the third Map set, the fourth Map set, the fifth Map set and the List set, thereby effectively improving data accuracy.
[0126] Figure 4 This is a flow chart of the fourth embodiment of the method for loading a unitized configuration file provided by this application. Based on the above embodiment, this embodiment of the application describes the situation where the unitized device verifies the unitized configuration file according to the first Map set and the List set to obtain the second verification result. Figure 4 As shown, the unitized configuration file loading method specifically includes the following steps:
[0127] S401: Determine whether the smallest business data diversion identifier in the List set is a preset identifier, whether the business data diversion identifiers in the List set are continuous, and whether the length of the first Map set is equal to the length of the List set; if the smallest business data diversion identifier in the List set is a preset identifier, and the business data diversion identifiers in the List set are continuous, and the length of the first Map set is equal to the length of the List set, then execute step S402; if the smallest business data diversion identifier in the List set is not a preset identifier, and / or the business data diversion identifiers in the List set are discontinuous, and / or the length of the first Map set is not equal to the length of the List set, then execute step S403.
[0128] S402: Generate a second verification result indicating that the unitized configuration file has passed verification.
[0129] S403: Generate a second verification result indicating that the unitized configuration file has failed verification.
[0130] In the above steps, after the unitized device obtains the Map set and the List set, in order to ensure that there are no errors in the data in the unitized configuration file, the unitized configuration file needs to be verified again to determine whether the smallest business data diversion identifier in the List set is a preset identifier, whether the business data diversion identifiers in the List set are continuous, and whether the length of the first Map set is equal to the length of the List set.
[0131] If the smallest business data diversion identifier in the List set is a preset identifier, the business data diversion identifiers in the List set are continuous, and the length of the first Map set is equal to the length of the List set, it means that if the business data diversion identifiers are sorted in ascending order, the starting business data diversion identifier meets the requirements, and the business data diversion identifiers are continuous and uninterrupted. Moreover, since the Map set does not allow duplicate keys to appear, and the List set allows data duplication, the length of the first Map set is equal to the length of the List set, indicating that there are no duplicate business data diversion identifiers. Therefore, it is determined that there are no errors in the data in the unitized configuration file, and a second verification result is generated indicating that the unitized configuration file verification has passed.
[0132] If the smallest business data diversion identifier in the List set is not a preset identifier, and / or the business data diversion identifiers in the List set are discontinuous, and / or the length of the first Map set is not equal to the length of the List set, it means that if the business data diversion identifiers are sorted in ascending order, the starting business data diversion identifier does not meet the requirements, and / or the business data diversion identifiers are discontinuous, and / or there are duplicate business data diversion identifiers, so it is determined that there is an error in the data in the unitized configuration file, and a second verification result indicating that the unitized configuration file verification failed is generated.
[0133] It should be noted that the preset identifier can be 0, 01, 003, 00002, etc. The embodiment of the present application does not limit the preset identifier and can be set according to actual conditions.
[0134] The unitized configuration file loading method provided in this embodiment verifies the unitized configuration file again after obtaining the Map set and the List set, thereby ensuring that the unitized device processes business data normally and reducing the failure rate.
[0135] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0136] Figure 5 This is a schematic diagram of the structure of the embodiment of the unitized configuration file loading device provided by this application; the device can be integrated into the unitized device in the above method embodiment, or can be implemented by the unitized device in the above method embodiment. Figure 5 As shown, the unitized configuration file loading device 50 includes:
[0137] The acquisition module 51 is used to acquire the unitized configuration file when a preset loading trigger event is detected;
[0138] The processing module 52 is configured to:
[0139] Verifying the unitized configuration file to obtain a first verification result, where the first verification result is used to indicate that the unitized configuration file verification has preliminarily passed or that the unitized configuration file verification has failed;
[0140] If the first verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; wherein each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one business data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier; each physical unit data includes a physical unit identifier, a traffic access identifier, and a region; the first Map set includes the business data diversion identifiers in all logical unit data and each business data diversion identifier. The second Map set includes the physical unit identifiers in all physical unit data and the first business data diversion identifier set corresponding to each physical unit identifier, the third Map set includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier, the fourth Map set includes the user identity identifiers in all logical unit data and the third business data diversion identifier set corresponding to each user identity identifier, the fifth Map set includes the physical unit identifiers of all physical data with the target business data diversion identifier and the fifth business data diversion identifier set corresponding to each physical unit identifier, and the List set includes the business data diversion identifiers in all logical unit data;
[0141] Verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, where the second verification result is used to indicate whether the unitized configuration file verification passes or fails;
[0142] If the second verification result indicates that the unitized configuration file verification has passed, determining the total number of business data offload identifiers in all logical unit data to obtain the total number of business data offload identifiers, and for each third business data offload identifier set in the fourth Map set, sorting the third business data offload identifiers in the third business data offload identifier set to obtain an updated fourth Map set;
[0143] The first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers are loaded into the memory.
[0144] Furthermore, the preset loading triggering event includes: startup operation, or completion of updating of the unitized configuration file.
[0145] Furthermore, the processing module 52 is specifically configured to:
[0146] If the unitized configuration file contains logical unit data and physical unit data, and a logical unit identifier in each logical unit data corresponds to a physical unit identifier in at least one physical unit data, generating a first verification result indicating that verification of the unitized configuration file has preliminarily passed;
[0147] If there is no logical unit data in the unitized configuration file, and / or there is no physical unit data, and / or there is no correspondence between the logical unit identifier in at least one logical unit data and the physical unit identifier in the physical unit data, a first verification result is generated to indicate that the unitized configuration file verification has failed.
[0148] Furthermore, the processing module 52 is further configured to:
[0149] Generate a sixth Map set and the List set according to the logical unit data in the unitized configuration file, wherein the sixth Map set includes the logical unit identifiers in all the logical unit data and the logical unit data corresponding to each logical unit identifier;
[0150] generating a seventh Map set according to the physical unit data in the unitized configuration file, wherein the seventh Map set includes physical unit identifiers in all the physical unit data and physical unit data corresponding to each physical unit identifier;
[0151] generating the first Map set, the third Map set, and the fourth Map set according to the sixth Map set;
[0152] The physical unit data in the seventh Map set, where the traffic admission identifier indicates traffic admission and the target service data diversion identifier exists, is used as the first target physical unit data;
[0153] For each first target physical unit data, storing the physical unit identifier in the first target physical unit data and the target service data offload identifier of the first target physical unit data into a blank Map set to obtain the fifth Map set;
[0154] For each physical unit data whose traffic admission identifier in the seventh Map set indicates that traffic is not admitted, determining the first service data offload identifier set corresponding to the physical unit identifier of the physical unit data to be an empty set;
[0155] For each traffic admission identifier in the seventh Map set indicating traffic admission and having physical unit data with a target service data diversion identifier, determine a set formed by all target service data diversion identifiers included in the physical unit data as a first service data diversion identifier set corresponding to the physical unit identifier of the physical unit data;
[0156] Determine, from all the physical unit data in the seventh map set, an adjacent physical unit data having the same region as the physical unit data and whose physical unit identifier corresponds to the same logical unit identifier, and determine the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the first target logical unit identifier;
[0157] Determine a set formed by all the service data diversion identifiers in the logical unit data corresponding to the first target logical unit identifier, excluding all target service data diversion identifiers included in the physical unit data, as the first service data diversion identifier set corresponding to the physical unit identifier of the adjacent physical unit data;
[0158] For each physical unit data in the seventh Map set that is not determined to be in the first service data offload identifier set, determining the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the second target logical unit identifier;
[0159] determining a set formed by all the service data offload identifiers in the logical unit data corresponding to the second target logical unit identifier as a first service data offload identifier set corresponding to the physical unit identifier of the physical unit data;
[0160] The physical unit identifier of each physical unit data in the seventh Map set and the first service data offload identifier set corresponding to the physical unit identifier are stored in a blank Map set to obtain the second Map set.
[0161] Furthermore, the processing module 52 is further configured to:
[0162] If the smallest business data offload identifier in the List set is a preset identifier, the business data offload identifiers in the List set are continuous, and the length of the first Map set is equal to the length of the List set, then generating a second verification result indicating that the unitized configuration file verification has passed;
[0163] If the minimum business data diversion identifier in the List set is not a preset identifier, and / or the business data diversion identifiers in the List set are discontinuous, and / or the length of the first Map set is not equal to the length of the List set, a second verification result is generated indicating that the unitized configuration file verification failed.
[0164] Furthermore, the processing module 52 is further configured to:
[0165] If the first verification result indicates that the unitized configuration file verification fails, the first verification result is output.
[0166] Furthermore, the processing module 52 is further configured to:
[0167] If the second verification result indicates that the unitized configuration file verification fails, the second verification result is output.
[0168] The unitized configuration file loading device provided in this embodiment is used to execute the technical solution in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0169] Figure 6 This is a schematic diagram of the structure of an electronic device provided by this application. Figure 6 As shown, the electronic device 60 includes:
[0170] Processor 61, memory 62, and communication interface 63;
[0171] The memory 62 is used to store executable instructions of the processor 61;
[0172] The processor 61 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0173] Optionally, the memory 62 can be independent or integrated with the processor 61.
[0174] Optionally, when the memory 62 is a device independent of the processor 61, the electronic device 60 may further include:
[0175] The bus 64 , the memory 62 and the communication interface 63 are connected to the processor 61 via the bus 64 and communicate with each other. The communication interface 63 is used to communicate with other devices.
[0176] Optionally, the communication interface 63 may be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., a client, a read-write library, and a read-only library). The memory may include random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage device.
[0177] Bus 64 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the figure shows only one thick line, but this does not imply that there is only one bus or only one type of bus.
[0178] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it 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 gate or transistor logic devices, and discrete hardware components.
[0179] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principles and technical effects are similar and will not be repeated here.
[0180] An embodiment of the present application further provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the technical solution provided by any of the aforementioned method embodiments.
[0181] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solution provided by any of the aforementioned method embodiments.
[0182] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A unitized configuration file loading method, characterized in that: include: When a preset loading trigger event is detected, the unitized configuration file is obtained; Verifying the unitized configuration file to obtain a first verification result, where the first verification result is used to indicate that the unitized configuration file verification has preliminarily passed or that the unitized configuration file verification has failed; If the first verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; wherein each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one business data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier; each physical unit data includes a physical unit identifier, a traffic access identifier, and a region; the first Map set includes the business data diversion identifiers in all logical unit data and each business data diversion identifier. The second Map set includes the physical unit identifiers in all physical unit data and the first business data diversion identifier set corresponding to each physical unit identifier, the third Map set includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier, the fourth Map set includes the user identity identifiers in all logical unit data and the third business data diversion identifier set corresponding to each user identity identifier, the fifth Map set includes the physical unit identifiers of all physical data with the target business data diversion identifier and the fifth business data diversion identifier set corresponding to each physical unit identifier, and the List set includes the business data diversion identifiers in all logical unit data; Verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, where the second verification result is used to indicate whether the unitized configuration file verification passes or fails; If the second verification result indicates that the unitized configuration file verification has passed, determining the total number of business data offload identifiers in all logical unit data to obtain the total number of business data offload identifiers, and for each third business data offload identifier set in the fourth Map set, sorting the third business data offload identifiers in the third business data offload identifier set to obtain an updated fourth Map set; The first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers are loaded into the memory.
2. The method according to claim 1, characterized in that The preset loading triggering event includes: starting up the computer, or completing the updating of the unitized configuration file.
3. The method according to claim 1, characterized in that Verifying the unitized configuration file to obtain a first verification result includes: If the unitized configuration file contains logical unit data and physical unit data, and a logical unit identifier in each logical unit data corresponds to a physical unit identifier in at least one physical unit data, generating a first verification result indicating that verification of the unitized configuration file has preliminarily passed; If there is no logical unit data in the unitized configuration file, and / or there is no physical unit data, and / or there is no correspondence between the logical unit identifier in at least one logical unit data and the physical unit identifier in the physical unit data, a first verification result is generated to indicate that the unitized configuration file verification has failed.
4. The method according to claim 1, wherein The generating, according to the logical unit data and the physical unit data in the unitized configuration file, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set, comprises: Generate a sixth Map set and the List set according to the logical unit data in the unitized configuration file, wherein the sixth Map set includes the logical unit identifiers in all the logical unit data and the logical unit data corresponding to each logical unit identifier; generating a seventh Map set according to the physical unit data in the unitized configuration file, wherein the seventh Map set includes physical unit identifiers in all the physical unit data and physical unit data corresponding to each physical unit identifier; generating the first Map set, the third Map set, and the fourth Map set according to the sixth Map set; The physical unit data in the seventh Map set, where the traffic admission identifier indicates traffic admission and the target service data diversion identifier exists, is used as the first target physical unit data; For each first target physical unit data, storing the physical unit identifier in the first target physical unit data and the target service data offload identifier of the first target physical unit data into a blank Map set to obtain the fifth Map set; For each physical unit data whose traffic admission identifier in the seventh Map set indicates that traffic is not admitted, determining the first service data offload identifier set corresponding to the physical unit identifier of the physical unit data to be an empty set; For each traffic admission identifier in the seventh Map set indicating traffic admission and having physical unit data with a target service data diversion identifier, determine a set formed by all target service data diversion identifiers included in the physical unit data as a first service data diversion identifier set corresponding to the physical unit identifier of the physical unit data; Determine, from all the physical unit data in the seventh map set, an adjacent physical unit data having the same region as the physical unit data and whose physical unit identifier corresponds to the same logical unit identifier, and determine the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the first target logical unit identifier; Determine a set formed by all the service data diversion identifiers in the logical unit data corresponding to the first target logical unit identifier, excluding all target service data diversion identifiers included in the physical unit data, as the first service data diversion identifier set corresponding to the physical unit identifier of the adjacent physical unit data; For each physical unit data in the seventh Map set that is not determined to be in the first service data offload identifier set, determining the logical unit identifier corresponding to the physical unit identifier of the physical unit data as the second target logical unit identifier; determining a set formed by all the service data offload identifiers in the logical unit data corresponding to the second target logical unit identifier as a first service data offload identifier set corresponding to the physical unit identifier of the physical unit data; The physical unit identifier of each physical unit data in the seventh Map set and the first service data offload identifier set corresponding to the physical unit identifier are stored in a blank Map set to obtain the second Map set.
5. The method according to claim 1, characterized in that The verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result includes: If the smallest business data offload identifier in the List set is a preset identifier, the business data offload identifiers in the List set are continuous, and the length of the first Map set is equal to the length of the List set, then generating a second verification result indicating that the unitized configuration file verification has passed; If the minimum business data diversion identifier in the List set is not a preset identifier, and / or the business data diversion identifiers in the List set are discontinuous, and / or the length of the first Map set is not equal to the length of the List set, a second verification result is generated indicating that the unitized configuration file verification failed.
6. The method according to claim 1, characterized in that After verifying the unitized configuration file and obtaining a first verification result, the method further includes: If the first verification result indicates that the unitized configuration file verification fails, the first verification result is output.
7. The method according to claim 1, characterized in that After verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, the method further includes: If the second verification result indicates that the unitized configuration file verification fails, the second verification result is output.
8. A unitized configuration file loading device, characterized in that: include: The acquisition module is used to obtain the unitized configuration file when a preset loading trigger event is detected; Processing module for: Verifying the unitized configuration file to obtain a first verification result, where the first verification result is used to indicate that the unitized configuration file verification has preliminarily passed or that the unitized configuration file verification has failed; If the first verification result indicates that the unitized configuration file verification has been preliminarily passed, a first Map set, a second Map set, a third Map set, a fourth Map set, a fifth Map set and a List set are generated according to the logical unit data and the physical unit data in the unitized configuration file; wherein each logical unit data includes a logical unit identifier, at least one user identity identifier corresponding to the logical unit identifier, at least one business data diversion identifier corresponding to each user identity identifier, and at least one physical unit identifier corresponding to the logical unit identifier; each physical unit data includes a physical unit identifier, a traffic access identifier, and a region; the first Map set includes the business data diversion identifiers in all logical unit data and each business data diversion identifier. The second Map set includes the physical unit identifiers in all physical unit data and the first business data diversion identifier set corresponding to each physical unit identifier, the third Map set includes the logical unit identifiers in all logical unit data and the second business data diversion identifier set corresponding to each logical unit identifier, the fourth Map set includes the user identity identifiers in all logical unit data and the third business data diversion identifier set corresponding to each user identity identifier, the fifth Map set includes the physical unit identifiers of all physical data with the target business data diversion identifier and the fifth business data diversion identifier set corresponding to each physical unit identifier, and the List set includes the business data diversion identifiers in all logical unit data; Verifying the unitized configuration file according to the first Map set and the List set to obtain a second verification result, where the second verification result is used to indicate whether the unitized configuration file verification passes or fails; If the second verification result indicates that the unitized configuration file verification has passed, determining the total number of business data offload identifiers in all logical unit data to obtain the total number of business data offload identifiers, and for each third business data offload identifier set in the fourth Map set, sorting the third business data offload identifiers in the third business data offload identifier set to obtain an updated fourth Map set; The first Map set, the second Map set, the third Map set, the updated fourth Map set, the fifth Map set, and the total number of service data diversion identifiers are loaded into the memory.
9. An electronic device, characterized in that: include: Processor, memory, communication interface; The memory is used to store executable instructions of the processor; The processor is configured to execute the unitized configuration file loading method according to any one of claims 1 to 7 by executing the executable instructions.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the unitized configuration file loading method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Distributed transaction management method and device, equipment, medium and product
CN112612551A
Page resource loading method and system
CN114003844A