A top-column data initialization method, device, equipment and storage medium

By caching the top banner configuration file in the content delivery network, the direct queries from the front end to the server are reduced, solving the problems of high server load and downtime, and improving the user experience.

CN116127235BActive Publication Date: 2026-04-07政采云股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-15
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the top banner information needs to be frequently queried from the server database when the front-end page is loaded, resulting in excessively high interface access frequency, high server pressure, easy downtime, and negative impact on user experience.

Method used

By caching the static top banner configuration file in a preset content delivery network, the front end retrieves the target file from the cache for rendering during initialization, reducing direct requests to the server.

Benefits of technology

This effectively reduced the request pressure on the server, prevented server downtime, and improved the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116127235B_ABST
    Figure CN116127235B_ABST
Patent Text Reader

Abstract

The application discloses a top column data initialization method and device, equipment and storage medium, is applied to preset content distribution network, is related to the technical field of Internet, including: based on the preset object storage service of local receives the static file generated based on the preset top column configuration information uploaded by the service end, and the static file is updated to the cache of itself, the top pass information request sent when the front end carries out page initialization is obtained, and the corresponding target file is determined from the static file based on the top pass information request; the target file is sent to the front end, so that the front end executes the top column rendering operation based on the received target file, to complete the top column data initialization. The application updates the static file generated based on the preset top column configuration information to the cache of itself through the preset content distribution network, and determines the target file from the static file when receiving the corresponding request, which can effectively reduce the request received by the service end, and in turn reduce the pressure of the service end.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, in particular to a top bar data initialization method and device, equipment and storage medium. BACKGROUND

[0002] After building an electronic mall platform based on website business and creating a corresponding top bar, it is necessary to set the conditions for finding this top bar. In this way, when the mall is displayed through the front-end page, the top bar can be found according to the currently set search conditions and the corresponding data initialization can be completed, and then the business query of the mall can be performed through the loaded top bar. In the prior art, the top bar information needs to be found from the database in the current server after the front-end page is loaded by calling the corresponding interface and according to the domain name + division + user information of the current page. Since each front-end page needs to obtain the top bar information, the interface access frequency is too high. When the concurrency is high, it will also put a lot of pressure on the current server. In this way, if the server has a problem, the user cannot obtain the corresponding business data, resulting in business interruption. SUMMARY

[0003] Therefore, the purpose of the present application is to provide a top bar data initialization method, device, equipment and storage medium, which can effectively reduce the requests received by the server, thereby reducing the pressure on the server, and solving the problem that the top bar information cannot be obtained when the server in the prior art is down, and improving the user experience. The specific scheme is as follows:

[0004] In a first aspect, the present application provides a top bar data initialization method applied to a preset content distribution network, comprising:

[0005] Receiving a static file generated based on preset top bar configuration information uploaded by a service end based on a local preset object storage service, and updating the static file to a cache of itself; the preset top bar configuration information includes component configuration information and color matching information of a webpage top bar;

[0006] Obtaining a top bar information request sent by a front end when initializing a page, and determining a target file from the static file based on the top bar information request;

[0007] Sending the target file to the front end, so that the front end performs a rendering operation of the top bar based on the received target file to complete the initialization of the top bar data.

[0008] Optionally, after the target file is sent to the front end, it further comprises:

[0009] If not, the front end judges whether the target file is successfully received, and if not, loads a corresponding historical static file.

[0010] Optionally, the preset object storage service based on the local receives a static file generated based on preset top bar configuration information uploaded by the server, and updates the static file to a cache of the preset object storage service.

[0011] The server returns a corresponding file upload list to the server, so that the server determines the upload result of the static file and performs a corresponding record operation.

[0012] Optionally, after the server returns a corresponding file upload list to the server, so that the server determines the upload result of the static file and performs a corresponding record operation, the method further comprises:

[0013] The server modifies the task state of a corresponding upload task to a completed state based on the file upload list.

[0014] Optionally, the method further comprises:

[0015] The front end determines a target file from the static file based on a preset algorithm based on the file name of the target file in the top bar information request.

[0016] Optionally, the top bar data initialization method further comprises:

[0017] The server determines a set of file names of the static file to be uploaded based on domain name information and division information in the preset search condition information and using the preset algorithm, to obtain a corresponding asynchronous upload task.

[0018] Optionally, the preset object storage service based on the local receives a static file generated based on preset top bar configuration information uploaded by the server, and updates the static file to a cache of the preset object storage service.

[0019] The preset object storage service based on the local receives a static file generated based on preset top bar configuration information uploaded by the server through execution of an asynchronous upload task generated using the preset search condition information.

[0020] In a second aspect, the application provides a top bar data initialization device applied to a preset content distribution network, comprising:

