CN115481455A - Method and system for rapidly preparing assembly and readable storage medium - Google Patents

Method and system for rapidly preparing assembly and readable storage medium Download PDF

Info

Publication number
CN115481455A
CN115481455A CN202211155728.2A CN202211155728A CN115481455A CN 115481455 A CN115481455 A CN 115481455A CN 202211155728 A CN202211155728 A CN 202211155728A CN 115481455 A CN115481455 A CN 115481455A
Authority
CN
China
Prior art keywords
target
component
information
data
target component
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
CN202211155728.2A
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.)
Fengtai Technology Beijing Co ltd
Original Assignee
Fengtai Technology Beijing 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 Fengtai Technology Beijing Co ltd filed Critical Fengtai Technology Beijing Co ltd
Priority to CN202211155728.2A priority Critical patent/CN115481455A/en
Publication of CN115481455A publication Critical patent/CN115481455A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method and a system for rapidly preparing a component and a readable storage medium. The method comprises the following steps: after receiving a preparation request input by a user, responding to the preparation request, and acquiring first project data of a target test scene; acquiring a first target assembly in a target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene; sending data of a first target component to the cloud platform, wherein the data of the first target component is used for indicating the cloud platform to generate the first target component; receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information; wherein the first item data includes data of the first target component. According to the method and the device, the components which are not generated in the target test scene and the corresponding updating states are generated in the data layer, the components can be rapidly prepared, and the construction efficiency is improved.

Description

