Disclosure of Invention
The application provides a prefire testing method, a prefire testing device, prefire testing equipment and a storage medium, which are used for solving the problems that the prefire testing is carried out in a prefire environment, the prefire environment is required to be deployed independently, the cost is high and the flexibility is low.
In a first aspect, an embodiment of the present application provides a prefire method, including:
acquiring a resource access request of a requester, wherein the resource access request carries an identifier of the requester and an identifier of a resource bit for requesting access;
after determining that the requester belongs to a prefire group according to the identifier of the requester, acquiring a prefire link according to the identifier of the resource bit requested to be accessed;
and returning the prefire link to the requester.
Optionally, before obtaining the resource access request of the requester, the method further includes:
and generating a prefire link corresponding to the identification of the resource bit, and setting a group corresponding to the prefire link as a prefire group.
Optionally, generating a prefire link corresponding to the identification of the resource bit includes:
reading published data corresponding to the identification of the resource bit;
modifying the read data to generate data to be distributed corresponding to the identification of the resource bit;
and generating a prefire link corresponding to the identification of the resource bit based on the data to be distributed.
Optionally, after returning the prefire link to the requestor, the method further comprises:
after the message of successful pre-sending test is obtained, the data to be sent is updated to the production environment, the pre-sending test link is converted into a formal sending link, and the corresponding group is modified into a formal sending group.
Optionally, after updating the data to be distributed to the production environment, the method further includes:
and marking the data to be distributed as invalid data.
Optionally, updating the data to be distributed to a production environment includes:
and replacing published data corresponding to the identification of the resource bit by the data to be published.
Optionally, after converting the prefire link into the formal issue link, the method further comprises:
and replacing the original published links with the converted formal published links.
In a second aspect, an embodiment of the present application provides a prefire device, including:
the resource access module is used for acquiring a resource access request of a requester, wherein the resource access request carries an identifier of the requester and an identifier of a resource bit for requesting access;
the processing module is used for acquiring a prefire link according to the identification of the resource bit accessed by the request after determining that the requester belongs to the prefire group according to the identification of the requester;
and the prefire module is used for returning the prefire link to the requester.
In a third aspect, an embodiment of the present application provides an electronic device, including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory, and implement the prefire method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, where the computer program implements the prefire method of the first aspect when executed by a processor.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, after the resource access request of the requester is acquired, the pre-launch test link of the resource bit requested to be accessed is returned to the requester after the requester is determined to belong to the pre-launch test group, and the pre-launch test is carried out, so that the pre-launch test link is only oriented to the pre-launch test group by setting the pre-launch test group, the pre-launch test can be carried out without independently deploying a pre-launch environment, the pre-launch test cost is reduced, the pre-launch test process does not depend on the pre-launch test environment, and the flexibility of the pre-launch test is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application provides a prefire testing method which is mainly applied to a background server of a software system.
In the prefire testing method provided by the embodiment of the application, the formal release group and the prefire testing group are introduced, and the two groups are mutually exclusive, namely, the two groups cannot be selected at the same time. The formal release group corresponds to the formal production environment requirement, and generally comprises all people. The prefire group corresponds to the prefire requirement, and is generally a related person in the prefire item group.
The formal release links facing the production environment are configured to correspond to formal release groups, and the prefire links facing the prefire are configured to correspond to prefire groups.
Based on the above definition, as shown in fig. 1, the detailed procedure of the prefire test in the embodiment of the present application is as follows:
step 101, a resource access request of a requester is obtained.
The resource access request of the requester carries the identifier of the requester and the identifier of the resource bit for requesting access.
Specifically, one resource bit corresponds to data of one commodity, which varies from group to group, that is, data when faced to a prefire group is different from data when faced to a formal issue group. For example, the resource bit corresponds to the data of the commodity, and the data of the background server configured commodity includes a resource bit label, an attribute of the resource bit, and the like, and the attribute includes a jump link (a formal release link or a prefire link), a yield description, a document description, and the like.
In the embodiment of the application, before the resource access request of the requester is acquired, the prefire link corresponding to the identifier of the resource bit is generated, and the group corresponding to the prefire link is set as the prefire group.
In one embodiment, the specific process of generating the prefire links is as follows: reading published data corresponding to the identification of the resource bit; modifying the read data to generate data to be distributed corresponding to the identification of the resource bit; and generating a prefire link corresponding to the identification of the resource bit based on the data to be distributed.
For example, a copy button may be set on a display interface of the background server, after a worker in the pre-release project group uses the copy button to release data of the selected resource bit, the background server may copy the release data, the worker in the pre-release project group modifies the data obtained by the copying, and the background server may generate a pre-release test link based on the modified data.
Step 102, after determining that the requester belongs to the prefire group according to the identifier of the requester, obtaining the prefire link according to the identifier of the resource bit accessed by the request.
In a specific embodiment, after acquiring the identifier of the requester, the background server determines whether the identifier of the requester belongs to a prefire group, and if the identifier of the requester belongs to the prefire group and the resource bit requested to be accessed by the requester corresponds to the prefire link, returns the prefire link of the resource bit to the requester.
It should be noted that if one resource bit corresponds to a prefire link and a formal release link at the same time, if it is determined that the identifier of the requester belongs to a formal release group and the resource bit requested to be accessed by the requester corresponds to a formal release link, the formal release link of the resource bit is returned to the requester; if the identification of the requester belongs to the prefire group and the resource bit requested to be accessed by the requester corresponds to the prefire link, the prefire link of the resource bit is returned to the requester.
If only the pre-issued test link exists in one resource bit, the main issuing link is not returned to the requester even if the requester is judged to belong to the main issuing group, and the main issuing link is returned to the requester after waiting for the pre-issued test to pass the main issuing link.
The method comprises the steps of pre-configuring a pre-launch test group in a background server, wherein the pre-launch test group comprises the identification of each pre-launch test member, and pre-configuring a formal release group, wherein the formal release group comprises the identification of each formal release member. When the background server distributes groups for data, only one group can be configured for one piece of data, either a prefire group or a formal release group is adopted, and the two groups are not allowed to be configured for the same piece of data at the same time, so that the aim of crowd isolation is achieved.
The identity of the requester is information capable of uniquely determining the identity of the requester, for example, a pin code used by the requester at the time of access, or a user name of the requester, or the like.
Step 103, returning the prefire link to the requestor.
And returning the prefire link to the requester, wherein in the process of performing the prefire, the data of the resource bit corresponding to the prefire link can be changed according to the need, and the configuration of the prefire group corresponding to the prefire link is kept unchanged.
In a specific embodiment, after the pre-launch test is performed, if the pre-launch test is determined to pass, updating the data to be launched to the production environment, converting the pre-launch test link into a formal release link, and modifying a group corresponding to the link into a formal release group by a worker to realize formal release of the data.
In one embodiment, after the data to be distributed is updated to the production environment, the data to be distributed may be further marked as invalid data.
For example, a replacement button is set on a display interface of the background server, and after the replacement button is used by a worker in the pre-release project group for the pre-release test data of the selected resource bit, the background server can synchronize the pre-release test data into the production environment and mark the pre-release test data as invalid.
In a specific embodiment, the method for updating the data to be distributed to the production environment may be to replace the distributed data corresponding to the identifier of the resource bit with the data to be distributed.
In a specific embodiment, after the prefire link is converted into the formal release link, the converted formal release link is adopted to replace the resource bit corresponding to the prefire link to identify the original released link.
According to the method provided by the embodiment of the application, after the resource access request of the requester is acquired, the pre-launch test link of the resource bit requested to be accessed is returned to the requester after the requester is determined to belong to the pre-launch test group, and the pre-launch test is carried out, so that the pre-launch test link is only oriented to the pre-launch test group by setting the pre-launch test group, the pre-launch test can be carried out without independently deploying a pre-launch environment, the pre-launch test cost is reduced, the pre-launch test process does not depend on the pre-launch test environment, and the flexibility of the pre-launch test is improved.
In the following description of the pre-issuing test process of commodity data with reference to fig. 2, it should be noted that, in the process described in fig. 2, data of a formal issuing link is adjusted, the data of the formal issuing link is read as source data without affecting the use of the formal issuing link by a user, the source data is modified to generate a pre-issuing test link, and after the pre-issuing test is successful, the pre-issuing test link is converted into the formal issuing link to replace the original formal issuing link. Therefore, the use of the original formally released links is not influenced during the pre-release test, the seamless butt joint of the new version and the old version is ensured, and the user experience is improved.
Step 201, an operator configures operation information such as commodity attributes, namely commodity data in a production environment needs to be modified;
step 202, a background server reads source data of goods to be modified in a production environment, sets a formal release group corresponding to the source data, and reads data corresponding to a prefire group, specifically, a worker of the prefire item group clicks a copy button on a display interface of the background server, and the background server copies the source data of the goods to be modified in the production environment and reads the source data;
step 203, the background server sets the identification of the member included in the formal release group and sets the identification of the member included in the prefire group;
step 204, the background server modifies the read source data based on the read source data to generate a prefire link;
step 205, the terminal sends a resource access request of a requester to a background server, wherein the resource access request carries an identifier of the requester and an identifier of a resource bit for requesting access;
step 206, after the background server obtains the resource access request, judging whether the identifier of the requester carried in the resource access request belongs to a prefire group, if so, executing steps 207 to 209, otherwise, executing steps 210 to 211;
step 207, the background server returns a prefire link to the terminal;
step 208, the terminal renders the prefire link and displays the prefire link;
step 209, after obtaining a message that the pre-sending test returned by the terminal is successful, the background server synchronizes the modification of the source data by the current pre-sending test to the production environment, marks the data of the current pre-sending test as invalid, and the pre-sending test process is ended;
step 210, the background server returns a formal release link to the terminal;
step 211, the terminal renders the formal release link and displays the formal release link.
Based on the same conception, the embodiment of the present application further provides a prefire testing device, and the specific implementation of the device may be referred to the description of the embodiment of the method, and the repetition is omitted, as shown in fig. 3, where the device mainly includes:
an obtaining module 301, configured to obtain a resource access request of a requester, where the resource access request carries an identifier of the requester and an identifier of a resource bit that requests access;
the processing module 302 is configured to obtain a prefire link according to the identifier of the resource bit requested to be accessed after determining that the requester belongs to the prefire group according to the identifier of the requester;
and the prefire module 303 is configured to return the prefire link to the requester.
In a specific embodiment, the device further includes a generating module, configured to generate a prefire link corresponding to the identifier of the resource bit before the obtaining module obtains the resource access request of the requester, and set a group corresponding to the prefire link as a prefire group.
In a specific embodiment, the generating module is specifically configured to:
reading published data corresponding to the identification of the resource bit;
modifying the read data to generate data to be distributed corresponding to the identification of the resource bit;
and generating a prefire link corresponding to the identification of the resource bit based on the data to be distributed.
Based on the same conception, the embodiment of the application also provides an electronic device, as shown in fig. 4, which mainly comprises: processor 401, communication interface 402, memory 403 and communication bus 404, wherein processor 401, communication interface 402 and memory 403 accomplish the communication each other through communication bus 404. The memory 403 stores a program executable by the processor 401, and the processor 401 executes the program stored in the memory 403 to implement the following steps: acquiring a resource access request of a requester, wherein the resource access request carries an identifier of the requester and an identifier of a resource bit for requesting access; after determining that the requester belongs to a prefire group according to the identifier of the requester, acquiring a prefire link according to the identifier of the resource bit requested to be accessed; and returning the prefire link to the requester.
The communication bus 404 mentioned in the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated to PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated to EISA) bus, or the like. The communication bus 404 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
The communication interface 402 is used for communication between the electronic device and other devices described above.
The memory 403 may include a random access memory (Random Access Memory, abbreviated as RAM) or may include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Alternatively, the memory may be at least one memory device located remotely from the aforementioned processor 401.
The processor 401 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), a digital signal processor (Digital Signal Processing, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
In a further embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the prefire method described in the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, by a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, microwave, etc.) means from one website, computer, server, or data center to another. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape, etc.), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.