CN113569373A - Service simulation method and device, computer equipment and storage medium - Google Patents

Service simulation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113569373A
CN113569373A CN202010354837.1A CN202010354837A CN113569373A CN 113569373 A CN113569373 A CN 113569373A CN 202010354837 A CN202010354837 A CN 202010354837A CN 113569373 A CN113569373 A CN 113569373A
Authority
CN
China
Prior art keywords
clock
refresher
service
refreshers
simulation
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
CN202010354837.1A
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.)
SF Technology Co Ltd
SF Tech Co Ltd
Original Assignee
SF Technology 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 SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202010354837.1A priority Critical patent/CN113569373A/en
Publication of CN113569373A publication Critical patent/CN113569373A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Abstract

The embodiment of the application discloses a service simulation method, a device, computer equipment and a storage medium, wherein the service simulation method comprises the following steps: simulating the simulation process of the target service into clock refreshing events of a plurality of clock refreshers for the target service to be simulated, wherein the target service is a service of discrete events; the target service is simulated based on the clock refresh events of the plurality of clock refreshers. In the embodiment of the application, the simulation is carried out by using the discrete event driving method, the simulation is not limited by the simulation scene and the simulation condition of the simulation software, the simulation under the complex scene can be realized more flexibly, and the method has high simulation flexibility, wide application scene and strong expansibility.

Description

