CN117763053A - Component processing method and device, electronic equipment and computer readable storage medium - Google Patents

Component processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN117763053A
CN117763053A CN202211137374.9A CN202211137374A CN117763053A CN 117763053 A CN117763053 A CN 117763053A CN 202211137374 A CN202211137374 A CN 202211137374A CN 117763053 A CN117763053 A CN 117763053A
Authority
CN
China
Prior art keywords
target
server
index
component
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211137374.9A
Other languages
Chinese (zh)
Inventor
成鑫
赵国庆
杜晓宇
曾琳铖曦
吴海英
蒋宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mashang Xiaofei Finance Co Ltd
Original Assignee
Mashang Xiaofei Finance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mashang Xiaofei Finance Co Ltd filed Critical Mashang Xiaofei Finance Co Ltd
Priority to CN202211137374.9A priority Critical patent/CN117763053A/en
Publication of CN117763053A publication Critical patent/CN117763053A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a component processing method and apparatus, an electronic device, and a computer readable storage medium, applied to a target proxy server, including: receiving a data request sent by a target object; the method comprises the steps of responding to a data request, acquiring an index identifier corresponding to a target component according to target component identifier information, wherein the index identifier is used for identifying the target component stored in an interstellar file system, the index identifier is provided to a target proxy server by a corresponding first bridge server, the first bridge server is used for responding to a first index identifier acquisition request sent by the target proxy server, the index identifier is provided to the target proxy server, and the interstellar file system stores a plurality of components; the target component is provided to the target object according to the index identification. Embodiments according to the present disclosure enable high availability of proxy servers for processing component requests, reduce stress that may be placed on network resources when acquiring a target component, and reduce storage consumption.

Description