[0021] The file receiving module is configured to receive a static file generated based on preset top banner configuration information uploaded by a server based on a preset object storage service locally, and update the static file to a cache of the file receiving module; the preset top banner configuration information comprises component configuration information and color matching information of a top banner of a webpage.

[0022] The file determining module is configured to acquire a top banner information request sent by a front end when initializing a page, and determine a target file from the static file based on the top banner information request.

[0023] The data initializing module is configured to send the target file to the front end, so that the front end performs a rendering operation of a top banner based on the received target file to complete initialization of top banner data.

[0024] In a third aspect, the present application provides an electronic device, comprising:

[0025] A memory configured to save a computer program;

[0026] A processor configured to execute the computer program to implement the steps of the top banner data initialization method.

[0027] In a fourth aspect, the present application provides a computer readable storage medium configured to save a computer program, wherein the computer program is executed by a processor to implement the steps of the top banner data initialization method.

[0028] As can be seen, in the present application, a static file generated based on preset top banner configuration information uploaded by a server is received based on a preset object storage service locally, and the static file is updated to a cache of the file receiving module; the preset top banner configuration information comprises component configuration information and color matching information of a top banner of a webpage; a top banner information request sent by a front end when initializing a page is acquired, and a target file is determined from the static file based on the top banner information request; the target file is sent to the front end, so that the front end performs a rendering operation of a top banner based on the received target file to complete initialization of top banner data. In the present application, a static file generated based on preset top banner configuration information is updated to a cache of a preset content distribution network, and a target file is determined from the static file when a corresponding request is received. In this way, the number of requests received by a server can be effectively reduced, thereby reducing the pressure on the server, and the problem that top banner information cannot be acquired when a server is down in the prior art is solved, and user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0030] Figure 1 A top column data initialization method flow chart is provided for the present application;

[0031] Figure 2 A top column data uploading flow chart is provided for the present application;

[0032] Figure 3 A top column data query flow chart is provided for the present application;

[0033] Figure 4 A top column data initialization device structure schematic diagram is provided for the present application;

[0034] Figure 5 An electronic equipment structure diagram is provided for the present application. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only represent some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0036] In the prior art, the top column information needs to be found from the database in the current server after the front-end page is loaded by calling the corresponding interface and according to the domain name + division + user information of the current page. Since each front-end page needs to obtain the top column information, the interface access frequency is too high. When the concurrency is high, it also puts a large pressure on the current server. In this way, if the server has a problem, the user cannot obtain the corresponding business data, resulting in business interruption. Therefore, the present application provides a top column data initialization scheme, which can effectively reduce the requests received by the server, thereby reducing the pressure on the server and solving the problem that the top column information cannot be obtained when the server in the prior art is down, and improving the user experience.

[0037] Referring to Figure 1 The embodiments of the present application disclose a top column data initialization method applied to a preset content distribution network, which comprises the following steps:

[0038] In step S11, the local preset object storage service receives the static file generated based on the preset top bar configuration information uploaded by the server, and updates the static file to the cache of the local preset object storage service. The preset top bar configuration information includes component configuration information and color matching information of the top bar of a webpage.

[0039] In this embodiment, before the static file is uploaded by the asynchronous upload task, the server determines a set of file names of the static file to be uploaded based on domain name information and division information in preset search condition information and by using a preset algorithm, to obtain a corresponding asynchronous upload task. The preset algorithm includes MD5 (Message Digest Algorithm). In this way, information leakage caused by malicious crawling of files with regular names can be prevented. It can be understood that the local preset object storage service receives the static file generated based on the preset top bar configuration information uploaded by the server, including that the local preset object storage service receives the static file generated based on the preset top bar configuration information uploaded by the server by executing the asynchronous upload task generated based on the preset search condition information. The domain name, also known as a network domain, is a name of a computer or a computer group on the Internet composed of a string of names separated by dots, and is used for positioning and identification of the computer (sometimes also refers to the geographical location) during data transmission. The division, also known as administrative division, is a region divided by a country for administrative management.

[0040] Specifically, in this embodiment, as shown in 2, after the local preset object storage service receives the static file generated based on the preset top bar configuration information uploaded by the server and updates the static file to the cache of the local preset object storage service, the method further includes returning a corresponding file upload list to the server, so that the server determines the upload result of the static file and performs a corresponding record operation. Further, after the file upload list is returned to the server, so that the server determines the upload result of the static file and performs a corresponding record operation, the method further includes modifying the task state of the corresponding upload task to a completed state by the server based on the file upload list.

[0041] In this embodiment, referring to Figure 2As shown, the front-end submits the preset search criteria information and the preset top banner configuration information to the TopLink domain service, i.e., the server. The server then updates the preset search criteria information in the TopLink search cache (i.e., the Redis cache) on the current server. Next, a possibility list is generated based on the preset search criteria information to obtain the corresponding static files. The static files are then uploaded to OSS (Object Storage Service). OSS updates the static files in the cache of the preset content delivery network and returns the upload list to the server. Upon receiving the upload list, the server records the corresponding upload results in its database. In this way, if the current server experiences a downtime, the preset content delivery network can still receive front-end requests normally, improving the user experience.

