Content delivery network configuration method, device, equipment, medium and program product
By receiving user target configuration instructions and using large language models to generate target codes, the existing CDN configuration methods are solved, and efficient and accurate CDN configuration is achieved.
Patent Information
- Application Number
- CN202411998898.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing content distribution network (CDN) configuration method requires relevant personnel to have programming skills and CDN business configuration knowledge, resulting in high configuration thresholds and high labor costs.
By receiving the user's target configuration instructions, find the target configuration documents and files in the preset vector database, build the target prompt words and enter a large language model to generate the target code, and then configure the target content distribution network.
The configuration of the content distribution network can be achieved without the knowledge of CDN business configuration, which reduces the configuration threshold and labor costs, and improves configuration efficiency and accuracy.
Smart Images

Figure CN119788511A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a content distribution network configuration method, device, equipment, medium and program product. Background Art
[0002] Content Delivery Network (CDN) is a technology that caches content through the Internet and distributes it to multiple nodes so that users can obtain content nearby. It can increase access speed and reduce the pressure on the source station. Therefore, it is widely used.
[0003] At present, CDN configuration mainly includes two methods: interface call and web form configuration. The interface call method requires configuration personnel to have programming skills and CDN business configuration knowledge; the web form configuration method requires the development of corresponding web pages and requires technical support personnel to understand CDN business configuration knowledge. Both of the above configuration methods require relevant personnel to be familiar with or understand CDN business configuration knowledge, which has the problems of high configuration threshold and high labor cost. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a content distribution network configuration method, apparatus, device, medium and program product.
[0005] A first aspect of an embodiment of the present disclosure provides a content distribution network configuration method, including:
[0006] Receiving a target configuration instruction from a user, where the target configuration instruction is an instruction for configuring a target content distribution network;
[0007] Searching for a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, wherein the target configuration file includes annotation information corresponding to each configuration item;
[0008] Building target prompt words based on target configuration instructions, target configuration documents and target configuration files;
[0009] Input the target prompt word into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word;
[0010] A target content distribution network corresponding to the target configuration instruction is configured based on the target code.
[0011] A second aspect of an embodiment of the present disclosure provides a content distribution network configuration device, including:
[0012] An instruction receiving module, used to receive a target configuration instruction from a user, where the target configuration instruction is an instruction for configuring a target content distribution network;
[0013] An information search module, used to search a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, wherein the target configuration file includes annotation information corresponding to each configuration item;
[0014] A prompt word construction module, used for constructing a target prompt word based on a target configuration instruction, a target configuration document and a target configuration file;
[0015] A code generation module, used for inputting the target prompt word into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word;
[0016] The configuration execution module is used to configure the target content distribution network corresponding to the target configuration instruction based on the target code.
[0017] A third aspect of the embodiments of the present disclosure provides an electronic device, including:
[0018] processor;
[0019] A memory for storing executable instructions;
[0020] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the content distribution network configuration method provided in the first aspect above.
[0021] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the content distribution network configuration method provided by the first aspect.
[0022] A fifth aspect of an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the content distribution network configuration method as described in the first aspect above is implemented.
[0023] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0024] The content distribution network configuration method, device, equipment, medium and program product provided by the embodiment of the present disclosure can receive the target configuration instruction of the user, the target configuration instruction is an instruction for configuring the target content distribution network, after receiving the target configuration instruction, the target configuration document and the target configuration file corresponding to the target configuration instruction are searched from the preset vector database, and the target configuration file includes the annotation information corresponding to each configuration item. Then, based on the target configuration instruction, the target configuration document and the target configuration file, a target prompt word is constructed, the target prompt word is input into the preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word, and then configures the target content distribution network corresponding to the target configuration instruction based on the target code, thereby, the target configuration file and the target configuration document corresponding to the target configuration instruction can be obtained by retrieval, the target prompt word is constructed according to the target configuration instruction, the target configuration file and the target configuration document, the preset large language model generates a target code corresponding to the target configuration instruction according to the target prompt word, and then configures the target content distribution network according to the target code, and the configuration of the content distribution network can be realized without the relevant personnel having certain content distribution network service configuration knowledge, thereby reducing the configuration threshold and labor cost of the content distribution network. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0027] Figure 1 is a flow chart of a content distribution network configuration method provided by an embodiment of the present disclosure;
[0028] Figure 2 It is a structural diagram of a system architecture provided by an embodiment of the present disclosure;
[0029] Figure 3 is a flow chart of another content distribution network configuration method provided by an embodiment of the present disclosure;
[0030] Figure 4 It is a structural diagram of a content distribution network configuration device provided by an embodiment of the present disclosure;
[0031] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0037] Generally, CDN configuration mainly includes two methods: interface call and web form configuration. The interface call method requires configuration personnel to have programming skills and CDN business configuration knowledge; the web form configuration method requires the development of corresponding web pages and requires technical support personnel to understand CDN business configuration knowledge. Both of the above configuration methods require relevant personnel to be familiar with or understand CDN business configuration knowledge, which has the problems of high configuration threshold and high labor cost. In response to this problem, the embodiments of the present disclosure provide a content distribution network configuration method, which is introduced in conjunction with specific embodiments below.
[0038] Figure 1 It is a flowchart of a content distribution network configuration method provided by an embodiment of the present disclosure. The method can be executed by a content distribution network configuration device. The content distribution network configuration device can be implemented in software and / or hardware. The content distribution network configuration device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc.
[0039] Figure 1 The content distribution network configuration method shown can be applied to Figure 2 The system architecture shown.
[0040] like Figure 2 As shown, the system architecture may include a base layer, a service layer and a browser.
[0041] The browser is used to interact with the user, including the user interface, annotation interface and document input interface. The user interface is used for the user to input content distribution network configuration instructions; the annotation interface is used for the user to annotate the content distribution network configuration documents and configuration files; the document input interface is used to input the content distribution network configuration documents and configuration files.
[0042] The service layer is used to execute specific services, including data processing services, Embedding model services, prompt word construction services, large language model services, key information extraction services, preview interface generation services, log and monitoring services. Among them, the data processing service can be used to clean data such as data in configuration documents; the Embedding model service can be used to provide services that map high-dimensional, sparse data to low-dimensional, dense vector representations; the prompt word construction service can be used to construct prompt words; the large language model service can be used for the large language model to perform content distribution network configuration based on the constructed prompt words; the key information extraction service can be used to extract key information of data or instructions; the preview interface generation service can be used to generate a preview interface based on the code generated by the large language model; the log service is used to record log information during the system operation process; the monitoring service is used to monitor the system operation process and send warning information when an exception occurs.
[0043] The basic layer is used to provide a service operating environment, including CDN configuration service, model online service, vector database and image deployment service. Among them, CDN configuration service is used to provide the configuration environment of the content distribution network; model online service is used to provide online operation of large language models and Embedding models; vector database is used to store vector information of configuration documents, configuration files, etc. during the content distribution network configuration process; image deployment service is used to package the applications and operating environment involved in the content distribution network deployment into images, and deploy them to Docker containers or other environments that support Docker images.
[0044] like Figure 1 As shown, the content distribution network configuration method provided by this embodiment includes the following steps.
[0045] S110: Receive a target configuration instruction from a user, where the target configuration instruction is an instruction for configuring a target content distribution network.
[0046] In the embodiment of the present disclosure, the target configuration instruction may be a voice instruction input by the user, or a natural language instruction input by the user. Specifically, the target configuration instruction may be an instruction in text form or voice form input by the user in the user interface for configuring the target content distribution network. The user interface may be as follows: Figure 2 The corresponding user interface of the browser in .
[0047] The target configuration instruction may include the name, domain name, configuration operation information, etc. corresponding to the target content distribution network to be configured. For example, the target configuration instruction may be "enable HTTPS for example.com".
[0048] Specifically, the electronic device may receive the target configuration instruction from the user in real time or periodically.
[0049] S120: Searching a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, wherein the target configuration file includes annotation information corresponding to each configuration item.
[0050] In the embodiment of the present disclosure, the preset vector database may be a pre-set database storing vectors corresponding to configuration documents and configuration files of the content distribution network.
[0051] Configuration documents and configuration files play an important role in the setup and management of content delivery networks. Among them, the configuration document can be understood as a detailed guide document, which contains descriptive information on how to configure the content delivery network service, presented in natural language; the configuration file contains the specific configuration information of the content delivery network, which can exist in different forms, such as JSON, YAML and other formats.
[0052] The annotation information may include first annotation information and second annotation information, wherein the first annotation information may be the attribute information corresponding to each configuration item that is manually and preliminarily annotated, such as the purpose of the configuration item, the parameters corresponding to the configuration item, precautions, the location information of the configuration item in the configuration document, etc.; the second annotation information may be the specific description information of the configuration item in the configuration document.
[0053] Specifically, after receiving the target configuration instruction from the user, the electronic device parses the target configuration instruction and obtains the name and / or domain name of the target content distribution network to be configured corresponding to the target configuration instruction; based on the name and / or domain name corresponding to the target content distribution network, the electronic device searches for the target configuration document and target configuration file corresponding to the target content distribution network from a preset vector database, and then obtains the target configuration document and target configuration file represented in vector form.
[0054] S130: construct a target prompt word based on the target configuration instruction, the target configuration document and the target configuration file.
[0055] Specifically, after acquiring the target configuration document and the target configuration file, the electronic device fuses the target configuration instruction, the target configuration document and the target configuration file to construct the target prompt word at one time.
[0056] S140: Input the target prompt word into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word.
[0057] In the disclosed embodiment, the preset large language model may be any large language model that can perform semantic understanding, analysis, and generate a code or text corresponding to the target prompt word, and is not limited here.
[0058] Specifically, after acquiring the target prompt word, the electronic device inputs the target prompt word into a preset large language model, and the preset large language model performs semantic analysis on the target prompt word, generates and outputs a target code corresponding to the target configuration instruction according to the semantic analysis result.
[0059] S150: Configure a target content distribution network corresponding to the target configuration instruction based on the target code.
[0060] Specifically, after the electronic device obtains the target code output by the preset large language model, it calls the preset interface based on the target code to perform the configuration operation of the target content distribution network, thereby completing the configuration of the target content distribution network.
[0061] In the disclosed embodiment, a target configuration instruction of a user can be received, and the target configuration instruction is an instruction for configuring a target content distribution network. After receiving the target configuration instruction, a target configuration document and a target configuration file corresponding to the target configuration instruction are searched from a preset vector database, and the target configuration file includes annotation information corresponding to each configuration item. Then, a target prompt word is constructed based on the target configuration instruction, the target configuration document and the target configuration file, and the target prompt word is input into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word, and then configures the target content distribution network corresponding to the target configuration instruction based on the target code. Thus, the target configuration file and the target configuration document corresponding to the target configuration instruction can be obtained by retrieval, and the target prompt word is constructed according to the target configuration instruction, the target configuration file and the target configuration document, so that the preset large language model generates a target code corresponding to the target configuration instruction according to the target prompt word, and then configures the target content distribution network according to the target code, and the configuration of the content distribution network can be realized without the need for relevant personnel to have certain content distribution network service configuration knowledge, thereby reducing the configuration threshold and labor cost of the content distribution network.
[0062] On the basis of the embodiments of the present disclosure, the above-mentioned content distribution network configuration method configures the content distribution network based on a preset large language model when faced with a large number of content distribution network configurations, thereby improving the efficiency of content distribution network configuration and shortening the time consumed; at the same time, it improves the accuracy of content distribution network configuration.
[0063] In an embodiment of the present disclosure, before receiving a target configuration instruction from a user, the content distribution network configuration method may further include: obtaining a first configuration document, cleaning the first configuration document to obtain a second configuration document; vectorizing the second configuration document to obtain a first vector, and storing the first vector in a preset vector database; obtaining a first configuration file and a preset prompt word, the first configuration file including first semantic annotation information corresponding to each configuration item in the content distribution network, the first semantic annotation information including attribute information of the configuration item; inputting the first configuration file and the preset prompt word into a preset large language model, and the preset large language model searches for target document information matching the first semantic annotation information from a preset vector database based on the first semantic annotation information, using the target document information as the second semantic annotation information corresponding to each configuration item, and adding the second semantic annotation information to the first configuration file to obtain a second configuration file; vectorizing the second configuration file to obtain a second vector, and storing the second vector in a preset vector database.
[0064] The cleaning process may include word segmentation, removal of stop words, standardization, etc., which are not limited here.
[0065] The preset prompt word may include information for describing the output data format.
[0066] Specifically, before receiving the user's target configuration instruction, the electronic device can build a preset database, specifically by obtaining a first configuration document and a first configuration file corresponding to at least one content distribution network, cleaning the first configuration document based on a data processing service to obtain a second configuration document, vectorizing the second configuration document based on a preset vector model to obtain a first vector, and storing the first vector in a preset vector database; then, the first configuration file and the preset prompt word are input into a preset large language model, and the preset large language model searches for target document information matching the first semantic annotation information from a preset vector database based on the first semantic annotation information in the first configuration file, wherein the target document information is part of the document information matching the first semantic annotation information in the first configuration document belonging to the same content distribution network as the first configuration file, and the target document information is used as the second semantic annotation information corresponding to each configuration item, and the second semantic annotation information is added to the first configuration file to obtain the second configuration file; the second configuration file is vectorized based on the preset vector model to obtain a second vector, and the second vector is stored in the preset vector database. The preset vector model may be any model that can map high-dimensional, sparse data into low-dimensional, dense vector representations. By converting the data into vector form, the model can capture and understand the potential relationships and structures of the data.
[0067] In the embodiment of the present disclosure, a preset vector database can be constructed before receiving the target configuration instruction of the user, which provides strong support for the subsequent execution of the target configuration instruction.
[0068] In an embodiment of the present disclosure, searching a preset vector database for a target configuration document and a target configuration file corresponding to a target configuration instruction may specifically include: vectorizing the target configuration instruction based on a preset vector model to obtain an instruction vector; matching the instruction vector with a vector stored in a preset vector database to obtain a matching result; and determining the target configuration document and the target configuration file based on the matching result.
[0069] Among them, the electronic device can match the instruction vector with the vector stored in the preset vector database by calculating the similarity between the two vectors, calculating the distance between the two vectors, etc.
[0070] In the embodiments of the present disclosure, the target configuration instruction can be vectorized based on a preset vector model to obtain an instruction vector, and the target configuration document and target configuration file can be determined by matching the instruction vector with a vector stored in a preset vector database, thereby improving the accuracy and efficiency of the obtained target configuration document and target configuration file.
[0071] In an embodiment of the present disclosure, constructing a target prompt word based on a target configuration instruction, a target configuration document, and a target configuration file may specifically include: obtaining a preset prompt word, the preset prompt word including information for describing the output data format; fusing the preset prompt word, the target configuration instruction, the target configuration document, and the target configuration file to obtain the target prompt word.
[0072] Specifically, after obtaining the preset prompt word, the electronic device vectorizes the preset prompt word based on the preset vector model to obtain the preset prompt word vector, and fuses the vectors corresponding to the target configuration instruction, the target configuration document and the target configuration file with the preset prompt word vector, wherein the fusion process can be a process of merging multiple vectors into a larger vector to obtain the target prompt word, so that the obtained target prompt word can contain more content distribution network configuration information, thereby improving the accuracy of subsequent execution of the content distribution network configuration.
[0073] In an embodiment of the present disclosure, after the target prompt word is input into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word, the content distribution network configuration method may also include: calling a preview interface generation service, so that the preview interface generation service generates a preview interface based on the target code, and displays the preview interface to the user.
[0074] Therefore, the preview interface can be displayed to the user for confirmation, thereby improving the user experience.
[0075] Furthermore, configuring the target content distribution network corresponding to the target configuration instruction based on the target code may include: in response to the user performing a target operation based on the preview interface, calling the network configuration service system so that the network configuration service system calls a preset interface based on the target code to perform the configuration operation of the target content distribution network, and the target operation is used to characterize that the target code is correct.
[0076] In the disclosed embodiment, after the user confirms that the target code is correct, the configuration operation of the target content distribution network can be performed, which further improves the accuracy of the configuration of the target content distribution network.
[0077] Figure 3 is a flowchart of another content distribution network configuration method provided by an embodiment of the present disclosure, such as Figure 3As shown, the content distribution network configuration method may include the following steps:
[0078] S310, obtaining a first configuration document, performing a cleaning process on the first configuration document to obtain a second configuration document; performing a vectorization process on the second configuration document to obtain a first vector, and storing the first vector in a preset vector database.
[0079] S320, obtaining a first configuration file and preset prompt words, the first configuration file including first semantic annotation information corresponding to each configuration item in the content distribution network; inputting the first configuration file and the preset prompt words into a preset large language model, and having the preset large language model search for target document information matching the first semantic annotation information from a preset vector database based on the first semantic annotation information, using the target document information as second semantic annotation information corresponding to each configuration item, and adding the second semantic annotation information to the first configuration file to obtain a second configuration file.
[0080] S330, vectorizing the second configuration file to obtain a second vector, and storing the second vector in a preset vector database.
[0081] S340: Receive a target configuration instruction from a user.
[0082] S350: Search a preset vector database for a target configuration document and a target configuration file corresponding to the target configuration instruction.
[0083] S360, obtaining a preset prompt word; fusing the preset prompt word, the target configuration instruction, the target configuration document and the target configuration file to obtain the target prompt word.
[0084] S370: Input the target prompt word into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word.
[0085] S380: Calling a preview interface generation service, so that the preview interface generation service generates a preview interface based on the target code, and displays the preview interface to the user.
[0086] S390: In response to the user performing a target operation based on the preview interface, the network configuration service system is called, so that the network configuration service system calls a preset interface based on the target code to perform a configuration operation of the target content distribution network, wherein the target operation is used to indicate that the target code is correct.
[0087] It should be noted that the specific implementation of steps S310-S390 is similar to the implementation of the relevant steps in the above-mentioned embodiment of the present disclosure, and will not be repeated here.
[0088] In the disclosed embodiment, a preset vector database can be constructed in advance according to the configuration document and configuration file of the content distribution network. After receiving the target configuration instruction of the user, the target configuration document and target configuration file corresponding to the target configuration instruction are searched and obtained from the preset vector database. The preset prompt word is optimized according to the target configuration instruction, the preset prompt word, the target configuration document and the target configuration file to obtain the target prompt word. Then, the preset large language model generates the target code corresponding to the target configuration instruction based on the target prompt word, and calls the preview interface generation service so that the preview interface generation service generates the preview interface based on the target code, and displays the preview interface to the user. After the user confirms that the target code is correct, the network configuration service system is called so that the network configuration service system calls the preset interface based on the target code to perform the configuration operation of the target content distribution network, thereby reducing the configuration threshold and labor cost of the content distribution network, improving the efficiency of the content distribution network configuration, shortening the time consumption, and improving the accuracy of the content distribution network configuration.
[0089] Figure 4 It is a structural diagram of a content distribution network configuration device provided by an embodiment of the present disclosure.
[0090] In the embodiments of the present disclosure, the content distribution network configuration device can be set in an electronic device, which is understood as a part of the functional modules in the above electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.
[0091] like Figure 4 As shown, the content distribution network configuration device 400 may include an instruction receiving module 410 , an information searching module 420 , a prompt word building module 430 , a code generating module 440 and a configuration executing module 450 .
[0092] The instruction receiving module 410 may be used to receive a target configuration instruction from a user, where the target configuration instruction is an instruction for configuring a target content distribution network.
[0093] The information search module 420 may be used to search a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, where the target configuration file includes annotation information corresponding to each configuration item.
[0094] The prompt word construction module 430 may be used to construct target prompt words based on target configuration instructions, target configuration documents, and target configuration files.
[0095] The code generation module 440 may be used to input the target prompt word into a preset large language model, and the preset large language model may generate a target code corresponding to the target configuration instruction based on the target prompt word.
[0096] The configuration execution module 450 may be used to configure the target content distribution network corresponding to the target configuration instruction based on the target code.
[0097] In the disclosed embodiment, a target configuration instruction of a user can be received, and the target configuration instruction is an instruction for configuring a target content distribution network. After receiving the target configuration instruction, a target configuration document and a target configuration file corresponding to the target configuration instruction are searched from a preset vector database, and the target configuration file includes annotation information corresponding to each configuration item. Then, a target prompt word is constructed based on the target configuration instruction, the target configuration document and the target configuration file, and the target prompt word is input into a preset large language model, and the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word, and then configures the target content distribution network corresponding to the target configuration instruction based on the target code. Thus, the target configuration file and the target configuration document corresponding to the target configuration instruction can be obtained by retrieval, and the target prompt word is constructed according to the target configuration instruction, the target configuration file and the target configuration document, so that the preset large language model generates a target code corresponding to the target configuration instruction according to the target prompt word, and then configures the target content distribution network according to the target code, and the configuration of the content distribution network can be realized without the need for relevant personnel to have certain content distribution network service configuration knowledge, thereby reducing the configuration threshold and labor cost of the content distribution network.
[0098] In some embodiments of the present disclosure, the content distribution network configuration device 400 may further include a vector database construction module.
[0099] The vector database construction module can be used to obtain a first configuration document before receiving a target configuration instruction from a user, and perform a cleaning process on the first configuration document to obtain a second configuration document;
[0100] Performing vectorization processing on the second configuration document to obtain a first vector, and storing the first vector in a preset vector database;
[0101] Acquire a first configuration file and a preset prompt word, the first configuration file including first semantic annotation information corresponding to each configuration item in the content distribution network, the first semantic annotation information including attribute information of the configuration item;
[0102] The first configuration file and the preset prompt words are input into a preset large language model, and the preset large language model searches for target document information matching the first semantic annotation information from a preset vector database based on the first semantic annotation information, uses the target document information as the second semantic annotation information corresponding to each configuration item, and adds the second semantic annotation information to the first configuration file to obtain a second configuration file;
[0103] The second configuration file is vectorized to obtain a second vector, and the second vector is stored in a preset vector database.
[0104] In some embodiments of the present disclosure, the information search module 420 may be specifically used to perform vectorization processing on the target configuration instruction based on a preset vector model to obtain an instruction vector;
[0105] Matching the instruction vector with the vector stored in the preset vector database to obtain a matching result;
[0106] A target configuration document and a target configuration file are determined based on the matching results.
[0107] In some embodiments of the present disclosure, the prompt word construction module 430 may be specifically used to obtain a preset prompt word, where the preset prompt word includes information for describing the output data format;
[0108] The preset prompt words, target configuration instructions, target configuration documents and target configuration files are integrated to obtain the target prompt words.
[0109] In some embodiments of the present disclosure, the content distribution network configuration device 400 may further include a preview interface generation module.
[0110] The preview interface generation module can be used to input the target prompt word into a preset large language model, and after the preset large language model generates a target code corresponding to the target configuration instruction based on the target prompt word, call the preview interface generation service to enable the preview interface generation service to generate a preview interface based on the target code and display the preview interface to the user.
[0111] In some embodiments of the present disclosure, the configuration execution module 450 can be specifically used to call the network configuration service system in response to the user performing a target operation based on the preview interface, so that the network configuration service system calls a preset interface based on the target code to perform the configuration operation of the target content distribution network, and the target operation is used to characterize that the target code is correct.
[0112] It should be noted that Figure 4 The content distribution network configuration device 400 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0113] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0114] In the disclosed embodiment, Figure 5 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.
[0115] like Figure 5 As shown, the electronic device may include a processor 510 and a memory 520 storing computer program instructions.
[0116] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0117] The memory 520 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 520 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 520 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 520 is a non-volatile solid-state memory. In a particular embodiment, the memory 520 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0118] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the content distribution network configuration method provided in the embodiment of the present disclosure.
[0119] In one example, the electronic device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.
[0120] The bus 540 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses.
[0121] The embodiments of the present disclosure also provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the content distribution network configuration method provided by the embodiments of the present disclosure.
[0122] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the electronic device to complete the content distribution network configuration method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0123] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the content distribution network configuration method provided by the embodiments of the present disclosure is implemented, and the various processes and effects in the above-mentioned embodiments of the present disclosure can be implemented, which will not be elaborated here.
[0124] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A content distribution network configuration method, characterized in that: include: Receiving a target configuration instruction from a user, wherein the target configuration instruction is an instruction for configuring a target content distribution network; Searching a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, wherein the target configuration file includes annotation information corresponding to each configuration item; Constructing a target prompt word based on the target configuration instruction, the target configuration document and the target configuration file; Inputting the target prompt word into a preset large language model, and generating a target code corresponding to the target configuration instruction based on the target prompt word by the preset large language model; A target content distribution network corresponding to the target configuration instruction is configured based on the target code.
2. The method according to claim 1, characterized in that Before receiving the target configuration instruction from the user, the method further includes: Acquire a first configuration document, and perform a cleaning process on the first configuration document to obtain a second configuration document; Vectorizing the second configuration document to obtain a first vector, and storing the first vector in the preset vector database; Acquire a first configuration file and a preset prompt word, wherein the first configuration file includes first semantic annotation information corresponding to each configuration item in the content distribution network, and the first semantic annotation information includes attribute information of the configuration item; The first configuration file and the preset prompt word are input into a preset large language model, and the preset large language model searches for target document information matching the first semantic annotation information from the preset vector database based on the first semantic annotation information, uses the target document information as second semantic annotation information corresponding to each configuration item, and adds the second semantic annotation information to the first configuration file to obtain a second configuration file; The second configuration file is vectorized to obtain a second vector, and the second vector is stored in the preset vector database.
3. The method according to claim 1, characterized in that The step of searching a preset vector database for a target configuration document and a target configuration file corresponding to the target configuration instruction includes: Performing vectorization processing on the target configuration instruction based on a preset vector model to obtain an instruction vector; Matching the instruction vector with the vector stored in the preset vector database to obtain a matching result; The target configuration document and the target configuration file are determined based on the matching result.
4. The method according to claim 1, characterized in that: The step of constructing a target prompt word based on the target configuration instruction, the target configuration document and the target configuration file includes: Acquire a preset prompt word, wherein the preset prompt word includes information for describing an output data format; The preset prompt word, the target configuration instruction, the target configuration document and the target configuration file are fused to obtain the target prompt word.
5. The method according to claim 1, characterized in that After inputting the target prompt word into a preset large language model and generating a target code corresponding to the target configuration instruction based on the target prompt word by the preset large language model, the method further includes: The preview interface generation service is called to enable the preview interface generation service to generate a preview interface based on the target code and display the preview interface to the user.
6. The method according to claim 5, characterized in that The configuring the target content distribution network corresponding to the target configuration instruction based on the target code includes: In response to the user performing a target operation based on the preview interface, the network configuration service system is called so that the network configuration service system calls a preset interface based on the target code to perform a configuration operation of the target content distribution network, wherein the target operation is used to indicate that the target code is correct.
7. A content distribution network configuration device, characterized in that: include: An instruction receiving module, used to receive a target configuration instruction from a user, wherein the target configuration instruction is an instruction for configuring a target content distribution network; An information search module, used to search a target configuration document and a target configuration file corresponding to the target configuration instruction from a preset vector database, wherein the target configuration file includes annotation information corresponding to each configuration item; A prompt word construction module, used to construct a target prompt word based on the target configuration instruction, the target configuration document and the target configuration file; A code generation module, used for inputting the target prompt word into a preset large language model, and generating a target code corresponding to the target configuration instruction based on the target prompt word by the preset large language model; A configuration execution module is used to configure a target content distribution network corresponding to the target configuration instruction based on the target code.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the content distribution network configuration method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the content distribution network configuration method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the content distribution network configuration method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Gateway configuration method, equipment and cluster
CN121396777A