Method and system for rapidly preparing assembly and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and a system for quickly preparing a component, and a readable storage medium.
Background
At present, with the continuous increase of equipment of an industrial control system, corresponding simulation modeling is also continuously increased, so that the problems of difficult modeling, lack of core processing and the like exist in the preparation of scene resources, and the preparation efficiency of the scene equipment is low.
Disclosure of Invention
The embodiment of the application provides a method, a system, a readable storage medium and a computer program product for quickly preparing a component, which can solve the problem of low preparation efficiency of scene equipment.
In a first aspect, an embodiment of the present application provides a method for quickly preparing a component, where the method is applied to an electronic device, and the method includes:
after receiving a preparation request input by a user, responding to the preparation request, and acquiring first project data of a target test scene;
acquiring a first target assembly in the target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene;
sending the data of the first target component to a cloud platform, wherein the data of the first target component is used for instructing the cloud platform to generate the first target component;
receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information;
wherein the first item data comprises data of the first target component.
Optionally, the preparation information includes clone information and first boot information;
the receiving preparation information returned by the cloud platform and updating the state of the first target assembly according to the preparation information includes:
after the data of the first target component is sent to a clone component message queue, clone information returned by the clone component message queue is received, whether the first target component is cloned successfully or not is determined according to the clone information, and the clone information is generated by the cloud platform after the first target component is generated according to the data of the first target component;
if the cloning is determined to be successful, acquiring corresponding first virtual identification information, and updating the state of the first target assembly to be a cloning success state;
sending the first virtual identification signal to a starting component message queue;
receiving a first boot message returned by the boot component message queue, and determining whether the boot of the first target component is successful according to the first boot message, wherein the first boot message is generated by the cloud platform after starting software of the first target component according to the first virtual identification information;
and if the starting is determined to be successful, updating the state of the first target assembly to be the starting state.
Optionally, the method further includes:
after receiving a restoration request input by a user, responding to the restoration request, and acquiring second project data of a test scene to be restored;
acquiring a second target assembly in the test scene to be recovered according to the second project data, wherein the second target assembly is an assembly generated in the test scene to be recovered;
sending the data of the second target component to the cloud platform, wherein the data of the second target component is used for instructing the cloud platform to restore the second target component;
and receiving restoration information returned by the cloud platform, and updating the state of the second target assembly according to the restoration information.
Optionally, the restore information includes recovery information and second boot information;
the receiving of the restoration information returned by the cloud platform and the updating of the state of the second target component according to the restoration information includes:
after the data of the second target assembly is sent to a recovery assembly message queue, recovery information returned by the recovery assembly message queue is received, whether the second target assembly is recovered successfully or not is determined according to the recovery information, and the recovery information is generated by the cloud platform after the second target assembly is recovered according to the data of the second target assembly;
if the recovery is determined to be successful, acquiring corresponding second virtual identification information, and updating the state of the second target assembly to be a recovery successful state;
sending the second virtual identification signal to the boot component message queue;
receiving a second boot message returned by the boot component message queue, and determining whether the boot of the second target component is successful according to the second boot message, wherein the second boot message is generated by the cloud platform after the software of the second target component is started according to the second virtual identification information;
and if the boot is determined to be successful, updating the state of the second target assembly to be the boot state.
In a second aspect, an embodiment of the present application provides a method for quickly preparing an assembly, which is applied to a cloud platform, and includes:
receiving data from a first target component of an electronic device;
and generating the first target assembly according to the data of the first target assembly, and returning preparation information to the electronic equipment, wherein the preparation information is used for indicating the electronic equipment to update the state of the first target assembly.
Optionally, the generating the first target assembly according to the data of the first target assembly and returning preparation information to the electronic device includes:
receiving data from the first target component of the electronic device through a clone component message queue;
generating the first target assembly according to the data of the first target assembly, and returning clone information to the electronic equipment through the clone assembly message queue;
receiving first virtual identification information of the first target component from the electronic equipment through a starting component message queue;
starting the corresponding software in the first target assembly according to the first virtual identification information, and returning first starting information to the electronic equipment through the starting assembly message queue;
wherein the preparation information includes the clone information and the first boot information.
Optionally, the method further includes:
receiving data from a second target component of the electronic device;
and recovering the second target assembly according to the data of the second target assembly, and returning restoration information to the electronic equipment, wherein the restoration information is used for indicating the electronic equipment to update the state of the second target assembly.
Optionally, the restoring the second target component according to the data of the second target component and returning restoration information to the electronic device includes:
receiving data from the second target component of the electronic device through a restore component message queue;
recovering the second target assembly according to the data of the second target assembly, and returning recovery information to the electronic equipment through the recovery assembly message queue;
receiving second virtual identification information of the second target component from the electronic equipment through a starting component message queue;
starting the corresponding software in the second target assembly according to the second virtual identification information, and returning second starting information to the electronic equipment through the starting assembly message queue;
wherein the restore information includes the restore information and the second boot information.
In a third aspect, an embodiment of the present application provides a system for quickly preparing an assembly, including an electronic device and a cloud platform, where the electronic device is electrically connected to the cloud platform;
the electronic equipment is used for responding to a preparation request input by a user after receiving the preparation request, and acquiring first project data of a target test scene;
the first target component is also used for acquiring a first target component in the target test scene according to the first project data, wherein the first target component is a component which is not generated in the target test scene;
the data of the first target component is also sent to a cloud platform, and the first item data comprises the data of the first target component;
the cloud platform is also used for receiving preparation information returned by the cloud platform and updating the state of the first target assembly according to the preparation information;
a cloud platform to receive data from the first target component of the electronic device;
and the electronic equipment is also used for generating the first target assembly according to the data of the first target assembly and returning preparation information to the electronic equipment.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any one of the first or second aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method of any one of the above first aspects.
In a sixth aspect, embodiments of the present application provide a computer program product, which, when run on a cloud platform, causes the cloud platform to perform the method of any one of the above second aspects.
It is to be understood that, for the beneficial effects of the second aspect to the sixth aspect, reference may be made to the relevant description in the first aspect, and details are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
the method comprises the steps of obtaining first project data of a target test scene; acquiring a first target assembly in the target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene; and sending the data of the first target assembly to a cloud platform, receiving preparation information returned by the cloud platform, updating the state of the first target assembly according to the preparation information, and generating an assembly which is not generated in a target test scene and a corresponding updating state in a data layer, so that the assembly can be quickly prepared, and the construction efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram of a first system provided by an embodiment of the present application;
FIG. 2 is a first schematic flow chart diagram of a method for rapid manufacturing of an assembly according to an embodiment of the present disclosure;
FIG. 3 is a second schematic flow chart diagram of a method for rapid manufacturing of an assembly according to an embodiment of the present application;
FIG. 4 is a second system diagram provided in accordance with an embodiment of the present application;
FIG. 5 is a third schematic flow chart diagram illustrating a method for rapid manufacturing of a component according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, 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.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a schematic diagram of a first system according to an embodiment of the present application. As shown in fig. 1, the system includes an electronic device 10 and a cloud platform 20, where the electronic device 10 is electrically connected to the cloud platform 20.
The electronic device 10 is configured to, after receiving a preparation request input by a user, obtain first item data of a target test scenario in response to the preparation request, where the first item data includes data of a first target component;
the first target assembly is used for acquiring a first target assembly in the target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene;
also for sending data of the first target component to the cloud platform 20;
and is further configured to receive preparation information returned by the cloud platform 20, and update the state of the first target component according to the preparation information.
In application, the electronic device is provided with a front-end application for receiving a preparation request input by a user, a back-end application for processing the request, and a database for storing data. Wherein, the database includes data of all test scenarios, such as: user information, component data, virtualization connection information and the like, and after the component is generated, the component data can store corresponding identification information.
After the front-end application receives the preparation request, the preparation request is sent to the back-end application. The back-end application receives the preparation request, and responds to the preparation request to acquire the first item data from the database. Acquiring all components in a target test scene according to first scene information in the first project data; and filtering the generated component according to the first identification information in the first project data to obtain a first target component. After the data of the first target assembly is sent to the cloud platform, preparation information returned by the cloud platform is received, and the preparation information is analyzed; and after the first target assembly is successfully prepared according to the preparation information, updating the state of the first target assembly in the database to indicate that the first target assembly is successfully prepared.
A cloud platform 20 for receiving data from a first target component of the electronic device 10;
and is further configured to generate the first target component according to the data of the first target component and return the preparation information to the electronic device 10.
In application, the cloud platform receives data of the first target assembly, creates a corresponding first target assembly according to the data of the first target assembly, starts simulation software in the first target assembly to prepare the assembly, and then returns preparation information to the electronic device.
Generally, before a component is prepared, a test environment needs to be constructed, and a specific process is to create a service component in the test environment in a cloud platform and start related simulation software in the service component. After the business component is prepared, the business component is converted into a component template so as to add the business component in the following. After the business components are added, adding network components; setting a network address and gateway information of the service component according to the network topology; the business component is connected with the physical device through the network component. Meanwhile, different test environments are subjected to network isolation in the form of virtual bridge components and labels.
In the embodiment, the rapid preparation of the component is realized, the construction efficiency is improved, and meanwhile, the response capability is provided. Moreover, the preparation of the component is performed at the data level, which can support the continued preparation of the component in the generated testing environment.
According to the embodiment, a first target assembly in a target test scene is obtained through electronic equipment according to first project data, wherein the first target assembly is an assembly which is not generated in the target test scene; sending data of the first target component to the cloud platform; receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information; and the cloud platform receiving data from a first target component of the electronic device; the first target assembly is generated according to the data of the first target assembly, the preparation information is returned to the electronic equipment, and the assemblies which are not generated in the target test scene and the corresponding updating states are generated on the data level, so that the assemblies can be quickly prepared, and the construction efficiency is improved.
Corresponding to the systems described in the above embodiments, only the parts related to the embodiments of the present application are shown for convenience of explanation.
Fig. 2 is a first schematic flow chart of a method for rapidly manufacturing a component according to an embodiment of the present application. As shown in fig. 2, the method includes a method applied to an electronic device and a method applied to a cloud platform.
A method applied to an electronic device, comprising:
s11: after receiving a preparation request input by a user, responding to the preparation request, and acquiring first project data of a target test scene.
The first item data comprises data of a first target assembly, data of an assembly generated in a target test scene and first scene data, the data of the assembly generated comprises first identification information used for representing the generation, and the first scene data is scene information of the target test scene.
In the application, the front-end application receives a preparation request, and the back-end application responds to the preparation request and obtains first project data of a target test scene from a database.
S12: and acquiring a first target assembly in the target test scene according to the first project data.
The first target component is an component which is not generated in the target test scene.
In application, the back-end application acquires all components in a target test scene according to the first scene information; and filtering the generated components in the target test scene according to the first identification information to obtain a first target component.
S13: and sending the data of the first target component to the cloud platform.
Wherein the data of the first target component is used to instruct the cloud platform to generate the first target component.
In application, the back-end application sends data of the first target assembly to the cloud platform so as to call the cloud platform interface to prepare the first target assembly.
S14: and receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information.
In application, the preparation information comprises a preparation result, and the state of the first target assembly in the database is updated according to the preparation result so as to represent that the first target assembly is successfully prepared.
The method applied to the cloud platform comprises the following steps:
s21: data is received from a first target component of an electronic device.
S22: and generating a first target assembly according to the data of the first target assembly, and returning preparation information to the electronic equipment.
Wherein the preparation information is used for instructing the electronic device to update the state of the first target component.
The embodiment comprises the steps of acquiring first project data of a target test scene; acquiring a first target assembly in the target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene; and sending the data of the first target assembly to a cloud platform, receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information. And the cloud platform generates the first target assembly according to the data of the first target assembly, returns the preparation information to the electronic equipment, generates the assembly which is not generated in the target test scene at the data level and the corresponding updating state, can quickly prepare the assembly and improves the construction efficiency.
In one embodiment, after a test scenario is generated, testing and experimental work is performed. After the work is finished, the user can restore the test environment required by the user through the recovery component according to the requirement.
Fig. 3 is a second schematic flow chart of a method for rapidly manufacturing a component according to an embodiment of the present application.
As shown in fig. 3:
the method applied to the electronic equipment further comprises the following steps:
s15: and after receiving a restoration request input by a user, responding to the restoration request, and acquiring second project data of the test scene to be restored.
The second item data includes data of a second target component, data of a component not generated in the test scenario to be restored, and second scenario data, the data of the second target component includes second identification information used for representing the generated second identification information, and the second scenario data is scenario information of the test scenario to be restored.
In the application, the front-end application receives a restoration request, and the back-end application responds to the restoration request and acquires the second item data from the database.
S16: and acquiring a second target assembly in the test scene to be recovered according to the second project data.
And the second target component is a component generated in the test scene to be recovered.
In application, the back-end application acquires all the components in the test scene to be recovered according to the second scene data; and acquiring a second target assembly according to the second identification information.
S17: and sending the data of the second target component to the cloud platform.
And the data of the second target component is used for instructing the cloud platform to restore the second target component.
In the application, the back-end application sends the data of the second target component to the cloud platform so as to call the cloud platform interface to recover the second target component.
S18: and receiving restoration information returned by the cloud platform, and updating the state of the second target assembly according to the restoration information.
In application, the restoration information comprises a restoration result, and the state of the second target assembly in the database is updated according to the restoration result so as to represent whether the second target assembly is successfully restored or not and whether the test scene to be restored is successfully restored or not.
The method applied to the cloud platform further comprises the following steps:
s23: data is received from a second target component of the electronic device.
S24: and restoring the second target assembly according to the data of the second target assembly, and returning the restoring information to the electronic equipment.
And the restoration information is used for indicating the electronic equipment to update the state of the second target component.
In application, the cloud platform receives data of the second target assembly, creates a corresponding second target assembly according to the data of the second target assembly, starts simulation software in the second target assembly to recover the assembly, and then returns recovery information to the electronic device.
According to the embodiment, the electronic equipment acquires a second target assembly in the test scene to be recovered according to the second project data; and sending the data of the second target assembly to the cloud platform, receiving the restoration information returned by the cloud platform, and updating the state of the second target assembly according to the restoration information. The cloud platform recovers the second target assembly according to the data of the second target assembly, returns reduction information to the electronic equipment, recovers the assemblies and the corresponding updating states generated in the test scene to be recovered at the data level, can quickly recover the test scene, and reduces the probability of component failure and rubbish component residue.
Fig. 4 is a schematic diagram of a second system according to an embodiment of the present application. As shown in fig. 4, the electronic device 10 in the system communicates with the cloud platform 20 through a message queue 30.
The electronic device 10 is configured to receive clone information returned by the clone component message queue after sending data of the first target component to the clone component message queue, and determine whether the first target component is cloned successfully according to the clone information;
the first virtual identification information is acquired if the cloning is successful, and the state of the first target component is updated to be a cloning success state;
the first virtual identification signal is also used for sending a first virtual identification signal to the message queue of the starting-up component;
the first starting-up information returned by the starting-up component information queue is received, and whether the first target component is started up successfully or not is determined according to the first starting-up information;
and updating the state of the first target assembly to be a starting state if the starting is determined to be successful.
The preparation information comprises clone information and first starting-up information.
In application, the backend application receives the clone information and then parses the clone information. The transfer form of the clone information is xml file (Extensible Markup Language). And the back-end application determines whether cloning is successful according to the cloning result in the xml file. If the cloning is successful, correspondingly obtaining first virtual identification information used for representing the generated first virtual identification information from the xml file, and updating the state of the first target assembly in the database to be a cloning success state. The back-end application receives the first startup information and analyzes the first startup information. The transmission form of the first starting-up information is an xml file. And the back-end application determines whether the boot is successful according to the boot result in the xml file. And if the starting is successful, updating the state of the first target assembly in the database into a starting state.
A cloud platform 20 for receiving data from a first target component of the electronic device 10 via a cloned component message queue;
the electronic device 10 is further configured to generate a first target component according to the data of the first target component, and return clone information to the electronic device 10 through a clone component message queue;
also for receiving first virtual identification information of a first target component from the electronic device 10 via the boot component message queue;
and is further configured to open the software in the corresponding first target component according to the first virtual identification information, and return the first boot information to the electronic device 10 through the boot component message queue.
In an application, the cloud platform obtains data of a first target component from a cloned component message queue. And creating first target data according to the data of the first target component, and generating clone information after creation is completed. The clone information is sent to a clone component message queue. The cloud platform acquires first virtual identification information from the message queue of the starting component, and the first virtual identification information corresponds to the first target component so as to find the corresponding first target component and start the simulation software.
According to the embodiment, the generation and the startup of the first target assembly are processed through the double message queues, so that the assembly preparation time is further shortened, and the efficiency is further improved.
Corresponding to the systems described in the above embodiments, only the parts related to the embodiments of the present application are shown for convenience of explanation.
Fig. 5 is a third schematic flow chart diagram of a method for rapidly manufacturing a component according to an embodiment of the present application.
As shown in fig. 5, step S14 includes:
s141: after the data of the first target component is sent to the clone component message queue, clone information returned by the clone component message queue is received, and whether the first target component is cloned successfully or not is determined according to the clone information.
In application, if the value of the cloning result in the cloning information is a first preset value, it is determined that the cloning of the first target component is successful. And if the value of the cloning result is the second preset value, determining that the first target component is failed to clone.
S142: and if the cloning is determined to be successful, acquiring corresponding first virtual identification information, and updating the state of the first target assembly into a cloning success state.
In application, if cloning is successful, acquiring first virtual identification information from cloning information, and updating the state of a first target component in a database.
S143: and sending the first virtual identification signal to the message queue of the starting-up component.
S144: and receiving a first starting-up message returned by the starting-up component message queue, and determining whether the first target component is started up successfully or not according to the first starting-up message.
In application, if the value of the boot result in the first boot message is the first preset value, it is determined that the first target component is successfully booted. And if the value of the starting result is the second preset value, determining that the first target assembly fails to start.
S145: and if the starting is determined to be successful, updating the state of the first target assembly into a starting state.
Step S22, comprising:
s221: data from a first target component of an electronic device is received through a cloned component message queue.
S222: and generating the first target component according to the data of the first target component, and returning clone information to the electronic equipment through the clone component message queue.
In application, if the generation is successful, setting the value of the cloning result in the cloning information as a first preset value. And if the generation fails, setting the value of the cloning result as a second preset value.
When the first target component is generated, the identification information is correspondingly generated, and can be used for representing that the first target component is generated, namely the first virtual identification information, and is stored in the clone information.
S223: first virtual identification information of a first target component from the electronic equipment is received through the starting component message queue.
S224: and starting the corresponding software in the first target assembly according to the first virtual identification information, and returning the first starting-up information to the electronic equipment through the starting-up assembly message queue.
In application, if the boot is successful, setting the value of the boot result in the first boot message as a first preset value. And setting the value of the starting result as a second preset value when the starting fails.
In one embodiment, step S18 includes:
s181: and after the data of the second target assembly is sent to the recovery assembly message queue, receiving recovery information returned by the recovery assembly message queue, and determining whether the second target assembly is successfully recovered according to the recovery information.
In application, if the value of the recovery result in the recovery information is the first preset value, it is determined that the second target component is successfully recovered. And if the value of the recovery result is the second preset value, determining that the second target assembly fails to recover.
S182: and if the recovery is determined to be successful, acquiring corresponding second virtual identification information, and updating the state of the second target assembly to be a recovery successful state.
In application, after the recovery is determined to be successful, second virtual identification information corresponding to the second target component is obtained from the database, and the state of the second target component in the database is updated to be a recovery successful state.
S183: and sending a second virtual identification signal to the message queue of the starting-up component.
S184: and receiving a second starting-up message returned by the starting-up component message queue, and determining whether the second target component is started up successfully according to the second starting-up message.
In application, if the value of the boot result of the second boot message is the first preset value, it is determined that the boot of the second target component is successful. And if the value of the starting result is the second preset value, determining that the second target assembly fails to start.
S185: and if the starting is determined to be successful, updating the state of the second target assembly into a starting state.
The restoration information comprises recovery information and second starting-up information.
Step S24, comprising:
s241: data from a second target component of the electronic device is received through the restore component message queue.
S242: and recovering the second target component according to the data of the second target component, and returning recovery information to the electronic equipment through the recovery component message queue.
In application, if the recovery is successful, setting the value of the recovery result in the recovery information as a first preset value. And if the recovery fails, setting the value of the recovery result as a second preset value.
S243: second virtual identification information of a second target component from the electronic device is received through the boot component message queue.
S244: and starting the corresponding software in the second target assembly according to the second virtual identification information, and returning second starting information to the electronic equipment through the starting assembly message queue.
In application, if the boot is successful, the value of the boot result in the second boot information is set as a first preset value. And setting the value of the starting result as a second preset value when the starting fails.
The embodiment processes the recovery and the startup of the second target assembly through the double message queues, thereby further shortening the time for recovering the assembly and further improving the efficiency for recovering the test scene.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic apparatus 10 of this embodiment includes: at least one processor 11 (only one shown in fig. 6), a memory 12, and a computer program 13 stored in the memory 12 and executable on the at least one processor 11, the steps of any of the various method embodiments described above being implemented when the computer program 13 is executed by the processor 11.
The electronic device 10 may be a desktop computer, a notebook, a palmtop, or other computing device. The electronic device 10 may include, but is not limited to, a processor 11, a memory 12. Those skilled in the art will appreciate that fig. 6 is merely an example of the electronic device 10 and does not constitute a limitation of the electronic device 10, and may include more or less components than those shown, or some components may be combined, or different components may include, for example, input/output devices, network access devices, etc.
The Processor 11 may be a Central Processing Unit (CPU), and the Processor 11 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 12 may in some embodiments be an internal storage unit of the electronic device 10, such as a hard disk or a memory of the electronic device 10. The memory 12 may also be an external storage device of the electronic device 10 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 10. Further, the memory 12 may also include both internal storage units and external storage devices of the electronic device 10. The memory 12 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 12 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments may be implemented.
Embodiments of the present application provide a computer program product, which when executed on an electronic device, enables the electronic device to implement the steps in the method embodiments applied to the electronic device.
The embodiment of the application provides a computer program product, and when the computer program product runs on a cloud platform, the steps in the method embodiment of the application cloud platform can be realized when the cloud platform is executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for rapidly preparing a component, which is applied to an electronic device, comprises the following steps:
after receiving a preparation request input by a user, responding to the preparation request, and acquiring first project data of a target test scene;
acquiring a first target assembly in the target test scene according to the first project data, wherein the first target assembly is an assembly which is not generated in the target test scene;
sending the data of the first target component to a cloud platform, wherein the data of the first target component is used for instructing the cloud platform to generate the first target component;
receiving preparation information returned by the cloud platform, and updating the state of the first target assembly according to the preparation information;
wherein the first item data comprises data of the first target component.
2. The method of claim 1, wherein: the preparation information comprises clone information and first starting-up information;
the receiving preparation information returned by the cloud platform and updating the state of the first target assembly according to the preparation information includes:
after the data of the first target component is sent to a clone component message queue, clone information returned by the clone component message queue is received, whether the first target component is cloned successfully or not is determined according to the clone information, and the clone information is generated by the cloud platform after the first target component is generated according to the data of the first target component;
if the cloning is determined to be successful, acquiring corresponding first virtual identification information, and updating the state of the first target assembly to be a cloning success state;
sending the first virtual identification signal to a starting component message queue;
receiving a first boot message returned by the boot component message queue, and determining whether the boot of the first target component is successful according to the first boot message, wherein the first boot message is generated by the cloud platform after starting software of the first target component according to the first virtual identification information;
and if the starting is determined to be successful, updating the state of the first target assembly to be the starting state.
3. The method of claim 1 or 2, further comprising:
after receiving a restoration request input by a user, responding to the restoration request, and acquiring second project data of a test scene to be restored;
acquiring a second target assembly in the test scene to be recovered according to the second project data, wherein the second target assembly is an assembly generated in the test scene to be recovered;
sending the data of the second target component to the cloud platform, wherein the data of the second target component is used for instructing the cloud platform to restore the second target component;
and receiving restoration information returned by the cloud platform, and updating the state of the second target assembly according to the restoration information.
4. The method of claim 3, wherein: the restoration information comprises recovery information and second starting-up information;
the receiving of the restoration information returned by the cloud platform and the updating of the state of the second target component according to the restoration information includes:
after the data of the second target component is sent to a recovery component message queue, recovery information returned by the recovery component message queue is received, whether the second target component is successfully recovered or not is determined according to the recovery information, and the recovery information is generated by the cloud platform after the second target component is recovered according to the data of the second target component;
if the recovery is determined to be successful, acquiring corresponding second virtual identification information, and updating the state of the second target assembly to be a recovery successful state;
sending the second virtual identification signal to the boot component message queue;
receiving a second boot message returned by the boot component message queue, and determining whether the boot of the second target component is successful according to the second boot message, wherein the second boot message is generated by the cloud platform after the software of the second target component is started according to the second virtual identification information;
and if the boot is determined to be successful, updating the state of the second target assembly to be the boot state.
5. A method for rapidly preparing a component is applied to a cloud platform and comprises the following steps:
receiving data from a first target component of an electronic device;
and generating the first target assembly according to the data of the first target assembly, and returning preparation information to the electronic equipment, wherein the preparation information is used for indicating the electronic equipment to update the state of the first target assembly.
6. The method of claim 5, wherein the generating the first target component from the data of the first target component and returning preparation information to the electronic device comprises:
receiving data from the first target component of the electronic device through a clone component message queue;
generating the first target component according to the data of the first target component, and returning clone information to the electronic equipment through the clone component message queue;
receiving first virtual identification information of the first target component from the electronic equipment through a starting component message queue;
starting the corresponding software in the first target assembly according to the first virtual identification information, and returning first starting information to the electronic equipment through the starting assembly message queue;
wherein the preparation information includes the clone information and the first boot information.
7. The method of claim 5 or 6, further comprising:
receiving data from a second target component of the electronic device;
and recovering the second target assembly according to the data of the second target assembly, and returning restoration information to the electronic equipment, wherein the restoration information is used for indicating the electronic equipment to update the state of the second target assembly.
8. The method of claim 7, wherein the restoring the second target component according to the data of the second target component and returning restore information to the electronic device comprises:
receiving data from the second target component of the electronic device through a restore component message queue;
recovering the second target assembly according to the data of the second target assembly, and returning recovery information to the electronic equipment through the recovery assembly message queue;
receiving second virtual identification information of the second target component from the electronic equipment through a starting component message queue;
starting the corresponding software in the second target assembly according to the second virtual identification information, and returning second starting information to the electronic equipment through the starting assembly message queue;
wherein the restore information includes the restore information and the second boot information.
9. A system for rapidly preparing a component is characterized by comprising electronic equipment and a cloud platform, wherein the electronic equipment is electrically connected with the cloud platform;
the electronic equipment is used for responding to a preparation request input by a user after receiving the preparation request, and acquiring first project data of a target test scene;
the first target component is also used for acquiring a first target component in the target test scene according to the first project data, wherein the first target component is a component which is not generated in the target test scene;
the data of the first target component is also sent to a cloud platform, and the first item data comprises the data of the first target component;
the cloud platform is also used for receiving preparation information returned by the cloud platform and updating the state of the first target assembly according to the preparation information;
a cloud platform to receive data from the first target component of the electronic device;
and the electronic equipment is also used for generating the first target assembly according to the data of the first target assembly and returning preparation information to the electronic equipment.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4 or 5 to 8.
CN202211155728.2A 2022-09-22 2022-09-22 Method and system for rapidly preparing assembly and readable storage medium Pending CN115481455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211155728.2A CN115481455A (en) 2022-09-22 2022-09-22 Method and system for rapidly preparing assembly and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211155728.2A CN115481455A (en) 2022-09-22 2022-09-22 Method and system for rapidly preparing assembly and readable storage medium