[0042] Step S12: Obtain the top-to-top information request sent by the front end when initializing the page, and determine the corresponding target file from the static files based on the top-to-top information request.

[0043] Specifically, in this embodiment, based on the filename of the target file determined by the front-end using the preset algorithm in the top banner information request, the target file, i.e., the target top banner information, is obtained from the static files. It can be understood that when the page is initialized, the front-end generates a corresponding filename based on the current domain name information, region information, and a preset algorithm in the cookie (data stored on the user's local terminal), and then generates a corresponding top banner information request based on the filename to request the corresponding top banner resource. In this way, the corresponding target top banner information can be allocated according to the user's location. See also... Figure 3 As shown, existing technologies employ three methods for searching, with each method having a priority. Therefore, the search method in this embodiment is more direct and faster. It replaces database queries in existing technologies by proactively refreshing a pre-defined content distribution network, achieving flattened management and retrieval of webpage data in the electronic marketplace (referring to the execution operation platform built by the Central Government Procurement Center for procurement entities to complete procurement matters in the form of electronic data messages). This enables rapid data loading and reduces database pressure.

[0044] Step S13: Send the target file to the front end so that the front end can perform the rendering operation of the top banner based on the received target file to complete the initialization of the top banner data.

[0045] In this embodiment, combined with Figure 3After sending the target file to the front end, the method further includes: determining whether the target file has been successfully received by the front end; otherwise, loading the corresponding historical static file.

[0046] In addition to the steps described above, this embodiment can also establish a corresponding cache through a remote dictionary service and configure updates using a dual-write strategy. That is, the corresponding top banner information is simultaneously written to both the database corresponding to the local server and the aforementioned cache, and a data expiration time is configured for the cache. When the target top banner information cannot be obtained from the cache, it is read from the database and written to the cache. In this way, the client can directly obtain the information from the cache based on the request parameters by sending a request, thus improving system performance. Alternatively, the generated static file can be sent to a preset static server, and the front-end can directly access the static resources through the preset static server to obtain the corresponding target top banner information. Alternatively, the marketplace query strategy can be directly compiled into corresponding JavaScript code to initialize the page, depending on the page type.

[0047] Therefore, in this embodiment, a local preset object storage service receives static files uploaded by the server based on preset top banner configuration information and updates the static files to its own cache. The preset top banner configuration information includes component configuration information and color scheme information for the webpage's top banner. The system obtains a top banner information request sent by the front-end during page initialization and determines the corresponding target file from the static files based on the top banner information request. The target file is then sent to the front-end so that the front-end can perform a top banner rendering operation based on the received target file to complete the initialization of the top banner data. In this embodiment, a preset content delivery network updates the static files generated based on the preset top banner configuration information to its own cache, and the target file is determined from the static files upon receiving a corresponding request. This effectively reduces the number of requests received by the server, thereby reducing server load and solving the problem of not being able to obtain top banner information when the server crashes in the prior art, thus improving the user experience.

[0048] See Figure 4 As shown in the illustration, this application also discloses a top banner data initialization device, applied to a preset content distribution network, comprising:

[0049] The file receiving module 11 is used to receive static files uploaded by the server based on preset top banner configuration information based on the local preset object storage service, and update the static files to its own cache; the preset top banner configuration information includes component configuration information and color scheme information of the top banner of the webpage;

[0050] The file determination module 12 is used to obtain the top-to-top information request sent by the front end when the page is initialized, and determine the corresponding target file from the static file based on the top-to-top information request;

[0051] The data initialization module 13 is used to send the target file to the front end so that the front end can perform the rendering operation of the top banner based on the received target file to complete the initialization of the top banner data.

[0052] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0053] Therefore, in this application, a local preset object storage service receives static files uploaded by the server based on preset top banner configuration information and updates the static files to its own cache. The preset top banner configuration information includes component configuration information and color scheme information for the webpage's top banner. The application obtains a top banner information request sent by the front-end during page initialization and determines the corresponding target file from the static files based on the top banner information request. The target file is then sent to the front-end so that the front-end can perform a top banner rendering operation based on the received target file to complete the initialization of the top banner data. This application updates the static files generated based on the preset top banner configuration information to its own cache through a preset content delivery network and determines the target file from the static files when a corresponding request is received. This effectively reduces the number of requests received by the server, thereby reducing server load and solving the problem of not being able to obtain top banner information when the server crashes in the prior art, thus improving the user experience.

[0054] In some specific embodiments, the top banner data initialization device may further include:

[0055] The historical file loading unit is used to determine whether the target file has been successfully received by the front end; otherwise, it loads the corresponding historical static file.

[0056] In some specific embodiments, the top banner data initialization device may further include:

[0057] The upload result determination unit is used to return the corresponding file upload list to the server so that the server can determine the upload result of the static file and perform the corresponding recording operation.

[0058] In some specific embodiments, the top banner data initialization device may further include:

[0059] The task status modification unit is used to modify the task status of the corresponding upload task to the completed status through the server and based on the file upload list.

[0060] In some specific embodiments, the file determination module 12 may specifically include:

[0061] The target file determination unit is used to obtain the target file from the static file based on the filename of the target file determined by the front end through a preset algorithm in the top-level information request.

[0062] In some specific embodiments, the top banner data initialization device may further include:

[0063] The asynchronous upload task generation unit is used to determine the set of filenames of the static files to be uploaded by the server based on the domain name information and zone information in the preset search conditions and using the preset algorithm, so as to obtain the corresponding asynchronous upload task.

[0064] In some specific embodiments, the file receiving module 11 may further include:

[0065] An asynchronous upload task execution unit is used to receive static files generated based on preset top banner configuration information by the server through executing an asynchronous upload task generated using the preset search condition information, based on a local preset object storage service.

[0066] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0067] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the top banner data initialization method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0068] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0069] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0070] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the top banner data initialization method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0071] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned top banner data initialization method. The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0072] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0073] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0074] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0075] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0076] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for initializing top banner data, characterized in that, Applied to a pre-defined content delivery network, including: The local preset object storage service receives static files uploaded by the server based on preset top banner configuration information and updates the static files to its own cache; the preset top banner configuration information includes component configuration information and color scheme information for the top banner of the webpage; The system obtains the top-to-top information request sent by the front-end during page initialization, and determines the corresponding target file from the static files based on the top-to-top information request; wherein, during page initialization, the front-end generates the corresponding file name based on the current domain name information, zone information, and a preset algorithm in the cookie; The target file is sent to the front end so that the front end can perform the rendering operation of the top banner based on the received target file to complete the initialization of the top banner data; The step of determining the corresponding target file from the static files based on the top-level information request includes: Based on the filename of the target file determined by the front end through the preset algorithm in the top-through information request, the target file is obtained from the static file; The method further includes: The server determines the set of filenames of the static files to be uploaded based on the domain name information and zone information in the preset search conditions and the preset algorithm, so as to obtain the corresponding asynchronous upload task. The local preset object storage service receives static files uploaded by the server, generated based on preset top banner configuration information, including: Based on the local preset object storage service, the server receives static files generated based on preset top banner configuration information by executing an asynchronous upload task generated using the preset search condition information.

2. The top banner data initialization method according to claim 1, characterized in that, After sending the target file to the front end, the process further includes: The front-end determines whether the target file has been successfully received; otherwise, it loads the corresponding historical static files.

3. The top banner data initialization method according to claim 1, characterized in that, The local preset object storage service receives a static file uploaded by the server, generated based on preset top banner configuration information, and updates the static file to its own cache. It also includes: The server returns a corresponding file upload list so that it can determine the upload results of the static files and perform the corresponding recording operations.

4. The top banner data initialization method according to claim 3, characterized in that, After returning the corresponding file upload list to the server so that the server can determine the upload results of the static files and perform the corresponding recording operations, the method further includes: The server modifies the status of the corresponding upload task to "completed" based on the file upload list.

5. A top banner data initialization device, characterized in that, Applied to a pre-defined content delivery network, including: The file receiving module is used to receive static files uploaded by the server based on preset top banner configuration information based on preset object storage services, and update the static files to its own cache; the preset top banner configuration information includes component configuration information and color scheme information of the top banner of the webpage; The file determination module is used to obtain the top-pass information request sent by the front end when the page is initialized, and determine the corresponding target file from the static files based on the top-pass information request; wherein, when the page is initialized, the front end generates the corresponding file name according to the current domain name information, zone information and the preset algorithm in the cookie; The data initialization module is used to send the target file to the front end, so that the front end can perform the rendering operation of the top banner based on the received target file to complete the initialization of the top banner data; The file determination module includes: The target file determination unit is used to obtain the target file from the static file based on the filename of the target file determined by the front end through the preset algorithm in the top-through information request; The top banner data initialization device further includes: The asynchronous upload task generation unit is used to determine the set of filenames of the static files to be uploaded by the server based on the domain name information and zone information in the preset search condition information and by the preset algorithm, so as to obtain the corresponding asynchronous upload task. The file receiving module further includes: An asynchronous upload task execution unit is used to receive static files generated based on preset top banner configuration information by the server through executing an asynchronous upload task generated using the preset search condition information, based on a local preset object storage service.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the top banner data initialization method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the top banner data initialization method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Page loading method, device, terminal equipment and storage medium

    CN110990736A