Component processing method and device, electronic equipment and computer readable storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a component processing method and device, an electronic device, and a computer readable storage medium.
Background
Currently, enterprises typically build a local component warehouse manager on a local basis based on a nexus component, so that when a software project is built by using an integrated development environment (IDE, integrated Development Environment), the local component warehouse manager can quickly and conveniently acquire corresponding components to build the software project, wherein the components refer to dependent objects when the software project is built, for example, the components may be Jar packages.
The existing method for building a local component warehouse agent based on a nexus component to acquire a component may have the problems of insufficient high availability, high requirement on network resources and large storage occupation.
Disclosure of Invention
The disclosure provides a component processing method and device, electronic equipment and a computer readable storage medium.
In a first aspect, the present disclosure provides a component processing method applied to a target proxy server, the method including:
receiving a data request sent by a target object, wherein the data request comprises a request for acquiring a target component, the data request comprises target component identification information for identifying the target component, and the target proxy server is a server which is determined from at least one proxy server based on a first preset data slicing rule and is used for responding to the data request;
Acquiring an index identifier corresponding to the target component according to the target component identifier information in response to the data request, wherein the index identifier is used for identifying the target component stored in an interstellar file system, the index identifier is provided to the target proxy server by a corresponding first bridge server, the first bridge server is used for providing the index identifier to the target proxy server in response to a first index identifier acquisition request sent by the target proxy server, and the interstellar file system stores a plurality of components;
and providing the target component to the target object according to the index identifier, wherein the target component is used for constructing a software item by the target object.
In a second aspect, the present disclosure provides another component processing method applied to a first bridge server, the method including:
receiving a first index identifier acquisition request sent by a target proxy server, wherein the first index identifier acquisition request is used for requesting to acquire an index identifier corresponding to a target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule;
Acquiring target component identification information of the target component from the first index identification acquisition request;
obtaining the index identifier according to the target member identifier information, wherein the index identifier is provided to the first bridge server by a corresponding second bridge server, and the second bridge server is used for responding to a second index identifier obtaining request sent by the first bridge server and providing the index identifier to the first bridge server;
the index identification is provided to the target proxy server, the index identification being used by the target proxy server to obtain the target component and provide the target component to the target object.
In a third aspect, the present disclosure provides still another component processing method applied to a second bridge server, the method including:
receiving a second index identifier acquisition request sent by a first bridge server, wherein the second index identifier acquisition request is used for acquiring an index identifier corresponding to a target component;
acquiring target component identification information of the target component from the second index identification acquisition request;
under the condition that the index identifier does not exist in a local cache based on the target component identifier information, acquiring the target component from a preset component warehouse according to the target component identifier information, and acquiring the index identifier returned by the interstellar file system by uploading the target component to the interstellar file system;
And providing the index identifier to the first bridge server, wherein the first bridge server is used for providing the index identifier to a target proxy server, the index identifier is used for the target proxy server to acquire the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule.
In a fourth aspect, the present disclosure provides a component processing apparatus applied to a target proxy server, the apparatus comprising:
a request unit, configured to receive a data request sent by a target object, where the data request includes a request for obtaining a target component, the data request includes target component identification information for identifying the target component, and the target proxy server is a server determined from at least one proxy server based on a first preset data slicing rule, and is configured to respond to the data request;
a response unit, configured to obtain, in response to the data request, an index identifier corresponding to the target member according to the target member identifier information, where the index identifier is used to identify the target member stored in an interstellar file system, the index identifier is provided to the target proxy server by a corresponding first bridge server, the first bridge server is configured to provide, in response to a first index identifier obtaining request sent by the target proxy server, the index identifier to the target proxy server, and the interstellar file system stores a plurality of members;
And the processing unit is used for providing the target component to the target object according to the index identification, wherein the target component is used for constructing a software project by the target object.
In a fifth aspect, the present disclosure provides another component handling apparatus applied to a first bridge server, the apparatus comprising:
the first receiving unit is used for receiving a first index identifier acquisition request sent by a target proxy server, wherein the first index identifier acquisition request is used for requesting to acquire an index identifier corresponding to a target component, the target object is used for constructing a software item based on the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule;
a first identification information acquisition unit configured to acquire target member identification information of the target member from the first index identification acquisition request;
a first index identifier obtaining unit, configured to obtain the index identifier according to the target member identifier information, where the index identifier is provided to the first bridge server by a corresponding second bridge server, and the second bridge server is configured to provide the index identifier to the first bridge server in response to a second index identifier obtaining request sent by the first bridge server;
And a first index identifier providing unit configured to provide the index identifier to the target proxy server, where the index identifier is used for the target proxy server to obtain the target component and provide the target component to the target object.
In a sixth aspect, the present disclosure provides still another component processing apparatus applied to a second bridge server, the apparatus including:
the second receiving unit is used for receiving a second index identifier acquisition request sent by the first bridging server, wherein the second index identifier acquisition request is used for acquiring an index identifier corresponding to the target component;
a second identification information acquisition unit configured to acquire target member identification information of the target member from the second index identification acquisition request;
a second index identifier obtaining unit, configured to obtain, when it is determined based on the target member identifier information that the index identifier does not exist in the local cache, the target member from a preset member repository according to the target member identifier information, and obtain the index identifier returned by the interstellar file system by uploading the target member to the interstellar file system;
And a second index identifier providing unit, configured to provide the index identifier to the first bridge server, where the first bridge server is configured to provide the index identifier to a target proxy server, the index identifier is used by the target proxy server to obtain the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule.
In a seventh aspect, the present disclosure provides a component handling system, comprising:
a target object, the target object being used to construct a software project;
at least one proxy server corresponding to the target object, the proxy server being configured to perform the component processing method according to the first aspect of the present disclosure;
at least one first bridge server corresponding to the at least one proxy server, the first bridge server configured to perform the component processing method according to the second aspect of the present disclosure;
at least one second bridge server corresponding to the at least one first bridge server, the second bridge server being configured to perform the component processing method according to the third aspect of the present disclosure; the method comprises the steps of,
And the interstellar file system is used for storing the components uploaded by the second bridge server and providing index identifiers of the components to the second bridge server.
In an eighth aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, one or more of the computer programs being executable by the at least one processor to enable the at least one processor to perform the component handling method of the first, second and third aspects described above.
In a ninth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the component processing method of the first, second and third aspects described above.
In the embodiment provided by the disclosure, at least one proxy server is preset, and the at least one proxy server can be used for providing a member relied on by a target object when the target object member software project; after the target proxy server in the at least one proxy server receives the data request sent by the target object and used for acquiring the target component, the target proxy server can conveniently and quickly provide the target component to the target object based on the index identification by acquiring the index identification used for identifying the target component stored in the interstellar File System (IPFS, interPlanetary File System) from a preset first bridging server corresponding to the at least one proxy server according to the target component identification information of the target component, so that the target object can construct the software item based on the target component.
Because the target object corresponds to at least one proxy server, the proxy server for responding to the data request sent by the target object is determined according to the first preset data slicing rule, and when the target server in the at least one proxy server obtains the index identifier according to the target component identifier information, the index identifier is obtained by sending the first index identifier obtaining request to the first bridging server corresponding to the target object, according to the embodiment provided by the disclosure, on one hand, the at least one proxy server can be dynamically expanded conveniently and at low cost based on the number of requests of the target object, and on the other hand, the first bridging server corresponding to the at least one proxy server can be correspondingly dynamically expanded. Moreover, the embodiments provided by the present disclosure store the target component in the IPFS network, and because of the characteristics of persistent, decentralized storage and file sharing of the IPFS network, the storage consumption and the problem of high network resource pressure possibly caused by frequent requests to acquire the target component in the remote open source component warehouse can be reduced when the target component is acquired based on the index identifier of the target component.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. The above and other features and advantages will become more readily apparent to those skilled in the art by describing in detail exemplary embodiments with reference to the attached drawings, in which:
FIG. 1 is a flow chart of a component handling method provided by an embodiment of the present disclosure;
FIG. 2 is a block diagram of a component handling system provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of a data slicing process provided by an embodiment of the present disclosure;
FIG. 4 is a first flowchart of an index identification acquisition process provided by an embodiment of the present disclosure;
FIG. 5 is a flow chart of a target component providing process provided by an embodiment of the present disclosure;
FIG. 6 is a flow chart of another component handling method provided by an embodiment of the present disclosure;
FIG. 7 is a second flowchart of an index identification acquisition process provided by an embodiment of the present disclosure;
FIG. 8 is a flow chart of yet another component handling method provided by an embodiment of the present disclosure;
FIG. 9 is a block diagram of a component handling device provided by an embodiment of the present disclosure;
FIG. 10 is a block diagram of another component handling device provided by an embodiment of the present disclosure;
FIG. 11 is a block diagram of yet another component handling apparatus provided by an embodiment of the present disclosure;
fig. 12 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
For a better understanding of the technical solutions of the present disclosure, exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Embodiments of the disclosure and features of embodiments may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In the related art, when a local component warehouse manager built based on a nexus component acquires a component, the problem of high availability deficiency and difficult capacity expansion often exists because the open source version of the nexus component is in a single-node deployment mode, and the problem of high cost exists because the commercial version is in a multi-node deployment mode, but the cost is high; in addition, in the related art, the local component warehouse manager relies on a remote open source component warehouse every time a new component is acquired, but when data is in a foreign open source component warehouse, there is a problem that a network is slow and unstable, and the consumption of network resources and storage by the provided components concentrated by the open source component warehouse is also large.
To solve the above-mentioned problems, the embodiments of the present disclosure provide a component processing method, please refer to fig. 1 and fig. 2, which are respectively a flowchart of a component processing method provided by the embodiments of the present disclosure, and a block diagram of a component processing system provided by the embodiments of the present disclosure. The component processing method provided by the embodiment of the present disclosure may be applied to a target proxy server, where the target proxy server may be any one of at least one proxy server, i.e. proxy, corresponding to a target object for building a software item, as shown in fig. 2, and the at least one proxy server is used to provide a target object with a component on which the target object depends when building the software item, and the proxy server may be a physical server or may also be a virtual server, where no special limitation is made. The following describes a member processing method provided in an embodiment of the present disclosure with reference to fig. 1 and 2.
Before explaining the component handling method provided by the embodiment of the present disclosure, a brief description will be first given of the component handling system provided by the embodiment of the present disclosure with reference to fig. 2.
As shown in fig. 2, the component processing system provided in the embodiment of the present disclosure may include a target object 1100, a proxy server 1200, a first bridge server 1300, a second bridge server 1400, and an interplanetary file system 1500, where the number of proxy servers 1200, first bridge servers 1300, and second bridge servers 1400 may be at least one, that is, one target object 1100 may correspond to at least one proxy server 1200, the at least one proxy server 1200 may correspond to at least one first bridge server 1300, and the at least one first bridge server 1300 may correspond to at least one second bridge server 1400. For example, one target object may correspond to 2 proxy servers, 3 first bridge servers, and 4 second bridge servers.
As shown in fig. 2, a target object 1100 according to an embodiment of the present disclosure may be an object for constructing a software project, in particular, a Java maven project, in an enterprise local, i.e., an enterprise intranet, where the object may be, for example, an integrated development environment, for example, java IDE; of course, the target object may also be in other forms, for example, may also be a script for constructing a software item, which is not particularly limited herein.
To solve the problem in the related art that there may be a high availability deficiency or high cost when building a local component warehouse manager, such as a maven private service warehouse, based on a nexus component, in the embodiment of the present disclosure, the proxy server 1200, i.e. proxy, that is also deployed in the enterprise internal network, that is, in the enterprise local area, shown in fig. 2, receives a data request sent by a target object and is used to acquire or upload a component, and proxy acquires the component based on the data request and provides the component to the target object, as shown in fig. 2, in the embodiment of the present disclosure, the proxy server may acquire the target component by interacting with the first bridge server.
The first bridge server 1300, that is, the pv-bridge, is a server that is also deployed in the internal enterprise network, that is, local to the enterprise and corresponds to the proxy server 1200, for responding to the first index acquisition request sent by the proxy server 1200, and that acquires the index identifier corresponding to the target component by interacting with the second bridge server 1400 deployed in the public network, and provides the index identifier to the proxy server 1200, so that the proxy server 1200 can acquire the target component based on the index identifier.
The second bridge server 1400, i.e., pu-bridge, is a server deployed in an external network, i.e., a public network, for responding to a second index acquisition request corresponding to the first index acquisition request sent by the first bridge server 1300, and may obtain an index identifier of a target member returned by the interstellar file system 1500 by acquiring the target member from a preset member repository, for example, an open source member repository, uploading the target member to the interstellar file system 1500, and providing the index identifier to the first bridge server 1300, so that the first bridge server 1300 may provide the index identifier of the target member to the first proxy server 1200, and thus the first proxy server 1200 may obtain and provide the target member to the target object 1100 based on the index identifier.
As shown in fig. 2, in order to solve the problem that in the related art, each time a new component needs to be acquired from a remote open source component repository, the network resource pressure and storage waste may be high, in this embodiment of the present disclosure, a second index identifier acquisition request sent by a first bridge server 1300 in the local enterprise and used for acquiring an index identifier of the component may be received directly based on a second bridge server 1400 deployed in the public network, and in response to the request, the component is acquired from a preset component repository, that is, the open source component repository, and uploaded to the interstellar file system 1500, and since the interstellar file system 1500 has the characteristics of permanent, decentralised storage and sharing files, by uniformly acquiring the component from the preset component repository by the second bridge server 1400 and uploading the interstellar file system 1500, and by broadcasting the index identifier corresponding to the component, that is, CID (Content-ID), to other second bridge servers 1400 and providing to the first bridge server 1300, the corresponding proxy server may obtain the target component from the interstellar file system 1500 without consuming excessive network resources based on the index identifier.
In fig. 2, only one target object 1100 is shown, and at least one proxy server 1200 corresponding to the target object 1100 and at least one first bridge server 1300 corresponding to the at least one proxy server 1200, and at least one second bridge server 1400 corresponding to the at least one first bridge server 1300; it is to be understood that the component processing system may include a plurality of target objects, for example, a target object 2100, a target object 3100, a target object … …, a target object n100, and the like, and at least one proxy server 2200, at least one first bridge server 2300, and at least one proxy server 3200, at least one first bridge server 3300, and the like, which correspond to the target object 2100, the at least one first bridge server 2300, and the at least one proxy server 3200, respectively, are not particularly limited herein.
The component handling system provided in the embodiment of the present disclosure is briefly described above with reference to fig. 2, and a component handling method provided in the embodiment of the present disclosure is described in detail below with reference to fig. 1.
As shown in fig. 1, the component processing method provided by the embodiment of the present disclosure may include the following steps S101 to S103.
Step S101, receiving a data request sent by a target object, wherein the data request comprises a request for acquiring a target component, the data request comprises target component identification information for identifying the target component, a target proxy server is a server which is determined from at least one proxy server based on a first preset data slicing rule and is used for responding to the data request,
in the embodiment of the present disclosure, if no special description is given, the target object is a Java IDE, the software project is a Java maven project, and the target component is a jar package to be used for constructing the project, where the jar package may also be a software development kit (SDK, software Development Kit).
The target component identification information, which may also be referred to as coordinate information, is information for uniquely identifying one component, and is generally composed of an organization identification group, an item identification artificid, and a version identification version id, that is, the group is a unique identification of an item organization corresponding to the component, the artificid is a unique identifier of an item corresponding to the component, and the version id is a unique identification of a version corresponding to the component.
The first preset data slicing rule may be a rule for uniformly splitting a data request sent by a target object, for example, a Java IDE, to a certain proxy server in at least one proxy server corresponding to the target object for response, where the preset data slicing rule may be a load balancing rule, for example.
In an embodiment of the present disclosure, the target proxy server for implementing the component processing method may be a server for responding to the data request, which is determined from at least one proxy server corresponding to the target object based on the first preset data slicing rule, and it is understood that the proxy server is a server in a normal running state in the at least one proxy server. Of course, if the data request sent by the target object is not initially sent to the target proxy server, the proxy server that receives the data request may first determine whether the data request is processed by itself based on the first preset data slicing rule, that is, determine whether the data request is the target proxy server corresponding to the data request, and if not, the proxy server forwards the data request to the target proxy server from the server identifier of the target proxy server determined based on the first preset data allocation rule, and respond.
The data request may be a data request issued by the target object to obtain the target component when the target component needs to be relied on for building when building the software project.
Step S102, responding to a data request, acquiring an index identifier corresponding to a target component according to target component identifier information, wherein the index identifier is used for identifying the target component stored in an interstellar file system, the index identifier is provided to a target proxy server by a corresponding first bridge server, the first bridge server is used for responding to a first index identifier acquisition request sent by the target proxy server, the index identifier is provided to the target proxy server, and the interstellar file system stores a plurality of components.
In the related art, when an object for constructing a software item needs to acquire a component, it is common to acquire the component from an open source component repository based on component identification information of the component, which may put a great stress on network resources as well as storage resources since the open source component repository is generally set abroad; in the embodiment of the present disclosure, after receiving the data request through step S101, the target proxy server may obtain the target component identification information of the target component from the data request, and according to the target component identification information, send a first index identification obtaining request to a first bridge server corresponding to the target component identification information, so as to obtain an index identification provided by the first bridge server and used for identifying the target component stored in the interstellar file system instead of the open source component warehouse, so as to provide the target component to the target object according to the index identification.
Step S103, providing the target component to the target object according to the index identification, wherein the target component is used for constructing the software project by the target object.
Because the index identifier can uniquely identify the target component in the interstellar file system, and because the interstellar file system has the characteristics of permanent, decentralised storage and shared files, after the target proxy server obtains the index identifier, the target component can be quickly provided for the target object without consuming excessive network resources so as to enable the target object to construct a software project.
As can be seen from the foregoing description, in the component processing method provided by the embodiment of the present disclosure, since the target object corresponds to at least one proxy server, and the proxy server for responding to the data request sent by the target object is determined according to the first preset data allocation rule, and when the target server in the at least one proxy server obtains the index identifier according to the target component identifier information, the index identifier is obtained by sending the first index identifier obtaining request to the first bridging server corresponding to the target server, according to the embodiment provided by the present disclosure, on the one hand, dynamic capacity expansion can be performed on the at least one proxy server based on the number of requests of the target object, and on the other hand, dynamic capacity expansion can also be performed correspondingly on the first bridging server corresponding to the at least one proxy server, and compared with the related art, the embodiment provided by the present disclosure can perform capacity expansion in a manner of building a local component warehouse based on a nexus module to obtain a component conveniently and at low cost, and has high availability; moreover, the embodiments provided by the present disclosure store the target component in the IPFS network, and because of the characteristics of persistent, decentralized storage and file sharing of the IPFS network, the storage consumption and the problem of high network resource pressure possibly caused by frequent requests to acquire the target component in the remote open source component warehouse can be reduced when the target component is acquired based on the index identifier of the target component.
As is apparent from the above description, in order to satisfy the high availability, so that the proxy server for acquiring the target component in response to the data request of the target object and the first bridge server may dynamically expand at low cost, in the embodiment of the present disclosure, it may not be necessary to use the nexus component to build the local component warehouse manager, but by setting a plurality of proxy servers corresponding to the target object, after the target object transmits the data request for acquiring the target component, any proxy server may not directly execute step S102 after receiving the data request, but may determine whether to respond to the data request by itself according to the first preset data slicing rule, that is, whether to be the target proxy server for responding to the data request by itself, and if not, the proxy server may forward the data request to the target proxy server for responding to the data request determined based on the first preset data allocation rule, so as to satisfy the high availability of the system and avoid the problem that the response is slow or even affects the overall stability of the system caused by processing the data request by the single proxy server.
In an embodiment of the present disclosure, the first preset data slicing rule may be a rule for determining a proxy server for responding to a data request including component identification information sent by an object based on the component identification information of the component and the number of proxy servers corresponding to the object. Referring to fig. 3, which is a flowchart of a data slicing process provided in an embodiment of the disclosure, as shown in fig. 3, in an embodiment of the disclosure, before implementing the step S102, the method further includes:
In step S301, the number of at least one proxy server is acquired.
It should be noted that, unless otherwise specified, the number of at least one proxy server in the present disclosure is the number of proxy servers in a normal running state in the at least one proxy server.
Step S302, a server identification of a proxy server for responding to the data request is acquired based on the target component identification information and the number.
After the number of proxy servers is obtained, a server identifier of a proxy server for responding to the data request may be determined based on the target component identifier information and the number, for example, the data request may be distributed to the corresponding proxy server for processing by means of hash distribution by calculating a hash value, for example, an MD5 value, corresponding to the target component identifier information, and by a corresponding relationship between the hash value and the server identifier.
Step S303, checking the consistency of the server identification and the target server identification of the target proxy server, and executing the step S102 under the condition that the server identification and the target server identification are consistent; and if the server identifier and the target server identifier are inconsistent, executing step S304, and forwarding the data request to the proxy server corresponding to the server identifier for processing.
That is, if the server identification determined based on the above step S302 is consistent with the target server identification of the target proxy server currently receiving the data request, the target proxy server may directly respond to the data request to perform step S102, otherwise, the data request may be forwarded to the proxy server corresponding to the server identification to perform step S102.
It should be noted that, in the embodiment of the present disclosure, the server identifier of the proxy server may be obtained by numbering the proxy server in the normal running state in such a sequential numbering manner as (1, 2, … n) after the proxy service area is started; in this embodiment, for uniformly distributing the data request to at least one proxy server corresponding to the target object for processing, the obtaining, according to the target component identification information and the number, the server identification of the proxy server for responding to the data request may be: performing splicing processing on the group identifier, the item identifier and the version identifier in the target member identifier information to obtain a spliced character string corresponding to the target member identifier information; obtaining a target and a value according to the information exchange flag code (ASCII, american Standard Code for Information Interchange) corresponding to each character in the spliced character string and the length of the spliced character string; and obtaining the server identification according to the target sum value and the number.
In some embodiments, the spliced character string may be obtained by means of "group identifier" + "item identifier" + "version identifier", or may be obtained by other means, for example, may be obtained by arbitrarily changing the sequence of "group identifier", "item identifier" and "version identifier" and then splicing, or may be obtained by splicing a preset character string between any two of the three in the process of splicing, which is not limited herein.
In some embodiments, the obtaining the target sum value according to the information exchange flag code corresponding to each character in the concatenation string and the length of the concatenation string may be: carrying out first summation processing on the information exchange mark codes corresponding to each character in the spliced character string to obtain a first summation value; performing second summation processing on the first summation value and the length of the spliced character string to obtain a second summation value; modulo the second sum and the number; and performing a third summation processing on the numerical value obtained after the modulo processing and a preset numerical value, and taking the numerical value obtained after the third summation processing as the server identifier, wherein the preset numerical value can be 1.
The first summation process, the second summation process and the third summation process may be directly adding the corresponding data items to be added, or may be adding each data item after performing corresponding weighting process according to practical implementation, which is not limited in particular herein.
In the embodiment of the present disclosure, the server identifier of the proxy server for responding to each data request is determined based on the target component identifier information and the number of proxy servers corresponding to the target object, and since the target component identifier information has uniqueness and the server identifier is obtained by modulo the number of proxy servers, the data request sent by the target object can be ensured to be uniformly distributed to the corresponding proxy servers for processing based on the first preset data slicing rule, so that the component processing method provided in the embodiment of the present disclosure has high availability.
It should also be noted that, in this embodiment, to further promote high availability of the method, dynamic capacity expansion of the proxy server is implemented, and in a process that the target proxy server responds to the data request, the method further includes: the method comprises the steps of sending a first detection activity data packet to other proxy servers, and receiving a second detection activity data packet sent by the other proxy servers to obtain server information of the proxy servers in a normal running state in at least one proxy server, wherein the other proxy servers are proxy servers except for a target proxy server in the at least one proxy server; under the condition that the proxy server in the fault state exists at the current moment according to the server information, the corresponding server identification is allocated to the proxy server in the normal operation state again, and the server identification set is updated according to the server identification of each of the proxy servers after being allocated again, wherein the server identification set is used for storing the server identification of the proxy server in the normal operation state.
The probe activity data packet may be a communication packet for determining an activity state of a corresponding proxy server, and may be, for example, a Heartbeat packet (Heartbeat packet).
That is, in the embodiment of the present disclosure, after each proxy server corresponding to the target object is started, a heartbeat packet may be sent at a preset time interval to determine an active state of each other, so as to obtain server information of the proxy servers in a normal running state, and a server identification set is maintained according to the server information, so as to improve accuracy and usability when determining the proxy servers for responding to the data request based on the first preset data slicing rule.
For example, it is set that 3 proxy servers in a normal running state exist at time t1, namely proxy1, proxy2 and proxy3, and corresponding server identification sets thereof are respectively: forms of { (proxy 1, 1), (proxy 2, 2), (proxy 3, 3) }; if the proxy server in the normal running state is found to be only proxy1 and proxy3 at the current t2, in order to ensure that the data request is correctly split, server identifiers may be allocated to proxy1 and proxy3 again, that is, server identifier "1" is allocated to proxy1 and server identifier "2" is allocated to proxy3, and the updated server identifier set may be: { (proxy 1, 1), (proxy 3, 2) }.
Referring to fig. 4, a first flowchart of an index identification acquisition process is provided in an embodiment of the present disclosure. As shown in fig. 4, in the embodiment of the present disclosure, the obtaining, according to the target member identification information, the index identification corresponding to the target member described in the above step S102 includes the following steps: step S401, inquiring whether an index mark corresponding to the target component mark information exists in the index data of the local cache; if the index identifier exists in the index data, executing step S402, and acquiring the index identifier from the index data; or, if the index identifier does not exist in the index data, executing step S403, generating a first index identifier acquisition request according to the target component identifier information, and sending the first index identifier acquisition request to a corresponding first bridging server, where the first bridging server includes a bridging server determined based on a second preset data slicing rule; as shown in fig. 2, the target object may correspond to at least one proxy server, where the at least one proxy server may correspond to at least one first bridge server, and each first bridge server is configured to, when receiving an index identifier acquisition request sent by any proxy server, provide, to the proxy server, an index identifier corresponding to the index identifier acquisition request.
The index data locally cached by the target proxy server may be data storing index identifiers of all components acquired by the target proxy server, for example, may be an index identifier set or an index identifier table, and is not limited herein. In implementation, the index data may be stored in a Redis database, for example, to increase the index acquisition speed.
In this embodiment, after receiving the data request sent by the target object, the target proxy server may first query the locally cached index data for whether the index identifier of the target component exists, and if not, as shown in fig. 2, a first index identifier obtaining request may be sent to an upper node, that is, the first bridge server, to obtain the index identifier. In practical implementation, the first index identifier acquisition request may be sent to the corresponding first bridge server through a second preset data slicing rule similar to the first preset data slicing rule, so as to balance the processing pressure of each bridge server, where the second preset data slicing rule is not limited in particular, and may be, for example, a rule for determining the first bridge server that is used to respond to the index identifier acquisition request sent by the proxy server and contains the component identifier information, based on the component identifier information of the component and the number of first bridge servers corresponding to the proxy server.
Referring to fig. 5, a flowchart of a target member providing process provided by an embodiment of the present disclosure is shown. As shown in fig. 5, in the above step S103, the target member may be provided to the target object by: step S501, determining whether a target component is stored in a local cache according to the index identification; in the case that the target member is stored in the local cache, step S502 is executed to provide the target member to the target object; and, in the case that the target component is not stored in the local cache, executing step S503, acquiring the target component from the interstellar file system according to the index identification, storing the target component in the local cache, and providing the target component to the target object.
That is, after the index identifier of the target member is obtained, whether the target member has been cached locally, that is, whether the target member has been downloaded from the interstellar file system, may be determined according to the index identifier, and if so, the target member may be provided to the target object directly based on the local cache; and if the target component is not cached locally, i.e. the target component has not been downloaded from the interstellar file system, based on the index identification, downloading the target component from the interstellar file system, storing the target component in the local cache, and providing the target component to the target object.
The above is an explanation of how the target member is provided to the target object after receiving a data request for acquiring the target member sent by the target object; it should be noted that, the component processing method provided in the embodiment of the present disclosure may also support the uploading target component, that is, in some embodiments, the request type of the data request may be obtained before executing the step S102; in the case where the request type indicates that the data request is a component acquisition class request, the above-described step S102 is performed; and when the request type indicates that the data request is a member uploading request, that is, a data request for requesting to upload a target member, the target proxy server may generate a member uploading request according to target member identification information, and send the member uploading request to a corresponding first bridge server, where the member uploading request is used to request the first bridge server to upload the target member to an interstellar file system, and after receiving a response message sent by the first bridge server and indicating that the uploading of the target member is successful, obtain an index identifier of the target member from the response message, and store the index identifier in a local cache. It should be noted that, in the embodiment of the present disclosure, after receiving the target component, the first bridge server does not upload the target component to a preset component repository, that is, an open source component repository, but uploads the target component to an interstellar file system if it is determined that the preset component repository does not exist the target component, and provides the index identifier thereof to the target proxy server and other first bridge servers corresponding to the target object, so as to share the target component in the enterprise, thereby ensuring the security of enterprise data.
In the embodiment of the present disclosure, another component processing method is further provided, referring to fig. 6, which is a flowchart of another component processing method provided in the embodiment of the present disclosure, corresponding to the component processing method applied to the target proxy server corresponding to the target object. The component processing method may be applied to the first bridge server 1300 corresponding to the proxy server, that is, the pv-bridge, as shown in fig. 2, where the first bridge server may be a physical server, or may also be a virtual server, and is not limited herein.
As shown in fig. 6, the component processing method may include the following steps S601 to S604.
In step S601, a first index identifier acquisition request sent by a target proxy server is received, where the first index identifier acquisition request is used to request to acquire an index identifier corresponding to a target component, the target object is used to construct a software item based on the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule.
Step S602, obtaining target member identification information of the target member from the first index identification obtaining request.
Step S603, obtaining an index identifier according to the target member identifier information, where the index identifier is provided to the first bridge server by a corresponding second bridge server, and the second bridge server is configured to provide the index identifier to the first bridge server in response to the second index identifier obtaining request sent by the first bridge server.
In step S604, an index identifier is provided to the target proxy server, the index identifier being used by the target proxy server to obtain the target component and provide the target component to the target object.
Referring to fig. 7, a second flowchart of an index identification acquisition process is provided in an embodiment of the present disclosure. As shown in fig. 7, in the embodiment of the present disclosure, after receiving the first index identifier acquisition request sent by the target proxy server, the first bridge server may obtain the index identifier according to the following steps: step S701, inquiring whether an index mark corresponding to the target component mark information exists in the index data of the local cache; if the index identifier exists in the index data, step S702 is executed to obtain the index identifier from the index data; or, if the index identifier does not exist in the index data, step S703 is executed to generate a second index identifier acquisition request according to the target component identifier information, and send the second index identifier acquisition request to a corresponding second bridge server, where the second bridge server includes a second bridge server determined based on a third preset data slicing rule; as shown in fig. 2, the first bridge server may correspond to at least one second bridge server, where each second bridge server is configured to provide, when receiving the index identifier obtaining request, a corresponding index identifier to the first bridge server corresponding to the index identifier obtaining request.
In an embodiment of the present disclosure, the third preset data allocation rule may be a rule for determining, based on the component identification information of the component and the number of second bridge servers corresponding to the first bridge server, a second bridge server for responding to an index identification acquisition request including the component identification information sent by the first bridge server.
In addition, in this embodiment, in the process of receiving the first index identification acquisition request, the method further includes: receiving a component uploading request sent by a target proxy server; responding to a component uploading request, and inquiring whether the target component exists in a preset component warehouse according to target component identification information; uploading the target component to an interstellar file system under the condition that the target component does not exist in the preset component warehouse, and receiving an index identifier corresponding to the target component returned by the interstellar file system; and generating a response message indicating that the uploading of the target component is successful according to the index identifier, providing the response message to the target proxy server, and pushing the index identifier to other first bridging servers corresponding to the target proxy server.
In correspondence to the above two component processing methods, in the embodiment of the present disclosure, still another component processing method is provided, please refer to fig. 8, which is a flowchart of the still another component processing method provided in the embodiment of the present disclosure. The method may be applied to the second bridge server 1400 shown in fig. 2, i.e. pu-bridge, which may be a physical server, or may be a virtual server, which is not limited herein.
As shown in fig. 8, the component processing method includes the following steps S801 to S804.
Step S801, a second index identifier obtaining request sent by the first bridge server is received, where the second index identifier obtaining request is used to obtain an index identifier corresponding to the target member.
Step S802, acquiring target component identification information of the target component from the second index identification acquisition request.
Step S803, under the condition that it is determined that the index identifier does not exist in the local cache based on the target member identifier information, obtaining the target member from the preset member repository according to the target member identifier information, and obtaining the index identifier returned by the interstellar file system by uploading the target member to the interstellar file system.
In step S804, an index identifier is provided to the first bridge server, where the first bridge server is configured to provide the index identifier to the target proxy server, where the index identifier is configured to obtain the target member by the target proxy server, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on the first preset data slicing rule.
It will be appreciated that the above-mentioned method embodiments of the present disclosure may be combined with each other to form a combined embodiment without departing from the principle logic, and are limited to the description of the present disclosure. It will be appreciated by those skilled in the art that in the above-described methods of the embodiments, the particular order of execution of the steps should be determined by their function and possible inherent logic.
In addition, the disclosure further provides a component processing apparatus, an electronic device, and a computer readable storage medium, where the foregoing may be used to implement the corresponding component processing method provided by the disclosure, and corresponding technical schemes and descriptions and corresponding descriptions referring to method parts are not repeated.
Fig. 9 is a block diagram of a component handling device provided in an embodiment of the present disclosure. The device can be applied to a target proxy server.
Referring to fig. 9, an embodiment of the present disclosure provides a component handling apparatus 900 including: a request unit 901, a response unit 902, and a processing unit 903.
The request unit 901 is configured to receive a data request sent by a target object, where the data request includes a request for obtaining a target component, the data request includes target component identification information for identifying the target component, and the target proxy server is a server that is determined from at least one proxy server based on a first preset data slicing rule and is used for responding to the data request.
The response unit 902 is configured to obtain, in response to a data request, an index identifier corresponding to a target member according to target member identifier information, where the index identifier is used to identify the target member stored in an interstellar file system, the index identifier is provided to a target proxy server by a corresponding first bridge server, the first bridge server is configured to provide, in response to a first index identifier obtaining request sent by the target proxy server, the index identifier to the target proxy server, and the interstellar file system stores a plurality of members.
The processing unit 903 is configured to provide a target component to the target object according to the index identifier, where the target component is used for constructing the software item by the target object.
In some embodiments, the first preset data slicing rule is a rule for determining a proxy server for responding to a data request including component identification information sent by an object based on component identification information of a component and the number of proxy servers corresponding to the object; the apparatus 900 further comprises a verification unit for: after receiving the data request, obtaining the number of at least one proxy server; according to the target component identification information and the number, acquiring a server identification of a proxy server for responding to the data request; checking the consistency of the server identifier and the target server identifier of the target proxy server, and executing the index identifier step of responding to the data request and acquiring the corresponding target member according to the target member identifier information under the condition that the server identifier and the target server identifier are consistent; and forwarding the data request to a proxy server corresponding to the server identifier for processing under the condition that the server identifier and the target server identifier are inconsistent.
In some embodiments, the target component identification information includes a group identification, an item identification, and a version identification corresponding to the target component; the verification unit, when acquiring the server identification of the proxy server for responding to the data request according to the target component identification information and the number, may be configured to: performing splicing processing on the group identifier, the item identifier and the version identifier to obtain a spliced character string corresponding to the target component identifier information; obtaining a target and a value according to the information exchange standard code corresponding to each character in the spliced character string and the length of the spliced character string; and obtaining the server identification according to the target, the value and the number.
In some embodiments, when obtaining the index identifier corresponding to the target component according to the target component identifier information, the response unit 902 may be configured to: inquiring whether index identifiers corresponding to the target component identification information exist in the index data of the local cache; under the condition that index identifiers exist in the index data, acquiring the index identifiers from the index data; or under the condition that the index identification does not exist in the index data, generating a first index identification acquisition request according to the target component identification information, and sending the first index identification acquisition request to a corresponding first bridging server, wherein one bridging server comprises a bridging server determined based on a second preset data slicing rule; the at least one proxy server corresponds to at least one first bridging server, and each first bridging server is used for providing the index identifier corresponding to the index identifier acquisition request to the proxy server under the condition that the index identifier acquisition request sent by any proxy server is received.
In some embodiments, the processing unit 903, when providing the target component to the target object according to the index identification, may be configured to: determining whether a target component is stored in the local cache according to the index identifier; providing the target component to the target object in the case that the target component is stored in the local cache; or under the condition that the target component is not stored in the local cache, acquiring the target component from the interstellar file system according to the index identification, and storing the target component in the local cache.
In some embodiments, the apparatus 900 further comprises a detection unit for: the method comprises the steps of sending a first detection activity data packet to other proxy servers, and receiving a second detection activity data packet sent by the other proxy servers to obtain server information of the proxy servers in a normal running state in at least one proxy server, wherein the other proxy servers are proxy servers except for a target proxy server in the at least one proxy server; under the condition that the proxy server in the fault state exists at the current moment according to the server information, the corresponding server identification is allocated to the proxy server in the normal operation state again, and the server identification set is updated according to the server identification of each of the proxy servers after being allocated again, wherein the server identification set is used for storing the server identification of the proxy server in the normal operation state.
In some embodiments, the apparatus 900 further includes an uploading unit configured to: acquiring a request type of a data request; when the request type indicates that the data request is a component acquisition type request, executing an index identification step of responding to the data request and acquiring a target component according to target component identification information; or when the request type indicates that the data request is a component uploading request, generating a component uploading request according to the target component identification information, and sending the component uploading request to a corresponding first bridge server, wherein the component uploading request is used for requesting the first bridge server to upload the target component to an interstellar file system, and after receiving a response message sent by the first bridge server and indicating that the uploading of the target component is successful, acquiring an index identification of the target component from the response message, and storing the index identification in a local cache.
Fig. 10 is a block diagram of another component handling device provided by an embodiment of the present disclosure. The device can be applied to a first bridging server.
Referring to fig. 10, an embodiment of the present disclosure provides a component handling apparatus 1000, the apparatus 1000 including: a first receiving unit 1001, a first identification information acquiring unit 1002, a first index identification obtaining unit 1003, and a first index identification providing unit 1004.
The first receiving unit 1001 is configured to receive a first index identifier obtaining request sent by a target proxy server, where the first index identifier obtaining request is used to request to obtain an index identifier corresponding to a target component, the target object is used to construct a software item based on the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on a first preset data slicing rule.
The first identification information obtaining unit 1002 is configured to obtain, from the first index identification obtaining request, target component identification information of the target component.
The first index identifier obtaining unit 1003 is configured to obtain an index identifier according to the target component identifier information, where the index identifier is provided to the first bridge server by a corresponding second bridge server, and the second bridge server is configured to provide the index identifier to the first bridge server in response to a second index identifier obtaining request sent by the first bridge server.
The first index identification providing unit 1004 is configured to provide an index identification to the target proxy server, where the index identification is used by the target proxy server to obtain the target component and provide the target component to the target object.
In some embodiments, the first index identity obtaining unit 1003, when obtaining the index identity according to the target component identity information, may be configured to: inquiring whether index identifiers corresponding to the target component identification information exist in the index data of the local cache; under the condition that index identifiers exist in the index data, acquiring the index identifiers from the index data; or under the condition that the index identification does not exist in the index data, generating a second index identification acquisition request according to the target component identification information, and sending the second index identification acquisition request to a corresponding second bridging server, wherein the second bridging server comprises a second bridging server determined based on a third preset data slicing rule; the first bridging server corresponds to at least one second bridging server, and each second bridging server is used for providing a corresponding index identifier to the first bridging server corresponding to the index identifier acquisition request under the condition that the index identifier acquisition request is received.
In some embodiments, the apparatus 1000 further includes an upload response unit configured to: receiving a component uploading request sent by a target proxy server; responding to a component uploading request, and inquiring whether a target component exists in a preset component warehouse according to target component identification information; uploading the target component to an interstellar file system under the condition that the target component does not exist in a preset component warehouse, and receiving an index identifier corresponding to the target component returned by the interstellar file system; and generating a response message indicating that the uploading of the target component is successful according to the index identification, and providing the response message to the target proxy server.
Fig. 11 is a block diagram of yet another component handling device provided by an embodiment of the present disclosure. The device can be applied to a second bridging server.
Referring to fig. 11, an embodiment of the present disclosure provides a component handling apparatus 1100, the apparatus comprising: a second receiving unit 1101, a second identification information acquiring unit 1102, a second index identification obtaining unit 1103, and a second index identification providing unit 1104.
The second receiving unit 1101 is configured to receive a second index identifier obtaining request sent by the first bridge server, where the second index identifier obtaining request is used to obtain an index identifier corresponding to the target member.
The second identification information obtaining unit 1102 is configured to obtain, from the second index identification obtaining request, target component identification information of the target component.
The second index identifier obtaining unit 1103 is configured to obtain, when it is determined that the index identifier does not exist in the local cache based on the target member identifier information, a target member from a preset member repository according to the target member identifier information, and obtain, by uploading the target member to the interstellar file system, the index identifier returned by the interstellar file system.
The second index identifier providing unit 1104 is configured to provide an index identifier to a first bridge server, where the first bridge server is configured to provide the index identifier to a target proxy server, the index identifier is used by the target proxy server to obtain the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to the target object based on the first preset data slicing rule.
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Referring to fig. 12, an embodiment of the present disclosure provides an electronic device 1200 including: at least one processor 1201; at least one memory 1202, and one or more I/O interfaces 1203, coupled between the processor 1201 and the memory 1202; the memory 1202 stores one or more computer programs executable by the at least one processor 1201, and the one or more computer programs are executed by the at least one processor 1201 to enable the at least one processor 1201 to perform the component processing method described above.
The disclosed embodiments also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described component processing method. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium.
Embodiments of the present disclosure also provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when executed in a processor of an electronic device, performs the above-described component processing method.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer-readable storage media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, random Access Memory (RAM), read Only Memory (ROM), erasable Programmable Read Only Memory (EPROM), static Random Access Memory (SRAM), flash memory or other memory technology, portable compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and may include any information delivery media.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
The computer program product described herein may be embodied in hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purpose of limitation. In some instances, it will be apparent to one skilled in the art that features, characteristics, and/or elements described in connection with a particular embodiment may be used alone or in combination with other embodiments unless explicitly stated otherwise. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the disclosure as set forth in the appended claims.