Service simulation method and device, computer equipment and storage medium
Technical Field
The present invention relates to the technical field of service simulation, and in particular, to a service simulation method, apparatus, computer device, and storage medium.
Background
Currently, general simulation software in the market enables a computer to perform a simulation experiment on a discrete event system, and the simulation experiment comprises the following steps: the workflow diagram of the system is drawn, the arrival model, the service model and the queuing model (which constitute the simulation model of the discrete event system) are determined, an operating program describing the activities of the system is formulated and executed on the computer.
The universal simulation software can quickly realize simple simulation experiments in aspects, but aims at some complex scenes with large data input, such as the situation that the logistics industry needs to simulate tens of thousands of network points and hundreds of transitions. Scenes involving hundreds of millions of orders, millions of shifts and stowage, are often frustrating. In the face of such a scenario, a system developer is required to develop and maintain a set of simulation method for a complex scenario alone for simulation, which consumes a lot of time and labor.
Disclosure of Invention
The embodiment of the application provides a service simulation method, a service simulation device, computer equipment and a storage medium, a target service is simulated into clock refreshing events of a plurality of clock refreshers including a central clock refresher, an element clock refresher and a behavior clock refresher, the clock refreshing events are not limited by simulation scenes and simulation conditions of simulation software, simulation under complex scenes can be realized more flexibly, and the service simulation method, the device, the computer equipment and the storage medium have high simulation flexibility, wide application scenes and strong expansibility.
In one aspect, the present application provides a service simulation method, where the method includes:
simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, wherein the target service is a service of a discrete event, the plurality of clock refreshers comprise a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions required to be completed by the elements with different behaviors in the target service respectively;
and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
In some embodiments of the present application, the simulating the simulation process of the target service as a clock refresh event of a plurality of clock refreshers in the clock refresh event includes:
based on the target service, a central clock refresher is newly built, and the central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
In some embodiments of the present application, the central clock refresher includes a front module, a refresh module, and a back module, and each element clock refresher includes at least one of the front module, the refresh module, and the back module;
the element clock refresher comprises a front-end module, a back-end module and a service processing module, wherein the front-end module in the element clock refresher is used for calling a preparation service processing logic preset in the current element clock refresher so as to simulate and execute a preparation service; the element clock refresher comprises a refresh module, a behavior clock refresher and a clock module, wherein the refresh module in the element clock refresher is used for calling the behavior clock refresher of the current element clock refresher and the behavior clock refresher related to the refresh service so as to simulate and execute refresh services of different behaviors; the back module in the element clock refresher is used for calling a result processing service logic preset in the current element clock refresher so as to simulate and execute a result processing service;
the front module in the central clock refresher is used for calling the front module in each element clock refresher to simulate and execute the corresponding preparation service, the refresh module in the central clock refresher is used for calling the refresh module in each element clock refresher to simulate and execute the corresponding refresh service, and the rear module in the central clock refresher is used for calling the rear module in each element clock refresher to simulate and execute the corresponding result processing service.
In some embodiments of the present application, the simulating the target service based on the clock refresh events of the plurality of clock refreshers includes:
processing a clock refreshing event every other preset clock step length, calling the front module in each element clock refreshing device by using the front module in the central clock refreshing device in each clock refreshing event, executing a preset preparation service processing logic and simulating and executing a preparation service;
calling the refreshing module in each element clock refresher by using the refreshing module in the central clock refresher so as to realize the behavior clock refreshers of each element clock refresher related to the refreshing service and simulate to execute the refreshing services of different behaviors;
and calling the post module in each element clock refresher by using the post module in the central clock refresher, executing the preset result processing service processing logic in each element clock refresher, and simulating the execution result processing service.
In some embodiments of the present application, the target service is a logistics service, and the plurality of element clock refreshers include a vehicle refresher and a site refresher; the field refresher comprises an unloading refresher, a sorting refresher and a loading refresher;
the central clock refresher is used for synchronously refreshing the clocks of all registered site refreshers in a registration calling mode according to a preset clock step length;
the vehicle refresher is an element clock refresher constructed by vehicle elements for executing the behaviors of arriving at and leaving a vehicle; the field refresher is an element clock refresher which is used for constructing field elements capable of executing unloading behaviors, sorting behaviors and loading behaviors;
the unloading refresher is used for simulating the unloading behavior of the vehicle on the logistics field;
the sorting refresher is used for simulating the sorting behavior of the express in the logistics field;
the loading refresher is used for simulating the loading behavior of the express mail in the logistics field.
In some embodiments of the present application, before the simulating the target service based on the clock refresh events of the plurality of clock refreshers, the method for simulating the service is applied to a distributed system, the method further includes:
deploying the central clock refresher on a node of the distributed system;
and grouping the element clock refreshers and the corresponding behavior clock refreshers according to a preset strategy slice, and deploying the element clock refreshers and the behavior clock refreshers on a plurality of nodes of the distributed system.
In another aspect, the present application provides a service emulation apparatus, including:
the system comprises a service simulation unit, a service simulation unit and a service control unit, wherein the service simulation unit is used for simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, the target service is a service of a discrete event, the clock refreshers comprise a central clock refresher used for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions which need to be completed by the elements with different behaviors in the target service;
and the service simulation unit is used for simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
In some embodiments of the present application, the service simulation unit is specifically configured to:
based on the target service, a central clock refresher is newly built, and the central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
In some embodiments of the present application, the central clock refresher includes a front module, a refresh module, and a back module, and each element clock refresher includes at least one of the front module, the refresh module, and the back module;
the element clock refresher comprises a front-end module, a back-end module and a service processing module, wherein the front-end module in the element clock refresher is used for calling a preparation service processing logic preset in the current element clock refresher so as to simulate and execute a preparation service; the element clock refresher comprises a refresh module, a behavior clock refresher and a clock module, wherein the refresh module in the element clock refresher is used for calling the behavior clock refresher of the current element clock refresher and the behavior clock refresher related to the refresh service so as to simulate and execute refresh services of different behaviors; the back module in the element clock refresher is used for calling a result processing service logic preset in the current element clock refresher so as to simulate and execute a result processing service;
the front module in the central clock refresher is used for calling the front module in each element clock refresher to simulate and execute the corresponding preparation service, the refresh module in the central clock refresher is used for calling the refresh module in each element clock refresher to simulate and execute the corresponding refresh service, and the rear module in the central clock refresher is used for calling the rear module in each element clock refresher to simulate and execute the corresponding result processing service.
In some embodiments of the present application, the service simulation unit is specifically configured to:
processing a clock refreshing event every other preset clock step length, calling the front module in each element clock refreshing device by using the front module in the central clock refreshing device in each clock refreshing event, executing a preset preparation service processing logic and simulating and executing a preparation service;
calling the refreshing module in each element clock refresher by using the refreshing module in the central clock refresher so as to realize the behavior clock refreshers of each element clock refresher related to the refreshing service and simulate to execute the refreshing services of different behaviors;
and calling the post module in each element clock refresher by using the post module in the central clock refresher, executing the preset result processing service processing logic in each element clock refresher, and simulating the execution result processing service.
In some embodiments of the present application, the target service is a logistics service, and the plurality of element clock refreshers include a vehicle refresher and a site refresher; the field refresher comprises an unloading refresher, a sorting refresher and a loading refresher;
the central clock refresher is used for synchronously refreshing the clocks of all registered site refreshers in a registration calling mode according to a preset clock step length;
the vehicle refresher is an element clock refresher constructed by vehicle elements for executing the behaviors of arriving at and leaving a vehicle; the field refresher is an element clock refresher which is used for constructing field elements capable of executing unloading behaviors, sorting behaviors and loading behaviors;
the unloading refresher is used for simulating the unloading behavior of the vehicle on the logistics field;
the sorting refresher is used for simulating the sorting behavior of the express in the logistics field;
the loading refresher is used for simulating the loading behavior of the express mail in the logistics field.
In some embodiments of the present application, the service simulation method is applied to a distributed system, and the apparatus further includes a deployment unit, where the deployment unit is specifically configured to:
deploying the central clock refresher on a node of the distributed system before the target service is simulated based on the clock refresh events of the plurality of clock refreshers;
and grouping the element clock refreshers and the corresponding behavior clock refreshers according to a preset strategy slice, and deploying the element clock refreshers and the behavior clock refreshers on a plurality of nodes of the distributed system.
In another aspect, the present application further provides a computer device, including:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the business simulation method.
In another aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is loaded by a processor to execute the steps in the service simulation method.
In the embodiment of the application, a simulation process of a target service to be simulated is simulated into clock refreshing events of a plurality of clock refreshers, the target service is a service of a discrete event, the plurality of clock refreshers include a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements of different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions to be completed by the elements of different behaviors in the target service respectively; and simulating the target service based on the clock refreshing events of the plurality of clock refreshers. In the embodiment of the application, a discrete event driving method is used for simulation, different from simulation software directly using a simulation software developer in the prior art, the target service is simulated into clock refreshing events of a plurality of clock refreshers including a central clock refresher, an element clock refresher and a behavior clock refresher, the clock refreshing events are not limited by simulation scenes and simulation conditions of the simulation software, the simulation under complex scenes can be realized more flexibly, and the simulation software has high simulation flexibility, wide application scenes and strong expansibility.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a service simulation system provided in an embodiment of the present application;
FIG. 2 is a flow chart illustrating an embodiment of a service simulation method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of one embodiment of a discrete event queue in an embodiment of the present application;
FIG. 4 is a flowchart illustrating an embodiment of step 201 provided in an embodiment of the present application;
FIG. 5 is a flowchart of one embodiment of step 202 provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a specific architecture of a service simulation system provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of another specific architecture of the service simulation system provided in the embodiment of the present application;
fig. 8 is a schematic flow chart of a logistics business scenario provided in an embodiment of the present application;
fig. 9 is a schematic diagram of a specific architecture of a service simulation system in a logistics service scenario provided in an embodiment of the present application;
FIG. 10 is a schematic structural diagram of an embodiment of a service simulation apparatus provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the invention. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and processes are not shown in detail to avoid obscuring the description of the invention with unnecessary detail. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
Embodiments of the present invention provide a method and an apparatus for service simulation, a computer device, and a storage medium, which are described in detail below.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of a service simulation system according to an embodiment of the present invention, where the service simulation system may include a computer device 100, and a service simulation apparatus, such as the computer device in fig. 1, is integrated in the computer device 100.
In the embodiment of the present application, the computer device 100 is mainly configured to simulate a simulation process of a target service to be simulated as a clock refresh event of a plurality of clock refreshers, where the target service is a service of a discrete event, the plurality of clock refreshers include a central clock refresher configured to process the clock refresh event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, where the different simulation actions are simulation actions that need to be completed by the elements with different behaviors in the target service; and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
The computing device 100 may be a general-purpose computing device, a special-purpose computing device, or a computing device in a distributed environment. In a specific implementation, the computer device 200 may be a desktop computer, a laptop computer, a server, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, or the like, and the embodiment of the present application does not limit the type of the computer device 100.
In this embodiment, if the computer device 100 is a server, the server may be an independent server, or may be a server network or a server cluster composed of servers, for example, the server described in this embodiment of the present invention includes, but is not limited to, a computer, a network host, a single network server, multiple network server sets, or a cloud server composed of multiple servers. Among them, the Cloud server is constituted by a large number of computers or web servers based on Cloud Computing (Cloud Computing). In the embodiment of the present invention, the communication between the computer device 100 and other computer devices (e.g., terminals) may be implemented by any communication method, including but not limited to mobile communication based on third Generation Partnership Project (3 GPP), Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on TCP/IP Protocol Suite (TCP/IP), User Datagram Protocol (UDP), and the like.
Those skilled in the art will appreciate that the application environment shown in fig. 1 is only one application scenario related to the present application, and does not constitute a limitation to the application scenario of the present application, and that other application environments may further include more or less computer devices than those shown in fig. 1, or a network connection relationship of computer devices, for example, only 1 computer device is shown in fig. 1, and it is understood that the service simulation system may further include one or more other computer devices that are network-connected to the computer device, and is not limited herein.
In addition, as shown in fig. 1, the service simulation system may further include a memory 200 for simulating service data, such as storing a plurality of simulation class data of the target service.
It should be noted that the scenario diagram of the service simulation system shown in fig. 1 is only an example, and the service simulation system and the scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
First, an embodiment of the present invention provides a service simulation method, where the service simulation method is applied in a computer device, and the service simulation method includes: simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, wherein the target service is a service of a discrete event, the plurality of clock refreshers comprise a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions required to be completed by the elements with different behaviors in the target service respectively; and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
As shown in fig. 2, which is a schematic flow chart of an embodiment of a service simulation method in the embodiment of the present invention, the service simulation method includes:
201. simulating the simulation process of the target service to be simulated into clock refreshing events of a plurality of clock refreshers.
In the production activities and social activities, people often encounter a complex service, many events in the service occur sometimes, disappear sometimes, act sometimes, and stop sometimes, and the start and stop occur at discrete moments and have certain randomness. For example, a docking station of a ship in a port, starting and stopping of a machine tool on a production line, connection and disconnection of a telephone, and proceeding and exiting of a certain operation in a computer system all have the above-mentioned features, and this kind of service is called a service of discrete events.
In the embodiment of the present application, the target service may be various types of services to be simulated, such as a logistics service, a transaction service, a transportation service, a traffic service, and the like, and the type of the target service may be specifically set according to an actual scene, which is not limited herein.
As the service simulation of the logistics industry needs to simulate tens of thousands of network points and hundreds of transitions. The existing simulation software is often not free from the scenes of hundreds of millions of orders, millions of shifts and stowage. Therefore, the target service in the embodiment of the present application is preferably a logistics service, such as an express service in a logistics scene.
The essence of the application is that a discrete event driven method is used for service simulation, and the state change of all elements of a target service in a simulation world needs to be simulated along with the advance of time, and the state change logic can be abstracted into a clock refreshing event. The simulation world uniformly advances the running of the whole target service simulation according to the same clock step (such as 1 minute) by inserting clock refreshing events generated at the same time interval in the simulation period from the beginning to the end in a discrete event queue.
To simulate a day's scenario, as shown in FIG. 3 below, with a step size of 1 minute, a total of 1440 clock refresh events from 00:00 to 23:59 would be inserted into the discrete event queue. All clock refresh events in the queue are executed according to time priority in the simulation running process.
Based on this, in the embodiment of the present application, a plurality of clock refreshers are provided to implement simulation of a simulated target service, and specifically, the plurality of clock refreshers include a central clock refresher for processing a clock refresh event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, where the different simulation actions are simulation actions that need to be completed by elements with different behaviors in the target service.
The clock refresher is an abstract definition of an object consisting of a refreshing method (necessary), a pre-method and a post-method, and the objects realizing the definition are all clock refreshers.
Central clock refresher: the system consists of a prepositive module (realizing the prepositive method), a postpositive module (realizing the postpositive method) and a registration element list. And synchronously refreshing the clocks of all registered element clock refreshers according to uniform clock stepping in a registration calling mode.
202. And simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
In the embodiment of the application, a simulation process of a target service to be simulated is simulated into clock refreshing events of a plurality of clock refreshers, the target service is a service of a discrete event, the plurality of clock refreshers include a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements of different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions to be completed by the elements of different behaviors in the target service respectively; and simulating the target service based on the clock refreshing events of the plurality of clock refreshers. In the embodiment of the application, a discrete event driving method is used for simulation, different from simulation software directly using a simulation software developer in the prior art, the target service is simulated into clock refreshing events of a plurality of clock refreshers including a central clock refresher, an element clock refresher and a behavior clock refresher, the clock refreshing events are not limited by simulation scenes and simulation conditions of the simulation software, the simulation under complex scenes can be realized more flexibly, and the simulation software has high simulation flexibility, wide application scenes and strong expansibility.
As shown in fig. 4, in some embodiments of the present application, simulating the simulation process of the target service as the clock refresh event of the plurality of clock refreshers in the clock refresh event in step 201 may include:
401. and building a central clock refresher based on the target service.
The central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
in the embodiment of the application, a discrete event queue for target service simulation is pre-established, the discrete event queue is used for inserting clock refreshing events of each clock refreshing device, specifically, the discrete event queue can be established when a service simulation system is initialized, the clock refreshing event is one of the discrete events, is generated according to a clock step length period and is put into the discrete event queue to be executed through an event priority sequence, and the central clock refreshing device is an object in the clock refreshing event.
402. Respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
403. and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
In some embodiments of the present application, the central clock refresher includes a front module, a refresh module, and a back module, and each element clock refresher includes at least one of the front module, the refresh module, and the back module;
the element clock refresher comprises a front-end module, a back-end module and a service processing module, wherein the front-end module in the element clock refresher is used for calling a preparation service processing logic preset in the current element clock refresher so as to simulate and execute a preparation service; the element clock refresher comprises a refresh module, a behavior clock refresher and a clock module, wherein the refresh module in the element clock refresher is used for calling the behavior clock refresher of the current element clock refresher and the behavior clock refresher related to the refresh service so as to simulate and execute refresh services of different behaviors; the back module in the element clock refresher is used for calling a result processing service logic preset in the current element clock refresher so as to simulate and execute a result processing service;
the front module in the central clock refresher is used for calling the front module in each element clock refresher to simulate and execute the corresponding preparation service, the refresh module in the central clock refresher is used for calling the refresh module in each element clock refresher to simulate and execute the corresponding refresh service, and the rear module in the central clock refresher is used for calling the rear module in each element clock refresher to simulate and execute the corresponding result processing service.
As shown in fig. 5, in some embodiments of the present application, the simulating the target service based on the clock refresh events of the plurality of clock refreshers in step 202 may include:
501. and processing a clock refreshing event every other preset clock step length, calling the front module in each element clock refreshing device by using the front module in the central clock refreshing device in each clock refreshing event, executing a preset preparation service processing logic, and simulating and executing a preparation service.
The preparation service is a service corresponding to preparation work before clock refreshing each time, for example, in a logistics scene, the element clock refresher comprises a vehicle refresher, a front-end module in the vehicle refresher is used for processing a vehicle-to-vehicle service in a logistics field, and the vehicle-to-vehicle service processed in the logistics field is the preparation service.
502. And calling the refreshing module in each element clock refresher by using the refreshing module in the central clock refresher so as to realize the behavior clock refreshers of each element clock refresher related to the refreshing service and simulate to execute the refreshing services of different behaviors.
503. And calling the post module in each element clock refresher by using the post module in the central clock refresher, executing the preset result processing service processing logic in each element clock refresher, and simulating the execution result processing service.
Each clock refresh event needs to execute a series of state change calculations, and a calculation method based on central clock synchronization can well implement this calculation process, and in a specific embodiment, as shown in fig. 6, is a specific architecture diagram of a service simulation system in the embodiment of the present application, where functions of each part are as follows:
TimeRefresh: and the central clock refresher synchronously refreshes the clocks of all registered element clock refreshers in a registration calling mode according to uniform clock stepping. A refresh module (refresh module) is provided for triggering state changes of all registered element clock refreshers within the current clock step; providing a front module (before module) for executing preparation work before clock refreshing; a post-module (after-module) is provided for performing result processing after each clock refresh. Each clock refresh event is performed by a TimeRefresh. The slice grouping can be carried out on the element clock refresher registration list, and the parallel computation can be carried out in a multi-thread or distributed mode so as to meet the efficiency requirement of large-data-volume computation.
Specifically, the number of groups can be set by configuring the number of threads, since the number of threads is configurable, the number of groups is equal to the number of threads, the size of each group is obtained by dividing the total number of clock refreshers by the number of groups, and each group is assigned a thread to process the refresh actions of a plurality of element refreshers in the group, that is, the slice grouping of the registration list of the element clock refreshers is completed.
elementRefresh: the element clock refreshers are constructed aiming at elements with different behaviors (such as vehicles, network points, people and the like in a logistics scene). Each element clock refresher may have a refresh module (refresh module), a front module (before module), and a back module (after module) similar to TimeRefresh, and ElementRefresh needs to be registered on the central clock refresher in order to achieve clock synchronization of all elements in the entire simulation world.
ActionRefresh: the behavior clock refreshers and the element clock refreshers are used for performing simulation actions needing to be completed, and finally the behavior clock refreshers perform the simulation actions, such as unloading, sorting, loading and the like.
The execution process of a clock refresh event is as follows:
the central clock refresher executes preset service logic (before service logic) in the before module, and if the before module exists in the registered element clock refresher, the preset service logic (before service logic) of the before module existing in the element clock refresher is executed together.
The central clock refresher calls preset business logic (refresh business logic) in the refresh module of all registered element clock refreshers.
The element clock refresher invokes preset business logic (refresh business logic) in all its behavior clock refreshers.
The central clock refresher executes the preset service logic (after service logic) in the after module, and if the after module exists in the registered element clock refresher, the central clock refresher executes the preset service logic (after service logic) of the after module existing in the element clock refresher.
In some embodiments of the present application, the service simulation method is applied to a distributed system, and in a distributed environment, the overall architecture shown in fig. 6 may be evolved as shown in fig. 7.
The part inside the bold line box in fig. 7 represents deployment in the same node. In a distributed environment, a central clock refresher is deployed on one node, and a plurality of element clock refreshers and corresponding behavior clock refreshers thereof can be grouped and distributed on a plurality of nodes according to a certain rule. Specifically, before the target service is simulated based on the clock refresh events of the plurality of clock refreshers, the method further includes: deploying the central clock refresher on a node of the distributed system; and grouping the element clock refreshers and the corresponding behavior clock refreshers according to a preset strategy slice, and deploying the element clock refreshers and the behavior clock refreshers on a plurality of nodes of the distributed system.
At the moment, the element clock refreshers are registered on the central clock refresher, and in the running process of each clock refreshing event, the central clock refresher uniformly informs all the element clock refreshers to execute refreshing, so that a refreshing method of the behavior clock refreshers is called to simulate corresponding behaviors, and the clock synchronization of different nodes under a distributed environment is realized.
When the target service is a logistics service, the plurality of element clock refreshers comprise a vehicle refresher and a site refresher; the field refresher comprises an unloading refresher, a sorting refresher and a loading refresher;
the central clock refresher is used for synchronously refreshing the clocks of all registered site refreshers in a registration calling mode according to a preset clock step length;
the vehicle refresher is an element clock refresher constructed by vehicle elements for executing the behaviors of arriving at and leaving a vehicle; the field refresher is an element clock refresher which is used for constructing field elements capable of executing unloading behaviors, sorting behaviors and loading behaviors;
the unloading refresher is used for simulating the unloading behavior of the vehicle on the logistics field;
the sorting refresher is used for simulating the sorting behavior of the express in the logistics field;
the loading refresher is used for simulating the loading behavior of the express mail in the logistics field.
In a specific implementation scenario, taking the logistics industry as an example, a hundred million-level express mail on the whole network is simulated, a million-level transport capacity is used, the whole process of transferring among tens of thousands of sites, unloading to express mail sorting from a vehicle, loading and dispatching is performed, the service process is shown in fig. 8, a service simulation method based on central clock synchronization in the embodiment of the application is adopted, the architecture is shown in fig. 9, and the functions of each module are as follows:
TimeRefresh: and the central clock refresher synchronously refreshes the clocks of all registered site refreshers in a registration calling mode according to uniform clock stepping (the step length is 1 minute). The Refresh module triggers the state change of all registered site refreshers in the current clock step length; the before module calls the before business logic of the vehicle refresher; the after module invokes the after business logic of the vehicle refresher.
VehicleRefresh: the vehicle refresher is an element refresher constructed aiming at vehicle elements capable of executing the behaviors of getting on and off the vehicle. The method comprises the following steps that (1) before service logic in a before module simulates field processing arrival service; the after module after service logic simulates the field processing departure service. The vehicle refresher in this example does not have a refresh module.
ZoneRefresh: the site refresher is an element refresher constructed aiming at site elements capable of executing unloading, sorting and loading behaviors. The plurality of site refreshers in the figure simulate a plurality of different transitions or points in a logistics scene. The site refresher has a refresh module farm, and in this embodiment the site refresher does not have a before module and an after module. And registering all site refreshers to the central clock refresher to realize clock synchronization of all logistics sites in the whole simulation world.
UnloadRefresh: an unloading refresher, a behavior refresher of a site element, for simulating an unloading behavior of a vehicle on a site. In this embodiment, a plurality of vehicles from other sites may be present in a site, each vehicle performing an unloading operation, and thus a plurality of unloading refreshers may be constructed.
SortRefresh: the sorting refresher is a behavior refresher of site elements and is used for simulating the sorting behavior of express mail in a site.
LoadRefresh: the loading refresher is a behavior refresher of site elements and is used for simulating the loading behavior of express mails in a site.
The business process simulated by taking one clock step as an example is as follows:
(1) processing a clock refreshing event every 1 minute, executing the before service logic of the central clock refresher, and simulating the vehicle service: the method comprises the following services of calculating unloading stowage, calculating vehicle queuing, calculating an idle unloading card port and the like.
(2) And executing refresh service logic of the central clock refresher, carrying out slice grouping on the registration list of the site element refresher, and executing the refresh service logic in the site refresher in parallel by adopting multithreading.
(3) The refresh business logic of the site refresher simulates services of switching of shifts, transferring to a loading and unloading truck mount and the like, then the refresh business logic of the unloading, sorting and loading refresher is sequentially executed, and the services of unloading vehicles on the unloading mount, releasing the mount, simulating sorting of express in the site, simulating loading of vehicles on the loading mount, storing of express and the like are simulated.
(4) Executing the after service logic of the central clock refresher, and simulating departure service: the method comprises the businesses of full-load early departure, departure to planning time, release of loading bayonets, planning arrival at the next site and the like.
In order to better implement the service simulation method in the embodiment of the present invention, on the basis of the service simulation method, an embodiment of the present invention further provides a service simulation apparatus, where the service simulation apparatus is applied to a computer device, as shown in fig. 10, the service simulation apparatus 1000 includes:
a service simulation unit 1001, configured to simulate a simulation process of a target service to be simulated as a clock refresh event of multiple clock refreshers, where the target service is a service of a discrete event, where the multiple clock refreshers include a central clock refresher configured to process the clock refresh event corresponding to the target service, multiple element clock refreshers corresponding to elements of different behaviors in the target service, and multiple behavior clock refreshers corresponding to different simulation actions, where the different simulation actions are simulation actions that need to be completed by the elements of different behaviors in the target service, respectively;
a service simulation unit 1002, configured to simulate the target service based on the clock refresh events of the plurality of clock refreshers.
In this embodiment, a service simulation unit 1001 simulates a simulation process of a target service to be simulated into a clock refresh event of a plurality of clock refreshers, where the target service is a service of a discrete event, the plurality of clock refreshers include a central clock refresher for processing the clock refresh event corresponding to the target service, a plurality of element clock refreshers corresponding to elements of different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, where the different simulation actions are simulation actions to be completed by the elements of different behaviors in the target service; the service simulation unit 1002 simulates the target service based on the clock refresh events of the plurality of clock refreshers. In the embodiment of the application, a discrete event driving method is used for simulation, different from simulation software directly using a simulation software developer in the prior art, the target service is simulated into clock refreshing events of a plurality of clock refreshers including a central clock refresher, an element clock refresher and a behavior clock refresher, the clock refreshing events are not limited by simulation scenes and simulation conditions of the simulation software, the simulation under complex scenes can be realized more flexibly, and the simulation software has high simulation flexibility, wide application scenes and strong expansibility.
In some embodiments of the present application, the service simulation unit is specifically configured to:
based on the target service, a central clock refresher is newly built, and the central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
In some embodiments of the present application, the central clock refresher includes a front module, a refresh module, and a back module, and each element clock refresher includes at least one of the front module, the refresh module, and the back module;
the element clock refresher comprises a front-end module, a back-end module and a service processing module, wherein the front-end module in the element clock refresher is used for calling a preparation service processing logic preset in the current element clock refresher so as to simulate and execute a preparation service; the element clock refresher comprises a refresh module, a behavior clock refresher and a clock module, wherein the refresh module in the element clock refresher is used for calling the behavior clock refresher of the current element clock refresher and the behavior clock refresher related to the refresh service so as to simulate and execute refresh services of different behaviors; the back module in the element clock refresher is used for calling a result processing service logic preset in the current element clock refresher so as to simulate and execute a result processing service;
the front module in the central clock refresher is used for calling the front module in each element clock refresher to simulate and execute the corresponding preparation service, the refresh module in the central clock refresher is used for calling the refresh module in each element clock refresher to simulate and execute the corresponding refresh service, and the rear module in the central clock refresher is used for calling the rear module in each element clock refresher to simulate and execute the corresponding result processing service.
In some embodiments of the present application, the service simulation unit is specifically configured to:
processing a clock refreshing event every other preset clock step length, calling the front module in each element clock refreshing device by using the front module in the central clock refreshing device in each clock refreshing event, executing a preset preparation service processing logic and simulating and executing a preparation service;
calling the refreshing module in each element clock refresher by using the refreshing module in the central clock refresher so as to realize the behavior clock refreshers of each element clock refresher related to the refreshing service and simulate to execute the refreshing services of different behaviors;
and calling the post module in each element clock refresher by using the post module in the central clock refresher, executing the preset result processing service processing logic in each element clock refresher, and simulating the execution result processing service.
In some embodiments of the present application, the target service is a logistics service, and the plurality of element clock refreshers include a vehicle refresher and a site refresher; the field refresher comprises an unloading refresher, a sorting refresher and a loading refresher;
the central clock refresher is used for synchronously refreshing the clocks of all registered site refreshers in a registration calling mode according to a preset clock step length;
the vehicle refresher is an element clock refresher constructed by vehicle elements for executing the behaviors of arriving at and leaving a vehicle; the field refresher is an element clock refresher which is used for constructing field elements capable of executing unloading behaviors, sorting behaviors and loading behaviors;
the unloading refresher is used for simulating the unloading behavior of the vehicle on the logistics field;
the sorting refresher is used for simulating the sorting behavior of the express in the logistics field;
the loading refresher is used for simulating the loading behavior of the express mail in the logistics field.
In some embodiments of the present application, the service simulation method is applied to a distributed system, and the apparatus further includes a deployment unit, where the deployment unit is specifically configured to:
deploying the central clock refresher on a node of the distributed system before the target service is simulated based on the clock refresh events of the plurality of clock refreshers;
and grouping the element clock refreshers and the corresponding behavior clock refreshers according to a preset strategy slice, and deploying the element clock refreshers and the behavior clock refreshers on a plurality of nodes of the distributed system.
The embodiment of the present invention further provides a computer device, which integrates any one of the service simulation apparatuses provided by the embodiments of the present invention, where the computer device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor for performing the steps of the business simulation method described in any of the above business simulation method embodiments.
The embodiment of the invention also provides computer equipment which integrates any service simulation device provided by the embodiment of the invention. Fig. 11 is a schematic diagram showing a structure of a computer device according to an embodiment of the present invention, specifically:
the computer device may include components such as a processor 1101 of one or more processing cores, memory 1102 of one or more computer-readable storage media, a power supply 1103, and an input unit 1104. Those skilled in the art will appreciate that the computer device architecture illustrated in FIG. 11 is not intended to be limiting of computer devices and may include more or less components than those illustrated, or combinations of certain components, or different arrangements of components. Wherein:
the processor 1101 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 1102 and calling data stored in the memory 1102, thereby performing overall monitoring of the computer device. Optionally, processor 1101 may include one or more processing cores; preferably, the processor 1101 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1101.
The memory 1102 may be used to store software programs and modules, and the processor 1101 executes various functional applications and data processing by operating the software programs and modules stored in the memory 1102. The memory 1102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 1102 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 1102 may also include a memory controller to provide the processor 1101 with access to the memory 1102.
The computer device further includes a power supply 1103 for supplying power to the various components, and preferably, the power supply 1103 is logically connected to the processor 1101 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 1103 may also include any component, such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may further include an input unit 1104, and the input unit 1104 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 1101 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 1102 according to the following instructions, and the processor 1101 runs the application programs stored in the memory 1102, so as to implement various functions as follows:
simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, wherein the target service is a service of a discrete event, the plurality of clock refreshers comprise a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions required to be completed by the elements with different behaviors in the target service respectively;
and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. Stored thereon, is a computer program, which is loaded by a processor to execute the steps of any of the service simulation methods provided by the embodiments of the present invention. For example, the computer program may be loaded by a processor to perform the steps of:
simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, wherein the target service is a service of a discrete event, the plurality of clock refreshers comprise a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions required to be completed by the elements with different behaviors in the target service respectively;
and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.
In a specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as one or several entities, and the specific implementation of each unit or structure may refer to the foregoing method embodiment, which is not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The service simulation method, the service simulation device, the computer device, and the storage medium according to the embodiments of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for service emulation, the method comprising:
simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, wherein the target service is a service of a discrete event, the plurality of clock refreshers comprise a central clock refresher for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions required to be completed by the elements with different behaviors in the target service respectively;
and simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
2. The service simulation method according to claim 1, wherein simulating the simulation process of the target service as a clock refresh event of a plurality of clock refreshers in the clock refresh event comprises:
based on the target service, a central clock refresher is newly built, and the central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
3. The service simulation method according to claim 2, wherein the central clock refresher comprises a front module, a refresh module and a back module, and each element clock refresher comprises at least one of a front module, a refresh module and a back module;
the element clock refresher comprises a front-end module, a back-end module and a service processing module, wherein the front-end module in the element clock refresher is used for calling a preparation service processing logic preset in the current element clock refresher so as to simulate and execute a preparation service; the element clock refresher comprises a refresh module, a behavior clock refresher and a clock module, wherein the refresh module in the element clock refresher is used for calling the behavior clock refresher of the current element clock refresher and the behavior clock refresher related to the refresh service so as to simulate and execute refresh services of different behaviors; the back module in the element clock refresher is used for calling a result processing service logic preset in the current element clock refresher so as to simulate and execute a result processing service;
the front module in the central clock refresher is used for calling the front module in each element clock refresher to simulate and execute the corresponding preparation service, the refresh module in the central clock refresher is used for calling the refresh module in each element clock refresher to simulate and execute the corresponding refresh service, and the rear module in the central clock refresher is used for calling the rear module in each element clock refresher to simulate and execute the corresponding result processing service.
4. The service simulation method according to claim 3, wherein the simulating the target service based on the clock refresh events of the plurality of clock refreshers comprises:
processing a clock refreshing event every other preset clock step length, calling the front module in each element clock refreshing device by using the front module in the central clock refreshing device in each clock refreshing event, executing a preset preparation service processing logic and simulating and executing a preparation service;
calling the refreshing module in each element clock refresher by using the refreshing module in the central clock refresher so as to realize the behavior clock refreshers of each element clock refresher related to the refreshing service and simulate to execute the refreshing services of different behaviors;
and calling the post module in each element clock refresher by using the post module in the central clock refresher, executing the preset result processing service processing logic in each element clock refresher, and simulating the execution result processing service.
5. The business simulation method according to any one of claims 1 to 4, wherein the target business is a logistics business, and the plurality of element clock refreshers include a vehicle refresher and a site refresher; the field refresher comprises an unloading refresher, a sorting refresher and a loading refresher;
the central clock refresher is used for synchronously refreshing the clocks of all registered site refreshers in a registration calling mode according to a preset clock step length;
the vehicle refresher is an element clock refresher constructed by vehicle elements for executing the behaviors of arriving at and leaving a vehicle; the field refresher is an element clock refresher which is used for constructing field elements capable of executing unloading behaviors, sorting behaviors and loading behaviors;
the unloading refresher is used for simulating the unloading behavior of the vehicle on the logistics field;
the sorting refresher is used for simulating the sorting behavior of the express in the logistics field;
the loading refresher is used for simulating the loading behavior of the express mail in the logistics field.
6. The service simulation method according to any one of claims 1 to 4, wherein the service simulation method is applied to a distributed system, and before the target service is simulated based on the clock refresh events of the plurality of clock refreshers, the method further comprises:
deploying the central clock refresher on a node of the distributed system;
and grouping the element clock refreshers and the corresponding behavior clock refreshers according to a preset strategy slice, and deploying the element clock refreshers and the behavior clock refreshers on a plurality of nodes of the distributed system.
7. A service emulation apparatus, comprising:
the system comprises a service simulation unit, a service simulation unit and a service control unit, wherein the service simulation unit is used for simulating a simulation process of a target service to be simulated into clock refreshing events of a plurality of clock refreshers, the target service is a service of a discrete event, the clock refreshers comprise a central clock refresher used for processing the clock refreshing event corresponding to the target service, a plurality of element clock refreshers corresponding to elements with different behaviors in the target service, and a plurality of behavior clock refreshers corresponding to different simulation actions, and the different simulation actions are simulation actions which need to be completed by the elements with different behaviors in the target service;
and the service simulation unit is used for simulating the target service based on the clock refreshing events of the plurality of clock refreshers.
8. The service emulation device of claim 7, wherein the service emulation unit is specifically configured to:
based on the target service, a central clock refresher is newly built, and the central clock refresher is used for synchronously refreshing all clocks of the element clock refreshers registered to the central clock refresher in a registration calling mode according to a preset clock step length;
respectively constructing a plurality of different element clock refreshers based on elements with different behaviors in the target service, and registering the element clock refreshers in the central clock refresher;
and respectively constructing a plurality of different behavior clock refreshers for each element clock refresher based on different simulation actions to be completed by elements of different behaviors in the target service.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the business simulation method of any of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor for performing the steps in the service simulation method of any of claims 1 to 6.
CN202010354837.1A 2020-04-29 2020-04-29 Service simulation method and device, computer equipment and storage medium Pending CN113569373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010354837.1A CN113569373A (en) 2020-04-29 2020-04-29 Service simulation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010354837.1A CN113569373A (en) 2020-04-29 2020-04-29 Service simulation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113569373A true CN113569373A (en) 2021-10-29