Publications (1)

Publication Number Publication Date
CN115481455A true CN115481455A (en) 2022-12-16

Family

ID=84423906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211155728.2A Pending CN115481455A (en) 2022-09-22 2022-09-22 Method and system for rapidly preparing assembly and readable storage medium

Country Status (1)

Country Link
CN (1) CN115481455A (en)

Similar Documents

Publication Publication Date Title
CN107220142B (en) Method and device for executing data recovery operation
CN112577760A (en) Method, system, equipment and readable storage medium for vehicle diagnosis
CN112783568A (en) Initialization method, device, equipment and storage medium of application program
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN109361553B (en) Configuration rollback method and device
CN113111669B (en) Increment-based front-end multi-language internationalized translation method and device
CN110737458A (en) code updating method and related device
CN114676205A (en) Event information processing method and device
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN114117111A (en) Information retrieval method, device and system
CN108241543B (en) Method, service server and system for executing service operation breakpoint
CN115481455A (en) Method and system for rapidly preparing assembly and readable storage medium
CN110109775B (en) Virtual machine recovery method and device, terminal equipment and storage medium
CN114217911A (en) Cross-chain transaction processing method, device, computing equipment and medium
CN111061576A (en) Method and system for creating entity object
CN111522748A (en) Automatic test case generation method and device, server and storage medium
CN110046192B (en) System and method for generating serial number of request information
CN114968491B (en) Virtual resource testing method and device, electronic equipment and storage medium
CN113934453B (en) Risk detection method, risk detection device and storage medium
CN116775171B (en) Architecture switching method and device, electronic equipment and storage medium
CN114171165B (en) Forwarding method and system based on independent task management service
CN112733210B (en) Equipment identifier obtaining method and device and computer readable storage medium
CN117608705A (en) Public method decoupling calling method and system based on route control
CN117459401A (en) Method, device, equipment and storage medium for generating network target range environment snapshot
CN117806767A (en) Method and device for improving virtual machine creation time, storage medium and electronic equipment

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