Claims (12)

1. A component processing method, applied to a target proxy server, comprising:
receiving a data request sent by a target object, wherein the data request comprises a request for acquiring a target component, the data request comprises target component identification information for identifying the target component, and the target proxy server is a server which is determined from at least one proxy server based on a first preset data slicing rule and is used for responding to the data request;
Acquiring an index identifier corresponding to the target component according to the target component identifier information in response to the data request, wherein the index identifier is used for identifying the target component stored in an interstellar file system, the index identifier is provided to the target proxy server by a corresponding first bridge server, the first bridge server is used for providing the index identifier to the target proxy server in response to a first index identifier acquisition request sent by the target proxy server, and the interstellar file system stores a plurality of components;
and providing the target component to the target object according to the index identifier, wherein the target component is used for constructing a software item by the target object.
2. The method of claim 1, wherein the first preset data slicing rule is a rule for determining a proxy server for responding to a data request including component identification information sent by an object based on the component identification information of the component and the number of proxy servers to which the object corresponds;
after receiving the data request, the method further comprises:
Acquiring the number of the at least one proxy server;
acquiring a server identification of a proxy server for responding to the data request according to the target component identification information and the number;
checking the consistency of the server identifier and the target server identifier of the target proxy server, and executing the step of responding to the data request and acquiring index identifiers corresponding to the target members according to the target member identifier information under the condition that the server identifier and the target server identifier are consistent; the method comprises the steps of,
and forwarding the data request to a proxy server corresponding to the server identifier for processing under the condition that the server identifier is inconsistent with the target server identifier.
3. The method of claim 2, wherein the target component identification information includes a group identification, an item identification, and a version identification corresponding to the target component;
the obtaining, according to the target component identification information and the number, a server identification of a proxy server for responding to the data request, including:
performing splicing processing on the group identifier, the item identifier and the version identifier to obtain a spliced character string corresponding to the target member identifier information;
Obtaining a target and a value according to the information exchange standard code corresponding to each character in the spliced character string and the length of the spliced character string;
and obtaining the server identification according to the target sum value and the number.
4. The method according to claim 1, wherein the obtaining, according to the target member identification information, the index identification corresponding to the target member includes:
inquiring whether index identifiers corresponding to the target component identification information exist in the locally cached index data;
acquiring the index identifier from the index data under the condition that the index identifier exists in the index data;
generating a first index identification acquisition request according to the target component identification information under the condition that the index identification does not exist in the index data, and sending the first index identification acquisition request to the first bridging server, wherein the first bridging server comprises a bridging server determined based on a second preset data slicing rule;
the at least one proxy server corresponds to at least one first bridge server, and each first bridge server is configured to provide, when receiving an index identifier acquisition request sent by any one proxy server, an index identifier corresponding to the index identifier acquisition request to the proxy server.
5. The method of any of claims 1-4, wherein the providing the target component to the target object according to the index identification comprises:
determining whether the target component is stored in the local cache according to the index identifier;
providing the target component to the target object in the case that the target component is stored in a local cache;
and under the condition that the target component is not stored in the local cache, acquiring the target component from the interstellar file system according to the index identifier, storing the target component into the local cache, and providing the target component to the target object.
6. A component processing method, applied to a first bridge server, the method comprising:
receiving a first index identifier acquisition request sent by a target proxy server, wherein the first index identifier acquisition request is used for requesting to acquire an index identifier corresponding to a target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to a target object based on a first preset data slicing rule;
acquiring target component identification information of the target component from the first index identification acquisition request;
Obtaining the index identifier according to the target member identifier information, wherein the index identifier is provided to the first bridge server by a corresponding second bridge server, and the second bridge server is used for responding to a second index identifier obtaining request sent by the first bridge server and providing the index identifier to the first bridge server;
the index identification is provided to the target proxy server, the index identification being used by the target proxy server to obtain the target component and provide the target component to the target object.
7. The method of claim 6, wherein the obtaining the index identity from the target component identity information comprises:
inquiring whether index identifiers corresponding to the target component identification information exist in the locally cached index data;
acquiring the index identifier from the index data under the condition that the index identifier exists in the index data; or,
generating a second index identification acquisition request according to the target component identification information under the condition that the index identification does not exist in the index data, and sending the second index identification acquisition request to a corresponding second bridging server, wherein the second bridging server comprises a second bridging server determined based on a third preset data slicing rule;
The first bridging server corresponds to at least one second bridging server, and each second bridging server is used for providing a corresponding index identifier to the first bridging server corresponding to the index identifier acquisition request under the condition that the index identifier acquisition request is received.
8. A component processing method, applied to a second bridge server, the method comprising:
receiving a second index identifier acquisition request sent by a first bridge server, wherein the second index identifier acquisition request is used for acquiring an index identifier corresponding to a target component;
acquiring target component identification information of the target component from the second index identification acquisition request;
under the condition that the index identifier does not exist in a local cache based on the target component identifier information, acquiring the target component from a preset component warehouse according to the target component identifier information, and acquiring the index identifier returned by the interstellar file system by uploading the target component to the interstellar file system;
and providing the index identifier to the first bridge server, wherein the first bridge server is used for providing the index identifier to a target proxy server, the index identifier is used for the target proxy server to acquire the target component, and the target proxy server is a proxy server determined from at least one proxy server corresponding to a target object based on a first preset data slicing rule.
9. A component handling apparatus for use with a target proxy server, comprising:
a request unit, configured to receive a data request sent by a target object, where the data request includes a request for obtaining a target component, the data request includes target component identification information for identifying the target component, and the target proxy server is a server determined from at least one proxy server based on a first preset data slicing rule, and is configured to respond to the data request;
a response unit, configured to obtain, in response to the data request, an index identifier corresponding to the target member according to the target member identifier information, where the index identifier is used to identify the target member stored in an interstellar file system, the index identifier is provided to the target proxy server by a corresponding first bridge server, the first bridge server is configured to provide, in response to a first index identifier obtaining request sent by the target proxy server, the index identifier to the target proxy server, and the interstellar file system stores a plurality of members;
and the processing unit is used for providing the target component to the target object according to the index identification, wherein the target component is used for constructing a software project by the target object.
10. A component handling system, comprising:
a target object, the target object being used to construct a software project;
at least one proxy corresponding to the target object, the proxy being adapted to perform the component processing method of any one of claims 1-5;
at least one first bridge server corresponding to the at least one proxy server, the first bridge server being configured to perform the component handling method according to any one of claims 6-7;
at least one second bridge server corresponding to the at least one first bridge server, the second bridge server being configured to perform the component processing method of claim 8; the method comprises the steps of,
and the interstellar file system is used for storing the components uploaded by the second bridge server and providing index identifiers of the components to the second bridge server.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores one or more computer programs executable by the at least one processor to enable the at least one processor to perform the component handling method of any of claims 1-8.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the component handling method according to any of claims 1-8.
CN202211137374.9A 2022-09-19 2022-09-19 Component processing method and device, electronic equipment and computer readable storage medium Pending CN117763053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211137374.9A CN117763053A (en) 2022-09-19 2022-09-19 Component processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211137374.9A CN117763053A (en) 2022-09-19 2022-09-19 Component processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117763053A true CN117763053A (en) 2024-03-26

