Client cold start method, device, medium, equipment and program product
By storing client configuration data on the terminal device and using a preset tree structure, the problem of client cold boot dependence on the network is solved, and a faster and more stable cold boot process is achieved.
Patent Information
- Application Number
- CN202111032804.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2041-09-03
AI Technical Summary
Existing clients rely on network connections during cold startup, resulting in long startup time and slow speed and greater limitations.
The client's offline cold start is achieved by obtaining configuration data from the server when it is run for the first time on the terminal device, and storing the configuration data in multiple storage pages of the disk file based on the preset tree structure.
The client can be cold-started without network connection, reducing the limitations of cold-start, shortening the startup time and improving the startup speed.
Smart Images

Figure CN113703873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to a cold start method, device, medium, equipment and program product of a client. Background Art
[0002] With the continuous development of communication technology and in order to meet the various needs of users, more and more terminal applications have emerged, such as games, browsers, etc. Usually, when the client corresponding to these terminal applications is cold-started, that is, when the terminal is turned on and runs for the first time, it needs to connect to the network with the server and then obtain the configuration from the server, which makes the cold start of the client dependent on network conditions, has certain limitations, and has a long startup time and a slow startup speed. Summary of the invention
[0003] The present application provides a client cold start method, apparatus, medium, device and computer program product, which make the client cold start independent of network conditions, reduce the limitations of cold start, shorten the start time and improve the start speed.
[0004] In a first aspect, a cold start method of a client is provided, comprising:
[0005] When the preset client is run on the terminal device for the first time, it obtains configuration data from the server;
[0006] Based on a preset tree structure, the configuration data is stored in a plurality of storage pages of a disk file of the terminal device, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to a non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to a leaf node in the preset tree structure includes the service configuration data;
[0007] When the preset client is cold started, the configuration data is read from the disk file and services are provided.
[0008] In some implementations, storing the service identifier of the configuration data in a storage page corresponding to the non-leaf node includes:
[0009] At least two of the business identifiers and the indexes of the storage pages corresponding to the two business identifiers are stored in the storage page corresponding to the non-leaf node, wherein each storage page corresponding to the non-leaf node includes at least two of the business identifiers and the indexes of the storage pages corresponding to the two business identifiers, the number of business identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf node, and the at least two business identifiers are respectively the maximum / minimum business identifiers in each subtree.
[0010] In some implementations, reading the configuration data from the disk file and providing services includes:
[0011] Obtaining a read request, where the read request carries a first target service identifier;
[0012] Determine first target configuration data according to the first target service identifier;
[0013] The first target configuration data is read from the disk file, and all storage pages accessed when reading the first target configuration data are cached in a first cache area.
[0014] In some implementations, the first cache area is managed using a linked list, and storing all storage pages accessed when reading the first target configuration data in the first cache area includes:
[0015] All storage pages accessed when reading the first target configuration data are sequentially inserted into the linked list from the header of the linked list.
[0016] In some implementations, the cold start method further includes:
[0017] When the length of the linked list reaches a maximum threshold, if the storage page is inserted into the linked list, the storage page at the end of the linked list is discarded.
[0018] In some implementations, the cold start method further includes:
[0019] When a storage page stored in the linked list is read, the read storage page is moved to the head of the linked list.
[0020] In some implementations, before obtaining the read request, the method further includes:
[0021] Setting a read-write lock, wherein the read-write lock includes a read lock and a write lock, wherein the read locks for the same storage page are compatible, the read lock and the write lock for the same storage page are mutually exclusive, and the write locks for the same storage page are mutually exclusive;
[0022] After obtaining the read request, the method further includes: obtaining a read lock for the first target configuration data.
[0023] In some implementations, the cold start method further includes:
[0024] Obtaining a write request, where the write request carries a second target configuration identifier;
[0025] Determine second target configuration data according to the second target configuration identifier;
[0026] Acquire a read lock for the second target configuration data, and read a target storage page, where the target storage page is a storage page where the second target configuration data is located;
[0027] Copying the target storage page to obtain a copied storage page, and storing the copied storage page in a second buffer area;
[0028] updating the duplicate storage page according to the write request, and using the updated duplicate storage page to overwrite the target storage page in the disk file;
[0029] A write lock for the second target configuration data is acquired, and the target storage page of the first cache area is overwritten with the updated copy storage page.
[0030] In some implementations, the cold start method further includes:
[0031] When the remaining storage space of the second cache area is less than a preset value, the write request is limited at the request entry of the preset client.
[0032] In some implementations, after overwriting the target storage page of the first cache area with the updated copy storage page, the method further includes:
[0033] The updated duplicate storage page is deleted from the second cache area.
[0034] In a second aspect, a cold start device of a client is provided, comprising:
[0035] An acquisition module, used to acquire configuration data from a server when a preset client is run on a terminal device for the first time;
[0036] A storage module, configured to store the configuration data in a plurality of storage pages of a disk file of the terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to a non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to a leaf node in the preset tree structure includes the service configuration data;
[0037] The cold start module is used to read the configuration data from the disk file and provide services when the preset client is cold started.
[0038] According to a third aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on a computer device, enable the computer device to execute the method according to the first aspect.
[0039] In a fourth aspect, a computer device is provided, comprising: an interactive device, an input / output (I / O) interface, a processor and a memory, wherein program instructions are stored in the memory, the interactive device is used to obtain operation instructions input by a user, and the processor is used to execute the program instructions stored in the memory to execute the cold start method of the client as described in the second aspect above.
[0040] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0041] The embodiment of the present application obtains configuration data from the server when the preset client is run on the terminal device for the first time; stores the configuration data in multiple storage pages of the disk file of the terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, and the service identifier and the service configuration data have a one-to-one correspondence, and the content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data; when the preset client is cold-started, the configuration data is read from the disk file and services are provided, and the client does not need to establish a network connection with the server and obtain the configuration data from the server, so that its functions can be realized and services can be provided, thereby reducing the limitations of the client cold start, shortening the cold start time, and improving the cold start speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the cold start method of the client provided in the embodiment of the present application.
[0043] Figure 2 It is a schematic diagram of the structure of the disk file provided in the embodiment of the present application.
[0044] Figure 3 It is a structural diagram of the storage page corresponding to the leaf node provided in an embodiment of the present application.
[0045] Figure 4 It is a schematic diagram of an application scenario provided in an embodiment of the present application.
[0046] Figure 5 It is a flow chart of another cold start method of a client provided in an embodiment of the present application.
[0047] Figure 6 It is a schematic block diagram of a cold start device of a client provided in an embodiment of the present application.
[0048] Figure 7 It is a schematic block diagram of another cold start device of a client provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. For the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The embodiment of the present application provides a client cold start method, apparatus, computer device, storage medium and computer program product. Specifically, the client cold start method of the embodiment of the present application can be executed by a computer device, wherein the computer device can be a terminal.
[0051] See also Figure 1 , Figure 1 A schematic diagram of the process of the cold start method of the client described in the embodiment of the present application is shown, and the description is as follows:
[0052] Step 101: When the preset client runs on the terminal device for the first time, configuration data is obtained from the server.
[0053] Among them, the terminal device can be any intelligent electronic device with network communication capabilities, such as smart phones, tablet computers, smart watches, etc. The preset client can be a client corresponding to any application installed on the terminal device, which is used to provide local services to users, such as game clients, browsing clients, social clients, etc. It is easy to understand that an application can implement many functions, and the configuration data may include data required to implement the function, such as data representing screen color, data representing network connection, data representing window size, etc. Generally, the configuration data can be set by the publisher so that its functions can meet business needs and operate normally, and the publisher may regularly maintain and update the configuration data.
[0054] When the preset client is installed on the terminal device and runs for the first time, it obtains configuration data from the server to implement the application functions.
[0055] Step 102. Store the configuration data in multiple storage pages of the disk file of the terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data.
[0056] The preset tree structure may be a B+ tree structure, which can guide more data in limited storage compared to other tree structures.
[0057] Specifically, by persistently storing configuration data in disk files, the client can directly obtain configuration data locally for cold start without relying on the network, thereby reducing the limitations of client cold start and speeding up the client cold start.
[0058] It is easy to understand that hardware and operating systems often divide disk storage areas into continuous storage blocks of equal size, each storage block is called a storage page, each storage page is fixed in size and physically adjacent, each storage page has a unique page number, and the page numbers are continuously increased according to their physical relationship. For example, in this embodiment, the size of each storage page is fixed to 16KB (kilobytes), and its page numbers are 0 to N from the front to the back, for example, page3 represents the fourth storage page from the beginning of the disk file, that is, the fourth 16KB of content from the beginning.
[0059] For example, Figure 2 As shown, the configuration data of the application is stored in seven storage pages of the disk file, namely pang0 to page6. The logical structure of the seven storage pages is as follows Figure 2 The B+ tree shown. Specifically, the B+ tree is a three-order tree, including a root node, an intermediate node and a leaf node, wherein the root node and the intermediate node do not store configuration data, but only store service identifiers, and the leaf nodes store all configuration data. When a user reads the configuration data of a service from a disk file, the user starts searching from the root node according to the service identifier of the service, finds the corresponding leaf node and reads the data. It is easy to understand that the configuration data includes multiple service identifiers and service configuration data corresponding to the multiple service identifiers, wherein when the configuration data is stored in the storage page of the disk file, it is sorted in descending order according to the service identifier.
[0060] Specifically, the above step of "storing the business identifier of the configuration data in the storage page corresponding to the non-leaf node" includes: storing at least two business identifiers and the indexes of the storage pages corresponding to the two business identifiers in the storage page corresponding to the non-leaf node, wherein each storage page corresponding to the non-leaf node includes at least two of the business identifiers and the indexes of the storage pages corresponding to the two business identifiers, the number of business identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf node, and at least two business identifiers are the maximum / minimum business identifiers in each subtree, respectively.
[0061] For example, please continue to see Figure 2, the configuration data of the application includes seven business identifiers and the business configuration data corresponding to each business identifier, where the seven business identifiers are from pang0 to page6 in ascending order. The root node Page0 includes two subtrees, where the smallest business identifier in the left subtree is Key1 and the smallest business identifier in the right subtree is Key5. Therefore, it includes two business identifiers Key1 and Key5. It is easy to understand that an index can be understood as a pointer, such as Figure 2 As shown, Key1 in Page0 points to Page1, and the same is true for Page1 and Page2. For example, when you need to obtain the business configuration data corresponding to Key2, start from the root node for the first time. The root node includes two business identifiers, namely Key1 and Key5. Key2 is greater than Key1 and less than Key5. Therefore, go to the next level storage page corresponding to Key1 to find it, that is, Page1. Page1 includes two business identifiers, namely Key1 and Key3. Key2 is greater than Key1 and less than Key3. Therefore, go to the next level storage page corresponding to Key1 to find it, that is, Page3 to find the business configuration data corresponding to Key2. It can be seen that by using B+ tree to manage configuration data, from the root node to the leaf node, the search efficiency of each business configuration data is the same, and non-leaf nodes only store business identifiers, and do not need to store specific business configuration data, which greatly saves storage space and achieves the function of guiding more business configuration data within a limited storage space.
[0062] Specifically, the storage page corresponding to the leaf node is the node that actually stores the business configuration data, including the header, data, and tail. Figure 3 The header contains: the page number (Page NO) of the current storage page, the page number (Prev Page NO) of the previous storage page, the page number (Next Page NO) of the next storage page, the type of storage page (Page Type, root node, intermediate node or leaf node), and the checksum (Page Checksum), which records the Checksum when the page data is written and is used to check the page when reading data; the data part consists of adjacent configuration data (Data), each configuration data contains a data header (Data Header) and data KV (Key-Value, key-value pair), and the data header mainly records the offset position of the next configuration data in the storage page.
[0063] Step 103: When the preset client is cold started, the configuration data is read from the disk file and the service is provided.
[0064] In this embodiment, when the client cold starts, there is no need to establish a network connection with the server and then obtain configuration data from the server. The configuration data can be directly read from the local disk file and the corresponding service can be provided, thereby shortening the client cold start time and reducing the limitations of the client cold start, thus realizing offline cold start.
[0065] In some embodiments, in order to achieve higher performance in reading configuration data, the loaded storage pages can be stored in a cache, and when the storage pages are accessed later, they can be read directly from the cache to achieve high performance reading. Specifically, the step of "reading configuration data from a disk file and providing services" can mainly include: obtaining a read request, which carries a first target business identifier; determining the first target configuration data according to the first target business identifier; reading the first target configuration data from the disk file, and caching all storage pages loaded when reading the first target configuration data in the first cache area.
[0066] It is easy to understand that reading the first target configuration data requires loading at least two storage pages, a storage page corresponding to the root node and a storage page corresponding to the leaf node. No matter which business configuration data is read, it is necessary to start accessing from the storage page corresponding to the root node, and store the storage page corresponding to the root node in the first cache area. The next time the configuration data is read, there is no need to access the storage page corresponding to the root node from the disk file.
[0067] Specifically, in computer architecture, the largest and most reliable storage space is the disk, which has a large capacity and the content can be solidified, but the access speed is very slow. Therefore, the loaded storage pages can be stored in the cache. If the loaded storage pages need to be accessed later, they can be read directly from the cache to achieve high-performance reading.
[0068] In some embodiments, the first cache area is managed using a linked list, and the step of "storing all storage pages accessed when reading the first target configuration data in the first cache area" may mainly include: inserting all storage pages accessed when reading the first target configuration data into the linked list in sequence from the header of the linked list.
[0069] It is easy to understand that a linked list is a non-continuous and non-sequential storage structure in a physical storage structure, and the logical order of data elements is realized by the link order of pointers in the linked list. When data needs to be read or inserted, it is necessary to traverse from the head of the table. Therefore, all storage pages accessed when reading the first target configuration data can be inserted into the linked list from the head of the linked list in sequence to improve storage efficiency.
[0070] In some embodiments, the cold start method further includes: when the length of the linked list reaches a maximum threshold, if a storage page is inserted into the linked list, the storage page at the end of the linked list is discarded.
[0071] Specifically, the linked list may be an LRU (Least recently used) linked list. The core idea of the LRU linked list is that "if data has been accessed recently, it is more likely to be accessed in the future", so it can be eliminated based on the historical access records of the storage page.
[0072] In this embodiment, the cold start method further includes: when a storage page stored in the linked list is read, moving the read storage page to the head of the linked list.
[0073] From the above, we can know that if the storage page has been accessed recently, then the probability of being accessed in the future is also higher. Therefore, the accessed storage page can be moved to the head of the linked list to save the time of traversing backward from the head of the linked list. Figure 2 ,against Figure 2 In the B+ tree, assume that the initial LRU list is empty and the total length is limited to 5. When reading the configuration data corresponding to Key1, you need to access Page 0, Page 1, and Page 3 in sequence. At this time, first insert Page 0 into the LRU list, and the LRU list becomes {Page 0}. Then, insert Page 1 from the head of the table into the LRU list, and the LRU list becomes {Page 1, Page 0}. Then, continue to insert page 3 from the head of the table into the LRU list, and the LRU list becomes {Page 3, Page 1, Page 0}. Subsequently, if you read the configuration data corresponding to Key5, you need to access Page 0, Page 2, and Page 5 in sequence. Similarly, the changes of the LRU list at this time are: from {Page 0, Page 3, Page 1} to {Page 2, Page 0, Page 3, Page 1} and then to {Page5, Page 2, Page0, Page 3, Page 1}. At this time, the LRU list has reached the length limit. If the configuration data corresponding to Key3 is read subsequently, Page 0, Page 1, and Page 4 need to be accessed. At this time, the change process of the LRU linked list is: from {Page 0, Page 5, Page 2, Page 3, Page 1} to {Page 1, Page 0, Page 5, Page 2, Page 3} and then to {Page 4, Page 1, Page 0, Page 5, Page 2}.
[0074] It is easy to understand that when the LRU list is full, the storage page at the end of the chain will be deleted if a new storage page is inserted into the list. In general, Page 0 is the root node, and any storage page must be read from it, so it will always exist in the LRU list from the first read. It is worth noting that there is a special case where the height of the B+ tree is greater than the length limit of the LRU list. However, in general, the height of the B+ tree is generally 2 or 3 layers, which can meet the storage of tens of millions of data.
[0075] In some embodiments, considering that there are more read operations and fewer write operations in the read and write operations for configuration data, in order to meet the requirement that the configuration data allows multiple callers to read but only allows one user to write, before the step of "obtaining a read request", it also includes: setting a read-write lock, the read-write lock includes a read lock and a write lock, wherein the read locks for the same storage page are compatible, the read lock and write lock for the same storage page are mutually exclusive, and the write locks for the same storage page are mutually exclusive; after the above step of "obtaining read data", it also includes: obtaining a read lock for the first target configuration data.
[0076] It is important to understand that a read lock is a lock for reading data, and a write lock is a lock for writing data. For the same storage page, multiple callers can hold a read lock at the same time, but only one caller is allowed to hold a write lock. When a caller writes data, it will also block other callers' read operations. In this way, there is no mutual exclusion when reading, which improves the reading efficiency.
[0077] In this embodiment, the cold start method may also include: obtaining a write request, which carries a second target configuration identifier; determining the second target configuration data based on the second target configuration identifier; obtaining a read lock for the second target configuration data, and reading the target storage page, which is the storage page where the second target configuration data is located; copying the target storage page to obtain a copied storage page, and storing the copied storage page in a second cache area; updating the copied storage page according to the write request, and using the updated copied storage page to overwrite the target storage page in the disk file; obtaining a write lock for the second target configuration data, and using the updated copied storage page to overwrite the target storage page in the first cache area.
[0078] It should be understood that this case adopts the "copy on write" strategy for write operations, that is, if multiple callers request the same resource (such as memory or configuration data on disk) at the same time, they will jointly obtain the same pointer to the same resource, until a caller tries to modify the content of the resource, the system will actually copy a private copy to the caller, and the original resource seen by other callers remains unchanged. And only when the caller performs a write operation will a copy be created, occupying the second cache area, realizing read-write separation.
[0079] Specifically, see Figure 4 When the caller Reader wants to read data, it first takes the read lock and then reads data from page2 in the memory. When the caller Writer wants to write data, it first takes the read lock, then copies page2 to get page2 copy, and then writes to page2 copy, that is, updates it. When the updated data is written to the disk, it takes the write lock and copies the updated data to page2.
[0080] In this embodiment, after the step of "using the updated duplicate storage page to overwrite the target storage page in the first cache area", the method further includes: deleting the updated duplicate storage page from the second cache area to save memory space.
[0081] In addition, in order to adapt to a wider range of scenarios, the cache will support dynamic memory adjustment. The memory mainly includes the first cache area and the second cache area, so the memory space can be allocated to the two in a certain proportion. Considering that the read and write operations of the configuration data are more read operations and less write operations, the proportion of the first cache area can be higher than that of the second cache area to improve the rationality of memory space allocation.
[0082] Specifically, for the first cache area, adjusting the length limit of the linked list can limit its memory consumption, while for the second cache area, it is necessary to pay attention to the request amount of write requests. Therefore, the cold start method can also include: when the remaining storage space of the second cache area is less than a preset value, limiting the flow of the write request at the request entrance of the preset client. Specifically, when the memory is insufficient, limiting the flow of write requests at the request entrance can adjust its memory consumption to adapt to a wider range of scenarios.
[0083] The cold start method of the client provided in the embodiment of the present application obtains configuration data from the server when the preset client is run on the terminal device for the first time, and stores the configuration data in multiple storage pages of the disk file of the terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, and the service identifier and the service configuration data have a one-to-one correspondence. The content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data. When the preset client is cold started, the configuration data is read from the disk file and services are provided, thereby reducing the limitations of the client cold start, shortening the cold start time, and improving the cold start speed.
[0084] See also Figure 5 , Figure 5 A schematic flow chart of another cold start method of a client provided in an embodiment of the present application, the method may mainly include steps 201 to 211, as described below:
[0085] Step 201. When the preset client is run on the terminal device for the first time, configuration data is obtained from the server. The specific embodiment of step 201 can refer to the embodiment of step 101, which will not be repeated here.
[0086] Step 202. Store the configuration data in multiple storage pages of the disk file of the terminal device based on the B+ tree structure, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data.
[0087] Specifically, by persistently storing configuration data in disk files, the client can directly obtain configuration data locally for cold start without relying on the network, thereby reducing the limitations of client cold start and speeding up the client cold start.
[0088] It is easy to understand that hardware and operating systems often divide disk storage areas into continuous storage blocks of equal size, each storage block is called a storage page, each storage page is fixed in size and physically adjacent, each storage page has a unique page number, and the page numbers are continuously increased according to their physical relationship. For example, in this embodiment, the size of each storage page is fixed to 16KB (kilobytes), and its page numbers are 0 to N from the front to the back, for example, page3 represents the fourth storage page from the beginning of the disk file, that is, the fourth 16KB of content from the beginning.
[0089] For example, Figure 2 As shown, the configuration data of the application is stored in seven storage pages of the disk file, namely Page0 to Page6. The logical structure of the seven storage pages is as follows Figure 2 The B+ tree shown. Specifically, the B+ tree is a three-order tree, including a root node, an intermediate node and a leaf node, wherein the root node and the intermediate node do not store configuration data, but only store service identifiers, and the leaf nodes store all configuration data. When a user reads the configuration data of a service from a disk file, the user starts searching from the root node according to the service identifier of the service, finds the corresponding leaf node and reads the data. It is easy to understand that the configuration data includes multiple service identifiers and service configuration data corresponding to the multiple service identifiers, wherein when the configuration data is stored in the storage page of the disk file, it is sorted in descending order according to the service identifier.
[0090] Specifically, the above step of "storing the business identifier of the configuration data in the storage page corresponding to the non-leaf node" may include: storing at least two business identifiers and the indexes of the storage pages corresponding to the two business identifiers in the storage page corresponding to the non-leaf node, wherein each storage page corresponding to the non-leaf node includes at least two of the business identifiers and the indexes of the storage pages corresponding to the two business identifiers, the number of business identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf node, and at least two business identifiers are the maximum / minimum business identifiers in each subtree, respectively.
[0091] For example, please continue to see Figure 2 , the configuration data of the application includes seven business identifiers and the business configuration data corresponding to each business identifier, where the seven business identifiers are Page0 to Page6 in ascending order. The root node Page0 includes two subtrees, where the smallest business identifier in the left subtree is Key1 and the smallest business identifier in the right subtree is Key5. Therefore, it includes two business identifiers Key1 and Key5. It is easy to understand that an index can be understood as a pointer, such as Figure 2 As shown, Key1 in Page0 points to Page1, and the same is true for Page1 and Page2. For example, when you need to obtain the business configuration data corresponding to Key2, start from the root node for the first time. The root node includes two business identifiers, namely Key1 and Key5. Key2 is greater than Key1 and less than Key5. Therefore, go to the next level storage page corresponding to Key1 to find it, that is, Page1. Page1 includes two business identifiers, namely Key1 and Key3. Key2 is greater than Key1 and less than Key3. Therefore, go to the next level storage page corresponding to Key1 to find it, that is, Page3 to find the business configuration data corresponding to Key2. It can be seen that by using B+ tree to manage configuration data, from the root node to the leaf node, the search efficiency of each business configuration data is the same, and non-leaf nodes only store business identifiers, and do not need to store specific business configuration data, which greatly saves storage space and achieves the function of guiding more business configuration data within a limited storage space.
[0092] Specifically, the storage page corresponding to the leaf node is the node that actually stores the business configuration data, including the header, data, and tail. Figure 3The header contains: the page number (Page NO) of the current storage page, the page number (Prev Page NO) of the previous storage page, the page number (Next Page NO) of the next storage page, the type of storage page (Page Type, root node, intermediate node or leaf node), and the checksum (Page Checksum), which records the Checksum when the page data is written and is used to check the page when reading data; the data part consists of adjacent configuration data (Data), each configuration data contains a data header (Data Header) and data KV (Key-Value, key-value pair), and the data header mainly records the offset position of the next configuration data in the storage page.
[0093] Step 203: When the preset client is cold started, a read instruction is obtained, where the read instruction carries the first target service identifier.
[0094] Step 204: Determine first target configuration data according to the first target service identifier.
[0095] Step 205: Acquire a read lock for the first target configuration data, read the first configuration data from the disk file to provide services, and cache all storage pages loaded when reading the first target configuration data in the LRU linked list corresponding to the first cache area.
[0096] In this embodiment, when the client cold starts, there is no need to establish a network connection with the server and then obtain configuration data from the server. The configuration data can be directly read from the local disk file and the corresponding service can be provided, thereby shortening the client cold start time and reducing the limitations of the client cold start, thus realizing offline cold start.
[0097] Taking into account that among the read and write operations of configuration data, there are more read operations and fewer write operations, in order to satisfy the configuration data that allows multiple callers to read but only allows one user to write, before the step of "obtaining a read request", it also includes: setting a read-write lock, the read-write lock includes a read lock and a write lock, wherein the read locks for the same storage page are compatible, the read lock and write lock for the same storage page are mutually exclusive, and the write locks for the same storage page are mutually exclusive.
[0098] It is easy to understand that in computer architecture, the largest and most reliable storage space is the disk, which has a large capacity and the content can be solidified, but the access speed is very slow. In order to achieve higher performance in reading configuration data, the loaded storage pages can be stored in the cache, and then the storage pages can be accessed later, and they can be read directly from the cache to achieve high-performance reading. For example, to read the first target configuration data, at least two storage pages are loaded, a storage page corresponding to a root node and a storage page corresponding to a leaf node. No matter which business configuration data is read, it is necessary to start accessing from the storage page corresponding to the root node, and store the storage page corresponding to the root node in the first cache area. The next time the configuration data is read, there is no need to access the storage page corresponding to the root node from the disk file.
[0099] Specifically, a linked list is a non-continuous and non-sequential storage structure in a physical storage structure, and the logical order of data elements is realized by the pointer link order in the linked list. When data needs to be read or inserted, it is necessary to traverse from the table header, so step 205 can specifically include: inserting all storage pages accessed when reading the first target configuration data into the LRU linked list from the table header of the linked list in sequence to improve storage efficiency.
[0100] In some embodiments, the cold start method further includes: when the length of the LRU linked list reaches a maximum threshold, if a storage page is inserted into the linked list, the storage page at the end of the linked list is discarded.
[0101] The core idea of the LRU linked list is that "if the data has been accessed recently, then the probability of being accessed in the future is also higher", so it can be eliminated based on the historical access records of the storage page.
[0102] In this embodiment, the cold start method further includes: when a storage page stored in the LRU linked list is read, moving the read storage page to the head of the linked list.
[0103] From the above, it can be seen that if a storage page has been accessed recently, then the probability of being accessed in the future is also higher. Therefore, the accessed storage page can be moved to the head of the linked list to save the time of traversing backward from the head of the linked list.
[0104] Step 206: Obtain a write instruction, the write instruction carrying the second target service identifier, and determine the second target configuration data according to the second target service identifier.
[0105] Step 207: Acquire a read lock for the second target configuration data, and read a target storage page, where the target storage page is the storage page where the second target configuration data is located.
[0106] Step 208: Copy the target storage page to obtain a copied storage page, and store the copied storage page in the second cache area.
[0107] Step 209: Update the duplicate storage page according to the write request, and use the updated duplicate storage page to overwrite the target storage page in the disk file.
[0108] It should be understood that this case adopts the "copy on write" strategy for write operations, that is, if multiple callers request the same resource (such as memory or configuration data on disk) at the same time, they will jointly obtain the same pointer to the same resource, until a caller tries to modify the content of the resource, the system will actually copy a private copy to the caller, and the original resource seen by other callers remains unchanged. And only when the caller performs a write operation will a copy be created, occupying the second cache area, realizing read-write separation.
[0109] Step 210: Obtain a write lock for the second target configuration data, and use the updated copy storage page to overwrite the target storage page of the first cache area.
[0110] Step 211: Delete the updated duplicate storage page from the second cache area.
[0111] In addition, in order to adapt to a wider range of scenarios, the cache will support dynamic memory adjustment. The memory mainly includes the first cache area and the second cache area, so the memory space can be allocated to the two in a certain proportion. Considering that the read and write operations of the configuration data are more read operations and less write operations, the proportion of the first cache area can be higher than that of the second cache area to improve the rationality of memory space allocation.
[0112] Specifically, for the first cache area, adjusting the length limit of the linked list can limit its memory consumption, while for the second cache area, it is necessary to pay attention to the request amount of write requests. Therefore, the cold start method can also include: when the remaining storage space of the second cache area is less than a preset value, limiting the flow of the write request at the request entrance of the preset client. Specifically, when the memory is insufficient, limiting the flow of write requests at the request entrance can adjust its memory consumption to adapt to a wider range of scenarios.
[0113] The cold start method of the client provided in the embodiment of the present application obtains configuration data from the server when the preset client is run on the terminal device for the first time, and stores the configuration data in multiple storage pages of the disk file of the terminal device based on the B+ tree structure, wherein the configuration data includes a service identifier and service configuration data, and the service identifier and the service configuration data have a one-to-one correspondence. The content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data, thereby persisting the configuration data in the disk. When the preset client is cold started, a read instruction is obtained, which carries a first target service identifier, and the first target configuration data is determined according to the first target service identifier. Then, a read lock for the first target configuration data is obtained, and the first configuration data is read from the disk file to provide services, and all storage pages loaded when reading the first target configuration data are cached in the LRU linked list, thereby eliminating the need for the client to The end establishes a network connection with the server and obtains configuration data from the server, so as to realize its functions and provide services. If it is necessary to read and write the storage pages in the LRU linked list later, there is no need to read from the disk, so as to realize high-performance reading. Then, a write instruction is obtained, which carries the second target business identifier, and the second target configuration data is determined according to the second target business identifier. Then, a read lock for the second target configuration data is obtained, and the target storage page is read. The target storage page is the storage page where the second target configuration data is located. Then, the target storage page is copied to obtain a copied storage page, and the copied storage page is stored in the second cache area. Then, the copied storage page is updated according to the write request, and the updated copied storage page is used to overwrite the target storage page in the disk file. Then, a write lock for the second target configuration data is obtained, and the updated copied storage page is used to overwrite the target storage page in the first cache area. Then, the updated copied storage page is deleted from the second cache area. In this way, the read and write separation of the storage page is realized by adopting a double cache method.
[0114] The above describes the method embodiment of the present application in detail. Figure 6 to Figure 7 , the device embodiments of the present application are described in detail. It should be understood that the device embodiments and the method embodiments correspond to each other, and similar descriptions can refer to the method embodiments.
[0115] Figure 6 is a schematic structural diagram of a cold start device 10 of a client according to an embodiment of the present application, such as Figure 6 As shown, the cold start device 10 of the client may include:
[0116] An acquisition module 11 is used to acquire configuration data from a server when a preset client is run on a terminal device for the first time;
[0117] A storage module 12 is used to store the configuration data in a plurality of storage pages of a disk file of a terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to a non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to a leaf node in the preset tree structure includes the service configuration data;
[0118] The cold start module 13 is used to read configuration data from the disk file and provide services when the preset client is cold started.
[0119] Specifically, the storage module 12 can be used for:
[0120] At least two business identifiers and the indexes of the storage pages corresponding to the two business identifiers are stored in the storage page corresponding to the non-leaf node, wherein the storage page corresponding to each non-leaf node includes at least two business identifiers and the indexes of the storage pages corresponding to the two business identifiers, the number of business identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf nodes, and at least two business identifiers are the maximum / minimum business identifiers in each subtree, respectively.
[0121] Specifically, the cold start module 13 can be mainly used to: obtain a read request, the read request carries a first target business identifier; determine the first target configuration data according to the first target business identifier; read the first target configuration data from the disk file, and cache all storage pages accessed when reading the first target configuration data in the first cache area.
[0122] Furthermore, the first cache area may be managed using a linked list, and the cold start module 13 may be specifically configured to insert all storage pages accessed when reading the first target configuration data into the linked list in sequence from the head of the linked list.
[0123] In this embodiment, the cold start device 10 may further include a monitoring module, which is used to discard the storage page at the end of the linked list if a storage page is inserted into the linked list when the length of the linked list reaches a maximum threshold.
[0124] In this embodiment, the cold start device 10 further includes a moving module, which is used to move the read storage page to the head of the linked list when the storage page stored in the linked list is read.
[0125] In some embodiments, the cold start device 10 further includes a setting module for setting a read-write lock, the read-write lock includes a read lock and a write lock, wherein the read locks for the same storage page are compatible, the read lock and the write lock for the same storage page are mutually exclusive, and the write locks for the same storage page are mutually exclusive. Further, after the cold start module 13 obtains the read request, it is also used to obtain a read lock for the first target configuration data.
[0126] In some embodiments, the cold start device 10 also includes a write module, which is used to: obtain a write request, the write request carries a second target configuration identifier; determine the second target configuration data based on the second target configuration identifier; obtain a read lock for the second target configuration data, and read the target storage page, the target storage page is the storage page where the second target configuration data is located; copy the target storage page to obtain a copied storage page, and store the copied storage page in a second cache area; update the copied storage page according to the write request, and use the updated copied storage page to overwrite the target storage page in the disk file; obtain a write lock for the second target configuration data, and use the updated copied storage page to overwrite the target storage page in the first cache area.
[0127] In this embodiment, the cold start device 10 further includes a current limiting module, which is used to limit the current of write requests at a preset client request entry when the remaining storage space in the second cache area is less than a preset value.
[0128] In this embodiment, after the updated duplicate storage page is used to overwrite the target storage page in the first cache area, the write module may also be used to: delete the updated duplicate storage page from the second cache area.
[0129] It should be noted that the functions of each module in the cold start device 10 of the client in the embodiment of the present application can correspond to the specific implementation methods in the above-mentioned method embodiments, which will not be repeated here.
[0130] Each module in the cold start device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0131] The cold start device 10 of the client provided in the embodiment of the present application, when the preset client is run on the terminal device for the first time, obtains configuration data from the server through the acquisition module 11, and then the storage module 12 stores the configuration data in multiple storage pages of the disk file of the terminal device based on the preset tree structure, wherein the configuration data includes a service identifier and service configuration data, and the service identifier and the service configuration data have a one-to-one correspondence. The content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data. When the preset client is cold started, the cold start module 13 reads the configuration data from the disk file and provides services. The client does not need to establish a network connection with the server and obtain the configuration data from the server to realize its functions and provide services, thereby reducing the limitations of the client cold start, shortening the cold start time, and improving the cold start speed.
[0132] Figure 7 Another schematic structural diagram of the cold start device of the client provided in the embodiment of the present application, such as Figure 7 As shown, the cold start device 20 of the client may include: a communication interface 21, a memory 22, a processor 23 and a communication bus 24. The communication interface 21, the memory 22, and the processor 23 communicate with each other through the communication bus 24. The communication interface 21 is used for the cold start device 20 of the client to communicate data with an external device. The memory 22 can be used to store software programs and modules, and the processor 23 runs the software programs and modules stored in the memory 22, such as the software programs of the corresponding operations in the aforementioned method embodiment.
[0133] In some embodiments, the processor 23 may call software programs and modules stored in the memory 22 to perform the following operations:
[0134] When the preset client is run on the terminal device for the first time, it obtains configuration data from the server;
[0135] Based on a preset tree structure, the configuration data is stored in a plurality of storage pages of a disk file of the terminal device, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to a non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to a leaf node in the preset tree structure includes the service configuration data;
[0136] When the preset client is cold started, the configuration data is read from the disk file and the service is provided.
[0137] In some embodiments, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0138] The embodiment of the present application also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to a computer device, and the computer program enables the computer device to execute the corresponding process in the cold start method of the client in the embodiment of the present application, which will not be described here for the sake of brevity.
[0139] The embodiment of the present application also provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the corresponding process in the cold start method of the client in the embodiment of the present application, which will not be repeated here for the sake of brevity.
[0140] The embodiment of the present application also provides a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the corresponding process in the cold start method of the client in the embodiment of the present application, which will not be repeated here for the sake of brevity.
[0141] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0142] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0143] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0144] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer or a server) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A cold start method for a client, It is characterized in that include: When the preset client is run on the terminal device for the first time, it obtains configuration data from the server; Based on a preset tree structure, the configuration data is stored in multiple storage pages of the disk file of the terminal device, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data; wherein, storing the service identifier of the configuration data in the storage page corresponding to the non-leaf node includes: storing at least two of the service identifiers and the indexes of the storage pages corresponding to the two service identifiers in the storage page corresponding to the non-leaf node, wherein each storage page corresponding to the non-leaf node includes at least two of the service identifiers and the indexes of the storage pages corresponding to the two service identifiers, the number of service identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf node, and the at least two service identifiers are respectively the largest / smallest service identifiers in each subtree; When the preset client is cold started, the configuration data is read from the disk file and services are provided.
2. The cold start method according to claim 1, It is characterized in that The step of reading the configuration data from the disk file and providing services includes: Obtaining a read request, where the read request carries a first target service identifier; Determine first target configuration data according to the first target service identifier; The first target configuration data is read from the disk file, and all storage pages accessed when reading the first target configuration data are cached in a first cache area.
3. The cold start method according to claim 2, It is characterized in that The first cache area is managed using a linked list, and all storage pages accessed when reading the first target configuration data are stored in the first cache area, including: All storage pages accessed when reading the first target configuration data are sequentially inserted into the linked list from the header of the linked list.
4. The cold start method according to claim 3, It is characterized in that The cold start method further comprises: When the length of the linked list reaches a maximum threshold, if the storage page is inserted into the linked list, the storage page at the end of the linked list is discarded.
5. The cold start method according to claim 4, It is characterized in that The cold start method further comprises: When a storage page stored in the linked list is read, the read storage page is moved to the head of the linked list.
6. The cold start method according to claim 2, It is characterized in that Before obtaining the read request, the method further includes: Setting a read-write lock, wherein the read-write lock includes a read lock and a write lock, wherein the read locks for the same storage page are compatible, the read lock and the write lock for the same storage page are mutually exclusive, and the write locks for the same storage page are mutually exclusive; After obtaining the read request, the method further includes: obtaining a read lock for the first target configuration data.
7. The cold start method according to claim 6, It is characterized in that The cold start method further comprises: Obtaining a write request, where the write request carries a second target configuration identifier; Determine second target configuration data according to the second target configuration identifier; Acquire a read lock for the second target configuration data, and read a target storage page, where the target storage page is a storage page where the second target configuration data is located; Copying the target storage page to obtain a copied storage page, and storing the copied storage page in a second buffer area; updating the duplicate storage page according to the write request, and using the updated duplicate storage page to overwrite the target storage page in the disk file; A write lock for the second target configuration data is acquired, and the target storage page of the first cache area is overwritten with the updated copy storage page.
8. The cold start method according to claim 7, It is characterized in that The cold start method further comprises: When the remaining storage space of the second cache area is less than a preset value, the write request is limited at the request entry of the preset client.
9. The cold start method according to claim 7, It is characterized in that After the updated copy storage page is used to overwrite the target storage page of the first cache area, the method further includes: The updated duplicate storage page is deleted from the second cache area.
10. A cold start device for a client, It is characterized in that include: An acquisition module, used to acquire configuration data from a server when a preset client is run on a terminal device for the first time; A storage module, used for storing the configuration data in multiple storage pages of the disk file of the terminal device based on a preset tree structure, wherein the configuration data includes a service identifier and service configuration data, the service identifier and the service configuration data have a one-to-one correspondence, the content of the storage page corresponding to the non-leaf node in the preset tree structure includes the service identifier, and the content of the storage page corresponding to the leaf node in the preset tree structure includes the service configuration data; wherein storing the service identifier of the configuration data in the storage page corresponding to the non-leaf node comprises: storing at least two of the service identifiers and the indexes of the storage pages corresponding to the two service identifiers in the storage page corresponding to the non-leaf node, wherein each storage page corresponding to the non-leaf node comprises at least two of the service identifiers and the indexes of the storage pages corresponding to the two service identifiers, the number of service identifiers in the storage page corresponding to each non-leaf node is consistent with the number of subtrees corresponding to the non-leaf node, and the at least two service identifiers are respectively the largest / smallest service identifiers in each subtree; The cold start module is used to read the configuration data from the disk file and provide services when the preset client is cold started.
11. A computer-readable storage medium comprising instructions, It is characterized in that When the instructions are executed on a computer device, the computer device is caused to perform the method according to any one of claims 1 to 9.
12. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the steps in the cold start method according to any one of claims 1 to 9 by calling the computer program stored in the memory.
13. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the cold start method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Application configuration method and device, terminal equipment and readable storage medium
CN107908432A
Methods and systems for managing configuration information
CN111045745A