Family

ID=78158394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010354837.1A Pending CN113569373A (en) 2020-04-29 2020-04-29 Service simulation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113569373A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239372A1 (en) * 2011-03-14 2012-09-20 Nec Laboratories America, Inc. Efficient discrete event simulation using priority queue tagging
CN103002490A (en) * 2011-09-08 2013-03-27 中国移动通信集团公司 Service simulation testing system and realizing method thereof
CN104866374A (en) * 2015-05-22 2015-08-26 北京华如科技股份有限公司 Multi-task-based discrete event parallel simulation and time synchronization method
US20180173825A1 (en) * 2015-06-25 2018-06-21 Commissariat A L'energie Atomique Et Aux Energies Alternatives Computer-implemented method of performing parallelized electronic-system level simulations
CN109063225A (en) * 2018-06-05 2018-12-21 北京交通大学 One kind runing emulation mode towards more cargo functional areas Railway Logistics Center
CN110310057A (en) * 2019-04-08 2019-10-08 顺丰科技有限公司 Kinds of goods sequence and goods yard processing method, device, equipment and its storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239372A1 (en) * 2011-03-14 2012-09-20 Nec Laboratories America, Inc. Efficient discrete event simulation using priority queue tagging
CN103002490A (en) * 2011-09-08 2013-03-27 中国移动通信集团公司 Service simulation testing system and realizing method thereof
CN104866374A (en) * 2015-05-22 2015-08-26 北京华如科技股份有限公司 Multi-task-based discrete event parallel simulation and time synchronization method
US20180173825A1 (en) * 2015-06-25 2018-06-21 Commissariat A L'energie Atomique Et Aux Energies Alternatives Computer-implemented method of performing parallelized electronic-system level simulations
CN109063225A (en) * 2018-06-05 2018-12-21 北京交通大学 One kind runing emulation mode towards more cargo functional areas Railway Logistics Center
CN110310057A (en) * 2019-04-08 2019-10-08 顺丰科技有限公司 Kinds of goods sequence and goods yard processing method, device, equipment and its storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
H. MA等: "Research on structure analysis and simulation optimization of parallel grooved multi-layer drum based on ANSYS Workbench", 《2015 IEEE 19TH INTERNATIONAL CONFERENCE ON COMPUTER SUPPORTED COOPERATIVE WORK IN DESIGN (CSCWD)》, pages 372 - 376 *
YIQIAN CUI等: "Discrete Event Logistics Systems (DELS) simulation modeling incorporating two-step Remaining Useful Life (RUL) estimation", 《COMPUTERS IN INDUSTRY》, vol. 72, pages 68 - 81, XP029178197, DOI: 10.1016/j.compind.2015.04.003 *
陈楚校等: "互联网背景下物流包装盒回收方案设计与调度优化模型", 《商场现代化》, no. 19, pages 31 - 34 *

Similar Documents

Publication Publication Date Title
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN111290854B (en) Task management method, device, system, computer storage medium and electronic equipment
CN102279730B (en) Parallel data processing method, device and system
CN108243012A (en) Charging application processing system, method and device in online charging system OCS
CN108416657B (en) Order generation method and equipment based on consultation service
CN112084015B (en) Cloud computing-based simulation cloud platform building system and method
CN110362401A (en) Data run the member host in batch method, apparatus, storage medium and cluster
CN109656599A (en) The method and system updated for client release
CN109743137A (en) A kind of Distributed Delay message queue processing system for supporting to update
CN112069266A (en) Data synchronization method and service node
CN112418584A (en) Task planning method and device, computer equipment and storage medium
CN111464352A (en) Call link data processing method and device
CN115328741A (en) Exception handling method, device, equipment and storage medium
CN115150471A (en) Data processing method, device, equipment, storage medium and program product
CN113569373A (en) Service simulation method and device, computer equipment and storage medium
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN111427689B (en) Cluster keep-alive method and device and storage medium
CN115829451A (en) Logistics path planning method and device, computer equipment and storage medium
CN113051279A (en) Data message storage method, storage device, electronic equipment and storage medium
CN115981871A (en) GPU resource scheduling method, device, equipment and storage medium
CN115563160A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN109753357A (en) The resource and constructing network topology method, equipment, medium of virtual machine management platform
CN113468713A (en) Service simulation method and device, computer equipment and storage medium
CN116010065A (en) Distributed task scheduling method, device and equipment
CN115759577A (en) Dynamic task scheduling method and device, electronic equipment and storage medium

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