Family

ID=90320644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211137374.9A Pending CN117763053A (en) 2022-09-19 2022-09-19 Component processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117763053A (en)

Similar Documents

Publication Publication Date Title
US8069224B2 (en) Method, equipment and system for resource acquisition
CN111078504A (en) Distributed call chain tracking method and device, computer equipment and storage medium
US10908834B2 (en) Load balancing for scalable storage system
US20180152339A1 (en) APPLICATION RESILIENCY USING APIs
CN114911519A (en) Shared software library for computing devices
CN113783922A (en) Load balancing method, system and device
US10282120B2 (en) Method, apparatus and system for inserting disk
US11249854B2 (en) Method and device for failover in HBase system, and non-transitory computer-readable storage medium
US8543680B2 (en) Migrating device management between object managers
CN115516840A (en) Information processing method, device, system, medium, chip and program
CN112882792B (en) Information loading method, computer device and storage medium
CN111338834B (en) Data storage method and device
US10877994B2 (en) Identifier based data replication
CN116303608A (en) Data processing method and device for application service
US11847242B2 (en) DCF node configuration for device data
CN108989072B (en) Method and device for deploying, managing and calling assembly
CN111444148B (en) Data transmission method and device based on MapReduce
CN112596897A (en) Method and system for multi-tenant isolation
CN117763053A (en) Component processing method and device, electronic equipment and computer readable storage medium
US10481963B1 (en) Load-balancing for achieving transaction fault tolerance
US11307912B1 (en) Forward message compatibility safety in producer-consumer systems
CN110677497B (en) Network medium distribution method and device
US10511656B1 (en) Log information transmission integrity
CN112910675A (en) Equipment management method, device and system
CN111314457B (en) Method and device for setting virtual private cloud

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination