Plug-in resource storage method and device, and storage medium
By distributing plugin resources across multiple terminal gateway devices and calling target plugin resources based on user terminal business requests, the problem of increased resource consumption caused by full plugin compilation is solved, achieving efficient resource utilization and system flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2023-09-20
- Publication Date
- 2026-08-04
AI Technical Summary
Because different terminal gateway devices have different brands and models, the same application plugin cannot be adapted to all devices, resulting in increased resource consumption when the plugin is fully compiled.
Multiple plugin resources are stored in multiple terminal gateway devices of the target gateway, with each device storing one plugin resource. The target plugin resource is invoked based on the service request of the user terminal through the adjacent network topology relationship.
This solves the problem of increased resource consumption on terminal gateway devices caused by full compilation of plugin resources, and improves resource utilization and system flexibility.
Smart Images

Figure CN117376372B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a plug-in resource storage method, apparatus and storage medium. Background Technology
[0002] Currently, plugins, as extensible software modules or functional extension components, are widely used in various application scenarios in the field of communication technology. To meet diverse user service needs, terminal gateway devices often configure multiple application plugins. However, due to differences in brand and model among different terminal gateway devices, the same application plugin cannot be adapted to all terminal gateway devices. Existing technology provides a middleware system that enables flexible development of upper-layer application plugins by providing standardized common application programming interfaces (CAPIs) for different functional plugin components. Simultaneously, this middleware system interfaces with the lower-layer terminal gateway devices through a desktop bus (DBUS) interface, thereby improving the compatibility of functional plugins with different terminal gateway devices.
[0003] However, when there are many plugins, compiling all plugins into the middleware system would result in redundant compiled package data between the plugins and the middleware system. This would increase the resource consumption of the terminal gateway device. Therefore, how to reduce the increased resource consumption of the terminal gateway device caused by compiling all plugins has become an urgent technical problem to be solved. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for storing plug-in resources, which can store plug-in resources.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a method for storing plug-in resources, the method comprising: acquiring a plurality of first plug-in resources; the first plug-in resources being plug-in resources determined based on end-user requirements; storing the plurality of first plug-in resources in a target gateway group according to a preset storage method; the target gateway group including a plurality of terminal gateway devices; the plurality of terminal gateway devices being in an adjacent network topology relationship; the preset storage method storing one first plug-in resource in each terminal gateway device; and invoking a target plug-in resource in the target gateway group based on a user terminal's service request; the target plug-in resource being a plug-in resource that satisfies the user terminal's service request.
[0007] In conjunction with the first aspect above, in one possible implementation, multiple first plug-in resources are stored in a target gateway group based on a preset storage method, including: determining a target storage location in each terminal gateway device; storing a corresponding first plug-in resource in the target storage location; updating the configuration information of each first plug-in resource based on the operating environment information of the target storage location; and storing the updated first plug-in resource in the corresponding target storage location.
[0008] In conjunction with the first aspect above, in one possible implementation, invoking a target plugin resource in a target gateway group based on a user terminal's service request includes: determining the target plugin resource in the target gateway group based on the service request; determining a first terminal gateway device based on the target storage location of the target plugin resource; the first terminal gateway device being the terminal gateway device where the target plugin resource is stored; determining whether there is a direct connection between the user terminal and the first terminal gateway device; if there is a direct connection between the user terminal and the first terminal gateway device, invoking the target plugin resource based on the first terminal gateway device; if there is no direct connection between the user terminal and the first terminal gateway device, diverting the user's service request to the first terminal gateway device to invoke the target plugin resource.
[0009] In conjunction with the first aspect above, in one possible implementation, the method further includes: determining the number of new first plugin resources when it is necessary to add new first plugin resources; and adding terminal gateway devices in the target gateway group with the same number of plugin resources based on the number of first plugin resources.
[0010] Secondly, this application provides a plug-in resource storage device, the device comprising: a processing unit; the processing unit being configured to acquire a plurality of first plug-in resources; the first plug-in resources being plug-in resources determined based on end-user requirements; the processing unit being further configured to store the plurality of first plug-in resources in a target gateway group according to a preset storage method; the target gateway group including a plurality of terminal gateway devices; the plurality of terminal gateway devices being in an adjacent network topology relationship; the preset storage method storing one first plug-in resource in each terminal gateway device; the processing unit being further configured to invoke target plug-in resources in the target gateway group based on service requests from user terminals; the target plug-in resources being plug-in resources that satisfy the service requests from user terminals.
[0011] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used for: determining the target storage location in each terminal gateway device; storing a first plug-in resource in the target storage location; updating the configuration information of each first plug-in resource based on the operating environment information of the target storage location; and storing the updated first plug-in resource in the corresponding target storage location.
[0012] In conjunction with the second aspect above, in one possible implementation, the processing unit is further specifically configured to: determine the target plugin resource in the target gateway group based on the service request; determine the first terminal gateway device based on the target storage location of the target plugin resource; the first terminal gateway device is the terminal gateway device where the target plugin resource is stored; determine whether the user terminal and the first terminal gateway device are directly connected; if the user terminal and the first terminal gateway device are directly connected, then call the target plugin resource based on the first terminal gateway device; if the user terminal and the first terminal gateway device are not directly connected, then divert the user's service request to the first terminal gateway device to call the target plugin resource.
[0013] In conjunction with the second aspect above, in one possible implementation, the processing unit is further configured to: determine the number of newly added first plugin resources when it is necessary to add first plugin resources; and, based on the number of first plugin resources, add terminal gateway devices in the target gateway group with the same number of plugin resources.
[0014] Thirdly, this application provides a plug-in resource storage device, which includes a processor and a memory; wherein the memory is used to store computer execution instructions, and when the plug-in resource storage device is running, the processor executes the computer execution instructions stored in the memory to cause the plug-in resource storage device to perform the plug-in resource storage method as described in the first aspect and any possible implementation thereof.
[0015] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed by a processor of a plug-in resource storage device, enable the plug-in resource storage device to perform the plug-in resource storage method as described in the first aspect and any possible implementation thereof.
[0016] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on a plug-in resource storage device, cause the plug-in resource storage device to execute the plug-in resource storage method as described in the first aspect and any possible implementation thereof.
[0017] In a sixth aspect, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run computer programs or instructions to implement the plug-in resource storage method as described in the first aspect and any possible implementation thereof.
[0018] Specifically, the chip provided in this application embodiment also includes a memory for storing computer programs or instructions.
[0019] In this application, the name of the aforementioned plug-in resource storage device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the function of each device or functional module is similar to that of this application, it falls within the scope of the claims of this application and its equivalents.
[0020] These or other aspects of this application will become more readily apparent in the following description.
[0021] The technical solution provided in this application offers at least the following advantages: The plug-in resource storage device stores multiple plug-in resources separately in multiple terminal gateway devices of the target gateway. Each terminal gateway device stores one plug-in resource. Furthermore, there is an adjacent network topology relationship between the multiple terminal gateway devices. Based on the service requests of user terminals, the plug-in resource storage device invokes the target plug-in resources in the target gateway group. In this way, by distributing the plug-in resources among the terminal gateway devices in the target gateway group and invoking the target plug-in resources based on the target gateway group, the technical problem of increased resource occupancy of terminal gateway devices caused by full compilation of plug-in resources is solved. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of a plug-in resource calling device provided in an embodiment of this application;
[0023] Figure 2 This is a schematic diagram of a plug-in resource storage device structure provided in an embodiment of this application;
[0024] Figure 3 A flowchart illustrating a method for storing plug-in resources provided in an embodiment of this application;
[0025] Figure 4 This is another flowchart illustrating a method for storing plug-in resources provided in an embodiment of this application;
[0026] Figure 5 This is another flowchart illustrating a method for storing plug-in resources provided in an embodiment of this application;
[0027] Figure 6 This is another flowchart illustrating a method for storing plug-in resources provided in an embodiment of this application;
[0028] Figure 7 This is a schematic diagram of a plug-in resource storage device provided in an embodiment of this application. Detailed Implementation
[0029] The plug-in resource storage method, apparatus and storage medium provided in this application embodiment are described in detail below with reference to the accompanying drawings.
[0030] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0031] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0032] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0033] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0034] Currently, plugins, as extensible software modules or functional extension components, are widely used in various application scenarios in the field of communication technology. In particular, terminal gateway devices often configure multiple application plugins to meet diverse user service needs. However, due to differences in brand and model among different terminal gateway devices, the same application plugin may not be compatible with all terminal gateway devices. For example... Figure 1 As shown, a plug-in resource invocation device 10 is provided, comprising: a terminal gateway device 101, a middleware system 102, and functional plug-ins A103, B104, and C105. The middleware system 102 provides standardized CAPI interfaces for functional plug-ins A103, B104, and C105, enabling flexible development of upper-layer application plug-ins. Simultaneously, the middleware system interfaces with the lower-layer terminal gateway device 101 via a DBUS interface, thereby improving the adaptability of functional plug-ins to different terminal gateway devices.
[0035] However, when there are many plugins, compiling all plugins into the middleware system would result in redundant compiled package data between the plugins and the middleware system. This would increase the resource consumption of the terminal gateway device. Therefore, how to reduce the increased resource consumption of the terminal gateway device caused by compiling all plugins has become an urgent technical problem to be solved.
[0036] To address the aforementioned technical problems, this application provides a plug-in resource storage method. In this method, a plug-in resource storage device stores multiple plug-in resources in multiple terminal gateway devices of a target gateway. Each terminal gateway device stores one plug-in resource. Furthermore, there is an adjacent network topology relationship between the multiple terminal gateway devices. Based on a user terminal's service request, the plug-in resource storage device invokes the target plug-in resource in the target gateway group. In this way, by distributing the plug-in resources across the terminal gateway devices in the target gateway group and invoking the target plug-in resource based on the target gateway group, the technical problem of increased resource occupancy of terminal gateway devices caused by full compilation of plug-in resources is solved.
[0037] like Figure 2 The diagram shown is a schematic representation of a plug-in resource storage device according to an embodiment of this application. The plug-in resource storage device 200 includes at least one processor 201, a communication line 202, and at least one communication interface 204, and may also include a memory 203. The processor 201, memory 203, and communication interface 204 are connected via the communication line 202.
[0038] The processor 201 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0039] Communication line 202 may include a path for transmitting information between the aforementioned components.
[0040] The communication interface 204 is used to communicate with other devices or communication networks. It can use any transceiver-like device, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
[0041] The memory 203 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of including or storing desired program code having the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0042] In one possible design, the memory 203 can exist independently of the processor 201, meaning the memory 203 can be an external memory of the processor 201. In this case, the memory 203 can be connected to the processor 201 via the communication line 202 to store execution instructions or application code, and its execution is controlled by the processor 201 to implement the space measurement determination method provided in the following embodiments of this application. In another possible design, the memory 203 can also be integrated with the processor 201, meaning the memory 203 can be an internal memory of the processor 201. For example, the memory 203 can be a cache, which can be used to temporarily store some data and instruction information.
[0043] As one possible implementation, processor 201 may include one or more CPUs, for example Figure 2 CPU0 and CPU1 in the example. Alternatively, the plug-in resource storage device 200 may include multiple processors, such as... Figure 2 The processors 201 and 207 are located in the memory. Alternatively, the plug-in resource storage device 200 may also include an output device 205 and an input device 206.
[0044] Through the above description of the implementation methods, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the network node can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, modules, and network nodes described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0045] Figure 3 This application provides a plug-in resource storage method, which is applied to a plug-in resource storage device. For example... Figure 3 As shown, the plugin resource storage provided in this application embodiment can be implemented through the following steps 301 to 303.
[0046] Step 301: Obtain multiple first plugin resources.
[0047] The first plugin resource is a plugin resource determined based on the needs of end users.
[0048] In one possible implementation, the plugin resource storage device acquires multiple first plugin resources that meet the end-user's needs based on the end-user's requirements.
[0049] In one example, in a home optical modem application scenario, the user's needs include network connectivity, home security, and home entertainment. Based on these user needs, the plugin resource storage device obtains multiple primary plugins from the home optical modem's supplier or developer to meet those needs. Examples include network management plugins, network security plugins, and video streaming plugins.
[0050] In one example, in a smart home application scenario, the business needs of smart home user terminals include lighting control, energy control, and voice control. The plug-in resource storage device, based on the business needs of the smart home user terminals, retrieves multiple primary plug-ins that meet those needs. Examples include lighting control plug-ins, energy control plug-ins, and voice control plug-ins.
[0051] Step 302: Store multiple first plugin resources in the target gateway group based on a preset storage method.
[0052] In one possible implementation, the plug-in resource storage device stores multiple plug-in resources into a target gateway group according to a preset storage method. The target gateway group includes multiple terminal gateway devices; the multiple terminal gateway devices are in an adjacent network topology; the preset storage method stores one first plug-in resource in each terminal gateway device.
[0053] In one example, in a home optical modem application scenario, three plugin resources—a network management plugin, a network security plugin, and a video streaming plugin—are obtained based on the user's needs. The plugin resource storage device acquires three terminal gateway devices with adjacent network topologies and sets these three terminal gateway devices as a target gateway group. Further, the plugin resource storage device stores each plugin resource in a corresponding terminal gateway resource within the target gateway group.
[0054] Step 303: Based on the user terminal service request, call the target plugin resources in the target gateway group.
[0055] Among them, the target plugin resources are plugin resources that meet the service requests of user terminals.
[0056] In one possible implementation, the target plugin resource device obtains the service request from the user terminal. The plugin resource storage device, based on the user terminal's service request, determines whether a target plugin resource exists in the target user group. If a target plugin resource exists, it invokes the target plugin resource from the target gateway group and implements the end-user's service requirements based on that target plugin resource.
[0057] In one example, in a home optical modem application scenario, a user terminal's service request is to set access permissions for the home network. Based on this user terminal's service request, the plug-in resource storage device invokes the network security plug-in in the target gateway group. Furthermore, based on the network security plug-in, home network access control rules are set to implement access control for the home network.
[0058] The above solution offers at least the following advantages: The plug-in resource storage device stores multiple plug-in resources separately in multiple terminal gateway devices of the target gateway. Each terminal gateway device stores one plug-in resource. Furthermore, there is an adjacent network topology relationship between the multiple terminal gateway devices. Based on the service requests from user terminals, the plug-in resource storage device invokes the target plug-in resources in the target gateway group. In this way, by distributing the plug-in resources among the terminal gateway devices in the target gateway group and invoking the target plug-in resources based on the target gateway group, the technical problem of increased resource occupancy of terminal gateway devices caused by full compilation of plug-in resources is solved.
[0059] Combination Figure 3 ,like Figure 4 The illustration shows a plug-in resource storage method provided in this application embodiment, applied to a plug-in resource storage device. Step 302: Store multiple first plug-in resources to the target gateway group based on a preset storage method, which can be specifically implemented through the following steps 401-403:
[0060] Step 401: Determine the target storage location in each terminal gateway device.
[0061] The target storage location contains a corresponding first plugin resource.
[0062] One example involves determining the location of multiple first-plugin resources within the corresponding terminal gateway devices based on information such as the model, memory size, and physical identifier of the various terminal gateway devices. This could include, for example, specific folders, directories, or storage spaces within the gateway devices.
[0063] Step 402: Update the resource configuration information of each first plugin based on the runtime environment information of the target storage location.
[0064] In one possible implementation, after storing each first plugin resource in the terminal gateway device, the operating environment information of the target storage location is determined. The plugin resource storage device then updates the relevant parameters of each first plugin resource based on the operating environment requirements of that first plugin resource.
[0065] In one example, the plugin resource storage device determines the configuration file that each first plugin resource depends on. Based on a specific configuration tool, the plugin resource storage device modifies relevant parameters, options, or values in the configuration file according to the runtime environment requirements of the first plugin resource. Furthermore, the plugin resource storage device determines the environment variables required by the first plugin resource, adds or updates the environment variables, and sets the environment variables to the values required by the plugin resource.
[0066] Step 403: Store the updated first plugin resource to the corresponding target storage location.
[0067] In one possible implementation, the plugin resource storage device stores the second plugin resource to the corresponding target storage location based on the target instruction.
[0068] In one example, the plugin resource storage device uses the scp command to transfer a second plugin resource to the target storage location via SSH.
[0069] The above solution offers at least the following benefits: The plug-in resource storage device determines the target storage location in each terminal gateway device. Based on the operating environment information of the target storage location, the configuration information of each first plug-in resource is updated. Furthermore, the updated first plug-in resource is stored in the corresponding target storage location. This method of updating configuration information based on the operating environment information of the target storage location enables real-time updates of configuration information, real-time adaptation to the operating environment, efficient resource management, and reduced network transmission pressure, thereby improving the system's flexibility and availability.
[0070] Combination Figure 3 ,like Figure 5The illustration shows a plugin resource storage method provided in this application embodiment, applied to a plugin resource storage device. Step 303: Based on the user terminal service request, the target plugin resource in the target gateway group is invoked, which can be specifically implemented through the following steps 501-505:
[0071] Step 501: Based on the business request, determine the target plugin resources in the target gateway group.
[0072] In one possible implementation, the plug-in resource storage device determines the target plug-in resources that satisfy the user terminal's service request in the target gateway group based on the service request sent by the user terminal.
[0073] In one example, the target gateway group includes plugin resource A, plugin resource B, and plugin resource C. Based on the user terminal's service request, the target plugin resource required by the service request is determined to be plugin resource A.
[0074] Step 502: Based on the target storage location of the target plugin resource, determine the first terminal gateway device.
[0075] The first terminal gateway device is the terminal gateway device for storing target plugin resources.
[0076] In one possible implementation, the plug-in resource storage device determines the terminal gateway device where the target plug-in resource is stored as the first terminal gateway device based on the target storage location of the target plug-in resource.
[0077] In one example, the target gateway group includes three terminal gateway devices. Terminal gateway device 1 stores plugin resource A, terminal gateway device 2 stores plugin resource B, and terminal gateway device 3 stores plugin resource C. If plugin resource A is the target plugin resource, then terminal gateway device 1 is determined to be the first terminal gateway device.
[0078] Step 503: Determine whether the user terminal and the first terminal gateway device are directly connected.
[0079] In one possible implementation, the plug-in resource storage device determines whether the connection between the first terminal gateway device and the user terminal is a direct connection.
[0080] One example is determining whether an end user is a terminal device connected to terminal gateway device 1.
[0081] Step 504: If there is a direct connection between the user terminal and the first terminal gateway device, then the target plugin resource is invoked based on the first terminal gateway device.
[0082] In one possible implementation, when the user terminal and the first terminal gateway device are directly connected, the plug-in resource storage device directly calls the target plug-in resource in the first terminal gateway device to realize the business needs of the terminal user.
[0083] Step 505: When there is no direct connection between the user terminal and the first terminal gateway device, the service requests of the terminal user are diverted to the first terminal gateway device to call the target plugin resources.
[0084] In one possible implementation, when the user terminal and the first terminal gateway device are not directly connected, the plug-in resource storage device will divert the user terminal's service requests to the first terminal gateway device, and after the diversion is completed, call the target plug-in resources in the first terminal gateway device to realize the end user's service requirements.
[0085] The above scheme brings at least the following beneficial effects: The plug-in resource storage device determines the target plug-in resource that satisfies the user terminal's service request within the target gateway group based on the user terminal's service request. The plug-in resource storage device determines the terminal gateway device where the target plug-in resource is stored as the first terminal gateway device based on the target storage location of the target plug-in resource. The plug-in resource storage device determines whether the connection between the first terminal gateway device and the user terminal is a direct connection. When the user terminal and the first terminal gateway device are directly connected, the plug-in resource storage device directly calls the target plug-in resource in the first terminal gateway device to fulfill the user's service requirements. When the user terminal and the first terminal gateway device are not directly connected, the plug-in resource storage device diverts the user terminal's service request to the first terminal gateway device and, after diversion, calls the target plug-in resource in the first terminal gateway device to fulfill the user's service requirements. In this way, by determining the target plug-in resource in the target gateway group based on the user terminal's service request and calling it according to its storage location and connection relationship, the user terminal's service request is satisfied. This improves resource availability and access efficiency, accurately determines connection relationships, accelerates service processing, and enables cross-device processing.
[0086] Combination Figure 3 ,like Figure 6 The illustration shows a plug-in resource storage method provided in this application embodiment, applied to a plug-in resource storage device. The method further includes steps 601-602:
[0087] Step 601: If it is necessary to add the first plugin resource, determine the number of the first plugin resources to be added.
[0088] In one possible implementation, when a first plugin resource needs to be added, the plugin resource storage device determines the number of plugin resources that need to be added.
[0089] In one example, the plugin resource storage device determines that the number of new plugin resources needed is N, where N is a positive integer.
[0090] Step 602: Based on the number of the first plug-in resources, add the same number of terminal gateway devices to the target gateway group as the number of plug-in resources.
[0091] In one possible implementation, the plugin resource storage device adds terminal gateway devices to the target gateway group with the same number of plugin resources as needed.
[0092] In one example, when N new first plugin resources are needed, the plugin resource storage device adds N terminal gateway devices to the target gateway group.
[0093] The above solution offers at least the following benefits: When a new plugin resource is needed, the plugin resource storage device determines the number of plugin resources required. Based on the required number of new plugin resources, the plugin resource storage device adds terminal gateway devices to the target gateway group with the same number of plugin resources. This enriches the system's functionality and provides users with more choices. By adding terminal gateway devices, the system can support more plugins and provide more services. The plugin resource storage device's corresponding addition of terminal gateway devices based on the number of new plugin resources can distribute the system load, improving system performance and response speed. Each terminal gateway device can handle a certain number of plugin resources, thereby increasing the overall processing capacity.
[0094] The above provides a detailed description of the plug-in resource storage device involved in the embodiments of this application, as well as the functions of each device within the plug-in resource storage device and the interactions between the devices.
[0095] As can be seen, the above mainly describes the technical solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.
[0096] This application embodiment can divide the plug-in resource storage device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0097] This application provides a plug-in resource storage device for executing a method required by any device in the aforementioned plug-in resource storage system. This plug-in resource storage device may be the plug-in resource storage device described in this application, or a module within a plug-in resource storage device; it may also be a chip within a plug-in resource storage device, or other devices for executing plug-in resource storage methods; this application does not limit the specific device used.
[0098] Figure 7 The diagram shown is a schematic diagram of a plug-in resource storage device provided in an embodiment of this application. The device includes a processing unit 701 and a communication unit 702.
[0099] Processing unit 701 is used to acquire multiple first plug-in resources; the first plug-in resources are plug-in resources determined based on the needs of end users; processing unit 701 is also used to store the multiple first plug-in resources in a target gateway group according to a preset storage method; the target gateway group includes multiple terminal gateway devices; the multiple terminal gateway devices are in an adjacent network topology relationship; the preset storage method stores one first plug-in resource in each terminal gateway device; processing unit 701 is also used to call target plug-in resources in the target gateway group based on the service requests of user terminals; the target plug-in resources are plug-in resources that satisfy the service requests of user terminals.
[0100] The processing unit 701 is specifically used for: determining the target storage location in each terminal gateway device; storing a first plug-in resource in the target storage location; updating the configuration information of each first plug-in resource based on the operating environment information of the target storage location; and storing the updated first plug-in resource in the corresponding target storage location.
[0101] The processing unit 701 is further specifically configured to: determine the target plugin resource in the target gateway group based on the service request; determine the first terminal gateway device based on the target storage location of the target plugin resource; the first terminal gateway device is the terminal gateway device where the target plugin resource is stored; determine whether the user terminal and the first terminal gateway device are directly connected; if the user terminal and the first terminal gateway device are directly connected, then call the target plugin resource based on the first terminal gateway device; if the user terminal and the first terminal gateway device are not directly connected, then divert the service request of the terminal user to the first terminal gateway device to call the target plugin resource.
[0102] The processing unit 701 is further configured to: determine the number of new first plug-in resources when it is necessary to add new first plug-in resources; and add terminal gateway devices in the target gateway group with the same number of plug-in resources based on the number of first plug-in resources.
[0103] This application provides a plug-in resource storage device for executing a method required by any device in the aforementioned plug-in resource storage system. This plug-in resource storage device may be the plug-in resource storage device described in this application, or a module within a plug-in resource storage device; it may also be a chip within a plug-in resource storage device, or other devices for executing plug-in resource storage methods; this application does not limit the specific device used.
[0104] This application also provides a computer-readable storage medium storing instructions. When a computer executes these instructions, the computer performs each step of the method flow shown in the above-described method embodiments.
[0105] Embodiments of this application provide a computer program product containing instructions that, when executed on a computer, cause the computer to perform the plug-in resource storage method described in the above method embodiments.
[0106] Embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run computer programs or instructions to implement the plug-in resource storage method as described in the above method embodiments.
[0107] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing, or any other form of computer-readable storage medium in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC). In the embodiments of this application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0108] Since the apparatus, device, computer-readable storage medium, and computer program product in the embodiments of this application can be applied to the above methods, the technical effects that can be obtained can also be referred to the above method embodiments. The embodiments of this application will not be repeated here.
[0109] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for storing plug-in resources, characterized in that, The method includes: Acquire multiple first plugin resources; the first plugin resources are plugin resources determined based on end-user needs; The plurality of first plug-in resources are stored in a target gateway group based on a preset storage method; the target gateway group includes a plurality of terminal gateway devices; the plurality of terminal gateway devices are in an adjacent network topology relationship; the preset storage method stores one first plug-in resource in each of the terminal gateway devices. Based on the user terminal's service request, the target plugin resource in the target gateway group is invoked; the target plugin resource is the plugin resource that satisfies the user terminal's service request. The step of storing the plurality of first plugin resources to the target gateway group based on a preset storage method includes: Determine the target storage location in each terminal gateway device; each target storage location stores one of the first plug-in resources. Based on the runtime environment information of the target storage location, update the configuration information of each first plugin resource; Store the updated first plugin resource to the corresponding target storage location; The service request based on the user terminal invokes the target plugin resource in the target gateway group, including: Based on the service request, determine the target plugin resources in the target gateway group; Based on the target storage location of the target plugin resource, a first terminal gateway device is determined; the first terminal gateway device is the terminal gateway device where the target plugin resource is stored. Determine whether the user terminal and the first terminal gateway device are directly connected; If there is a direct connection between the user terminal and the first terminal gateway device, then the target plugin resource is invoked based on the first terminal gateway device; When there is no direct connection between the user terminal and the first terminal gateway device, the service request of the terminal user is diverted to the first terminal gateway device to call the target plugin resource.
2. The method according to claim 1, characterized in that, The method further includes: If it is necessary to add the first plugin resource, determine the number of the first plugin resources to be added; Based on the number of the first plug-in resources, add the same number of terminal gateway devices to the target gateway group as the number of plug-in resources.
3. A plug-in resource storage device, characterized in that, The device includes: a processing unit; The processing unit is used to acquire multiple first plugin resources; the first plugin resources are plugin resources determined based on end-user needs. The processing unit is further configured to store the plurality of first plug-in resources to a target gateway group based on a preset storage method; the target gateway group includes a plurality of terminal gateway devices; the plurality of terminal gateway devices are in an adjacent network topology relationship; the preset storage method stores one first plug-in resource in each terminal gateway device; The processing unit is further configured to invoke target plugin resources in the target gateway group based on the service request of the user terminal; the target plugin resources are plugin resources that satisfy the service request of the user terminal. The processing unit is specifically used for: Determine the target storage location in each terminal gateway device; each target storage location stores one of the first plug-in resources. Based on the runtime environment information of the target storage location, update the configuration information of each first plugin resource; Store the updated first plugin resource to the corresponding target storage location; The processing unit is further specifically used for: Based on the service request, determine the target plugin resources in the target gateway group; Based on the target storage location of the target plugin resource, a first terminal gateway device is determined; the first terminal gateway device is the terminal gateway device where the target plugin resource is stored. Determine whether the user terminal and the first terminal gateway device are directly connected; If there is a direct connection between the user terminal and the first terminal gateway device, then the target plugin resource is invoked based on the first terminal gateway device; When there is no direct connection between the user terminal and the first terminal gateway device, the service request of the terminal user is diverted to the first terminal gateway device to call the target plugin resource.
4. The apparatus according to claim 3, characterized in that, The processing unit is further configured to: If it is necessary to add the first plugin resource, determine the number of the first plugin resources to be added; Based on the number of the first plug-in resources, add the same number of terminal gateway devices to the target gateway group as the number of plug-in resources.
5. A plug-in resource storage device, characterized in that, include: A processor and a communication interface; the communication interface is coupled to the processor, the processor being used to run computer programs or instructions to implement the plug-in resource storage method as described in any one of claims 1-2.
6. A computer-readable storage medium storing instructions, characterized in that, When the computer executes the instruction, the computer performs the plug-in resource storage method as described in any one of claims 1-2.