Data reading method and apparatus for MSC interface

By acquiring the MSC interface status and the number of FIFO queue instructions, a control policy set is generated, which solves the data instability problem caused by the inconsistency between the uplink and downlink rates of the MSC interface, realizes the effective execution of read instructions and the correctness of data order, and reduces system load.

WO2026001858A1PCT designated stage Publication Date: 2026-01-02CHINA FAW CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/102524
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-24
Filing Date
2025-06-20
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Inconsistent uplink and downlink rates of the MSC interface lead to unstable data reading. Existing methods that manually increase latency result in dropped read commands and increased system load.

Method used

By acquiring the status information of the MSC interface and the number of instructions in the FIFO queue, a control policy set is generated to control the sending of read instructions and state switching of the MSC interface. The FIFO queue mechanism is used to store read instructions when the interface is busy, ensuring that each instruction is executed effectively.

Benefits of technology

This effectively avoids the loss of read commands, ensures the correct data reception order, and reduces system load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025102524_02012026_PF_FP_ABST
    Figure CN2025102524_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a data reading method and apparatus for an MSC interface. The method comprises: acquiring data reading state information of an MSC interface, and the number of instructions in a FIFO queue; and on the basis of the state information and the number of instructions, generating a control strategy set, wherein the control strategy set comprises at least one of the following: controlling the MSC interface to send a reading instruction and controlling the data reading state of the MSC interface to be a busy state; controlling a reading instruction to be sent to join to the FIFO queue at the tail; controlling the MSC interface to send a reading instruction located at the head of the FIFO queue and controlling the data reading state of the MSC interface to be a busy state; and controlling the data reading state of the MSC interface to be an idle state. The present application solves the technical problem of unstable data reading caused by the inconsistency in uplink and downlink rates of an MSC interface.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for reading data from MSC interface TECHNICAL FIELD

[0001] The present application relates to the technical field of communication data transmission, in particular to a method and device for reading data from MSC interface. The present application claims priority to the patent application with the application number 202410822059.2, the title of which is "Method and device for reading data from MSC interface", which was filed with the China National Intellectual Property Administration on June 24, 2024. BACKGROUND

[0002] The MSC interface is a serial interface, which is specially used for connecting external power supply devices (such as L9788 chip) to the TC29x series of smart card chips. The powerful downlink serial data transmission capability minimizes the number of pins required to connect such external power supply devices. Parallel data information (from the timer unit) or command information is sent to the power supply device through a high-speed synchronous serial data stream (downlink channel), and the MSC interface receives data and status (uplink channel) from the power supply device through a low-speed asynchronous serial data stream.

[0003] Due to the inconsistent characteristics of the uplink and downlink rates of the MSC interface, after the read instruction is issued, a certain time needs to be waited before writing back to the global variable (L9788WD_REGS) through the interrupt service function. The method of manually increasing the delay between two read instructions is generally adopted, but there are the following defects: if the manually increased delay is not enough, the L9788 chip will discard the execution of the next read instruction, resulting in the disorder of the received value sequence; the delay will inevitably cover all cases to take the maximum value, increasing the additional system load.

[0004] At present, there is no effective solution to the technical problem of unstable reading data caused by the inconsistent uplink and downlink rates of the MSC interface. SUMMARY

[0005] The embodiments of the present application provide a method and device for reading data from MSC interface, to at least solve the technical problem of unstable reading data caused by the inconsistent uplink and downlink rates of the MSC interface.

[0006] According to an aspect of the embodiments of the present application, a method for reading data by MSC interface is provided, comprising: obtaining state information of reading data by MSC interface and a number of instructions in a FIFO queue, wherein the state information comprises at least one of the following: information that the MSC interface is in an idle state, information that the MSC interface is in a busy state; generating a control strategy set based on the state information and the number of instructions, wherein the control strategy set comprises at least one of the following: a control strategy that controls the MSC interface to send a reading instruction and controls a state of reading data by the MSC interface to be the busy state, a control strategy that controls a reading instruction to be sent to be added to a tail of the FIFO queue, a control strategy that controls the MSC interface to send a reading instruction located at a head of the FIFO queue and controls the state of reading data by the MSC interface to be the busy state, a control strategy that controls the state of reading data by the MSC interface to be the idle state.

[0007] Optionally, the obtaining the state information of reading data by the MSC interface and the number of instructions in the FIFO queue and the generating the control strategy set based on the state information comprises: in a case that it is determined that the MSC interface is in the idle state, generating a first control strategy in the control strategy set, wherein the first control strategy is used to control the MSC interface to send a reading instruction and control the state of reading data by the MSC interface to be the busy state.

[0008] Optionally, the obtaining the state information of reading data by the MSC interface and the number of instructions in the FIFO queue and the generating the control strategy set based on the state information comprises: in a case that it is determined that the MSC interface is in the busy state, generating a second control strategy in the control strategy set, wherein the second control strategy is used to control a reading instruction to be sent to be added to the tail of the FIFO queue; in a case that it is determined that the MSC interface receives preset data, judging whether the number of instructions in the FIFO queue is equal to 0; if yes, generating a third control strategy in the control strategy set, wherein the third control strategy is used to control the state of reading data by the MSC interface to be the idle state.

[0009] Optionally, the obtaining the state information of reading data by the MSC interface and the number of instructions in the FIFO queue and the generating the control strategy set based on the state information and the number of instructions comprises: in a case that it is determined that the MSC interface is in the busy state, generating a second control strategy in the control strategy set, wherein the second control strategy is used to control a reading instruction to be sent to be added to the tail of the FIFO queue; in a case that it is determined that the MSC interface receives preset data, judging whether the number of instructions in the FIFO queue is equal to 0; if no, generating a fourth control strategy in the control strategy set, wherein the fourth control strategy is used to control the MSC interface to send a reading instruction located at the head of the FIFO queue and control the state of reading data by the MSC interface to be the busy state.

[0010] Optionally, before determining whether the number of instructions in the FIFO queue is equal to 0, the method further comprises: updating the first number of instructions in the FIFO queue to a second number of instructions after sending the read instruction located at the head of the FIFO queue by the MSC interface and after the read instruction to be sent is added to the tail of the FIFO queue; and determining whether the number of instructions in the FIFO queue is equal to 0 according to the second number of instructions.

[0011] Optionally, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are obtained, and the control strategy set is generated based on the state information and the number of instructions, comprising: generating a second control strategy in the control strategy set in the case that the MSC interface is in the busy state, wherein the second control strategy is used to control the read instruction to be sent to be added to the tail of the FIFO queue; calculating a delay duration of the MSC interface receiving the preset data according to the number of instructions in the FIFO queue; and generating a third control strategy in the control strategy set after the delay duration, wherein the third control strategy is used to control the state of the MSC interface reading data to be the idle state.

[0012] According to another aspect of the embodiments of the present application, a reading device of an MSC interface reading data is also provided, comprising: an obtaining module, configured to obtain state information of the MSC interface reading data and a number of instructions in a FIFO queue, wherein the state information comprises at least one of the following: information that the MSC interface is in an idle state, information that the MSC interface is in a busy state; and a generating module, configured to generate a control strategy set based on the state information and the number of instructions, wherein the control strategy set comprises at least one of the following: controlling the MSC interface to send a read instruction and controlling the state of the MSC interface reading data to be the busy state, controlling a read instruction to be sent to be added to the tail of the FIFO queue, controlling the MSC interface to send a read instruction located at the head of the FIFO queue and controlling the state of the MSC interface reading data to be the busy state, and controlling the state of the MSC interface reading data to be the idle state.

[0013] According to another aspect of the embodiments of the present application, a computer storage medium is also provided, comprising a stored program, wherein the program controls the device where the computer storage medium is located to execute the above method when the program is running.

[0014] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above method.

[0015] According to another aspect of the embodiments of the present application, a computer program product is also provided, comprising a computer program, wherein the computer program is executed by a processor to implement the above method.

[0016] In the embodiment of the present application, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are acquired, the control strategy set is generated based on the state information and the number of instructions, when the MSC interface is in the idle state, the MSC interface is controlled to send the reading instruction and the state of the MSC interface reading data is controlled to be the busy state; when the MSC interface is in the busy state, the reading instruction to be sent is controlled to be added to the tail of the FIFO queue, and after the MSC interface is idle, the instructions in the FIFO queue are sent. In the above method, the FIFO queue mechanism is adopted, when the MSC interface is in the busy state, i.e., the reading data is too fast, the reading instruction to be sent is stored in the FIFO queue, so that each reading instruction is effectively executed and returned, so as to avoid the disorder of the received data sequence caused by the loss of the reading instruction. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application. In the drawings:

[0018] Fig. 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for the MSC interface reading data according to an embodiment of the present application;

[0019] Fig. 2 is a flow chart of a method for the MSC interface reading data according to a first embodiment of the present application;

[0020] Fig. 3 is a flow chart of a method for the MSC interface reading data according to a second embodiment of the present application;

[0021] Fig. 4 is a flow chart of a method for the MSC interface reading data according to a third embodiment of the present application;

[0022] Fig. 5 is a structure block diagram of a reading device for the MSC interface reading data according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. Embodiment 1

[0025] According to an embodiment of the present application, a method embodiment for MSC interface reading data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0026] FIG. 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for MSC interface reading data according to an embodiment of the present application. As shown in FIG. 1, the computer terminal (or mobile device) can include one or more processors 102 (the processor can include but not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc. processing device) and a memory 104 for storing data. In addition, it can also include a transmission device 106 for communication function, an input and output device 108, and a display 110. Those skilled in the art can understand that the structure shown in FIG. 1 is only schematic, and it does not limit the structure of the above-mentioned computer terminal (or mobile device). For example, the computer terminal can include more or less components than the above structure description, or have a different configuration from the above structure description.

[0027] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the method for reading data of MSC interface in the embodiments of the present application. The processor 102 can execute various functional applications and data processing, i.e., implement the method for reading data of MSC interface described above, by running the computer programs stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include memories remotely arranged with respect to the processor 102, which can be connected to the mobile terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0028] The transmission device 106 is configured to receive or send data via a network. Examples of the network include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.

[0029] The display 110 can be a touch screen liquid crystal display (LCD). The liquid crystal display can enable a user to interact with a user interface on the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user can interact with the GUI through finger contacts and / or gestures on the touch-sensitive surface. The interactions with the GUI can optionally include one or more of the following: creating a webpage, drawing, text editing, composing an email, playing a game, viewing a video, viewing a digital photo, and / or viewing an online video. Executable instructions for performing these interactions can be configured / stored in a computer program product or a readable storage medium that is executable by one or more processors.

[0030] FIG. 2 is a flowchart of a method for reading data of MSC interface according to an embodiment of the present application. As shown in FIG. 2, the method includes the following steps:

[0031] In step S1, state information of the MSC interface reading data and a number of instructions in a FIFO queue are obtained. The state information includes at least one of the following: information that the MSC interface is in an idle state, and information that the MSC interface is in a busy state.

[0032] Specifically, the MSC interface is integrated on a chip, the chip is provided with one or more registers for storing state information of data read by the MSC interface and a number of instructions in a FIFO queue, and the CPU in the chip is provided with an obtaining module for obtaining the state information of data read by the MSC interface and the number of instructions in the FIFO queue from the registers.

[0033] Step S2: generating a control strategy set based on the state information and the number of instructions, the control strategy set including at least one of the following: controlling the MSC interface to send a read instruction and the state of the MSC interface to read data being a busy state, controlling a read instruction to be sent to be added to the tail of the FIFO queue, controlling the MSC interface to send a read instruction located at the head of the FIFO queue and the state of the MSC interface to read data being a busy state, and controlling the state of the MSC interface to read data being an idle state.

[0034] Specifically, the CPU in the chip is further provided with a generating module in communication with the obtaining module, the generating module generating a control strategy set based on the state information and the number of instructions to control the MSC interface to transmit data. The FIFO queue is a data structure, and the sending order of the FIFO queue follows the principle of first-in first-out, that is, the read instructions to be sent are sorted, and new elements are added to the tail of the FIFO queue and elements are removed from the head of the FIFO queue.

[0035] In the embodiments of the present application, the state information of data read by the MSC interface and the number of instructions in the FIFO queue are obtained, a control strategy set is generated based on the state information and the number of instructions, when the MSC interface is in an idle state, the MSC interface is controlled to send a read instruction and the state of the MSC interface to read data is controlled to be a busy state; when the MSC interface is in a busy state, a read instruction to be sent is added to the tail of the FIFO queue, and the instructions in the FIFO queue are sent after the MSC interface is idle. In the above method, the FIFO queue mechanism is used, when the MSC interface is in a busy state, that is, the data is read too fast, the read instruction to be sent is stored in the FIFO queue, so that each read instruction is effectively executed and returned, so as to avoid the disorder of the received data sequence caused by the loss of the read instruction.

[0036] Further, the state information of data read by the MSC interface and the number of instructions in the FIFO queue are obtained, a control strategy set is generated based on the state information, and the method includes the following steps:

[0037] In a case where it is determined that the MSC interface is in an idle state, a first control strategy in the control strategy set is generated, wherein the first control strategy is used to control the MSC interface to send a read instruction and the state of the MSC interface to read data being a busy state.

[0038] It should be noted that the MSC interface is in an idle state, indicating that the current MSC interface is not occupied by a data stream or a signaling stream, and the MSC interface is in a waiting state, and the MSC interface can send a read instruction according to actual needs.

[0039] Further, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are obtained, and a control strategy set is generated based on the state information, and the control strategy set further includes the following steps:

[0040] Step S10: In a case where it is determined that the MSC interface is in a busy state, a second control strategy in the control strategy set is generated, wherein the second control strategy is used to control a read instruction to be sent to be added to the tail of the FIFO queue.

[0041] It should be noted that the MSC interface is in a busy state, indicating that the current MSC interface is occupied by a data stream or a signaling stream, and the current MSC interface cannot send a new read instruction. The read instruction to be sent is added to the tail of the FIFO queue to wait, that is, the read instruction in the FIFO queue is sent in the storage order after the MSC interface is idle.

[0042] Step S20: In a case where it is determined that the MSC interface receives preset data, it is determined whether the number of instructions in the FIFO queue is equal to 0.

[0043] It should be noted that the MSC interface receives preset data, indicating that the returned data has been stored in the global variable through the middle section service function, and the MSC interface completes the data transmission.

[0044] Step S30: If yes, a third control strategy in the control strategy set is generated, wherein the third control strategy is used to control the state of the MSC interface reading data to be an idle state.

[0045] It should be noted that the number of instructions in the FIFO queue is equal to 0, indicating that the read instruction in the FIFO queue has been sent, and the current MSC interface has no data transmission task, that is, the state of the MSC interface reading data is an idle state.

[0046] The above steps S10 to S30, the MSC interface is in a busy state, and the state and action of the MSC interface at the next time are determined in combination with the receiving state of the current MSC interface and the number of instructions in the FIFO queue.

[0047] Further, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are obtained, and a control strategy set is generated based on the state information, and the control strategy set further includes the following steps:

[0048] Step S100: in the case of determining that the MSC interface is in the busy state, generating a second control strategy in the control strategy set, wherein the second control strategy is used to control the read instruction to be sent to join the tail of the FIFO queue.

[0049] It should be noted that the MSC interface is in the busy state, which means that the current MSC interface is occupied by a data stream or a signaling stream, and the current MSC interface cannot send a new read instruction. The read instruction to be sent is added to the tail of the FIFO queue for waiting, that is, the read instruction in the FIFO queue is sent in the storage order after the MSC interface is idle.

[0050] Step S200: in the case of determining that the MSC interface receives preset data, judging whether the number of instructions in the FIFO queue is equal to 0.

[0051] It should be noted that the MSC interface receives the preset data, which means that the returned data has been stored in the global variable through the middle segment service function, and the MSC interface completes the data transmission this time.

[0052] Step S300: if not, generating a fourth control strategy in the control strategy set, wherein the fourth control strategy is used to control the MSC interface to send the read instruction located at the head of the FIFO queue, and the state of the MSC interface to read data is the busy state.

[0053] It should be noted that the number of instructions in the FIFO queue is not equal to 0, which means that the read instruction in the FIFO queue has not been sent completely, and the current MSC interface has a data transmission task, that is, the MSC interface needs to send the read instruction located at the head of the FIFO queue at the next moment.

[0054] The above steps S100 to S300, the MSC interface is in the busy state, and the state and action of the MSC interface at the next moment are determined in combination with the receiving state of the current MSC interface and the number of instructions in the FIFO queue. During the execution of the command by the MSC interface, the corresponding chip CPU executes other codes, that is, the chip CPU responds to and processes other interrupts with lower priority during the waiting of the MSC interface data.

[0055] Wherein, before judging whether the number of instructions in the FIFO queue is equal to 0, the number of instructions in the FIFO queue is updated in real time, that is, after the MSC interface sends the read instruction located at the head of the FIFO queue, the number of instructions in the FIFO queue needs to be reduced by 1, and after the read instruction to be sent joins the tail of the FIFO queue, the number of instructions in the FIFO queue needs to be increased by 1, and the first number of instructions in the FIFO queue is updated to the second number of instructions; according to the second number of instructions, whether the number of instructions in the FIFO queue is equal to 0 is judged.

[0056] Further, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are acquired, the control strategy set is generated based on the state information, and the control strategy set further includes the following steps.

[0057] In a case where it is determined that the MSC interface is in the busy state, a second control strategy in the control strategy set is generated, where the second control strategy is used to control the read instruction to be sent to be added to the tail of the FIFO queue.

[0058] It should be noted that the MSC interface is in the busy state, which means that the current MSC interface is occupied by a data stream or a signaling stream, and the current MSC interface cannot send a new read instruction. The read instruction to be sent is added to the tail of the FIFO queue for waiting, that is, the read instruction in the FIFO queue is sent in the storage order after the MSC interface is idle.

[0059] In a case where it is determined that the MSC interface is in the busy state, a second control strategy in the control strategy set is generated, where the second control strategy is used to control the read instruction to be sent to be added to the tail of the FIFO queue.

[0060] It should be noted that the MSC interface is in the busy state, which means that the current MSC interface is occupied by a data stream or a signaling stream, and the current MSC interface cannot send a new read instruction. The read instruction to be sent is added to the tail of the FIFO queue for waiting, that is, the read instruction in the FIFO queue is sent in the storage order after the MSC interface is idle.

[0061] In a case where it is determined that the MSC interface is in the busy state, a second control strategy in the control strategy set is generated, where the second control strategy is used to control the read instruction to be sent to be added to the tail of the FIFO queue.

[0062] It should be noted that during the execution of the command of the MSC interface, the corresponding chip CPU waits until the result in the FIFO queue is received, and then other codes are executed, that is, the MSC interface is additionally provided with a delay waiting function.

[0063] The steps S1000 to S3000, the MSC interface is in the busy state, the waiting time for interrupting all read instruction results is calculated in combination with the number of instructions in the FIFO queue, during the waiting time, the chip CPU does not execute other codes, and after the waiting time, the state of the MSC interface reading data is idle.

[0064] In one specific embodiment of the present application, taking the L9788 chip as an example, the MSC interface is integrated on the L9788 chip, as shown in FIG. 3, and the step of reading data by the MSC interface is as follows:

[0065] Step 1: When the L9788 chip sends a read instruction, the current state of the MSC interface is first judged. If the read state of the MSC interface is idle, step 2 is performed. If the read state of the MSC interface is busy, step 3 is performed.

[0066] Step 2: Send the read instruction immediately, set the read state of MSC interface to busy. CPU executes other codes. When MSC interface read interrupt returns data, provide the data to application and set the read state of MSC interface to idle.

[0067] Step 3: Add the read instruction to the tail of FIFO queue, increase the number of read instructions in FIFO queue by 1, and CPU executes other codes.

[0068] Step 4: When MSC interface read interrupt returns data, provide the data to application.

[0069] Step 5: Determine the number of read instructions in FIFO queue. If the number is greater than 0, go to Step 6; if the number is equal to 0, go to Step 7.

[0070] Step 6: Send the read instruction at the head of FIFO queue, and go to Step 4.

[0071] Step 7: Set the read state of MSC interface to idle.

[0072] In the above steps, the asynchronous read scheme is adopted, which does not need to wait for CPU to return data, but returns data to application through interrupt after successful read, thereby reducing invalid load.

[0073] In one embodiment of the present application, taking L9788 chip as an example, MSC interface is integrated on L9788 chip, as shown in FIG. 4, and the steps of MSC interface reading data are as follows:

[0074] Step 01: When L9788 chip sends a read instruction, first determine the current state of MSC interface. If the read state of MSC interface is idle, go to Step 02; if the read state of MSC interface is busy, go to Step 03.

[0075] Step 02: Send the read instruction immediately, set the read state of MSC interface to busy. CPU waits for MSC interface to return data. When MSC interface read interrupt returns data, CPU provides the data to application and sets the read state of MSC interface to idle.

[0076] Step 03: Add the read instruction to the tail of FIFO queue, then calculate the time that the system needs to wait according to the number of read instructions in FIFO queue. After all read instructions in FIFO queue return data, CPU provides the data to application and sets the read state of MSC interface to idle.

[0077] The MSC interface is usually used for communication between various components in the vehicle. The MSC interface can serve as a communication interface for components such as an engine control unit, an automatic transmission control unit, a brake system, an air conditioning control unit, a body control unit, an infotainment system, an instrument display unit, a tire pressure monitoring system, a navigation system, and the like, to realize data sharing and collaborative control, thereby improving the performance, safety, and comfort of the vehicle. Embodiment 2

[0078] The embodiment of the present application also provides a reading device for reading data of an MSC interface. FIG. 5 is a structural block diagram of the reading device. As shown in FIG. 5, the device comprises an acquisition module and a generation module.

[0079] The acquisition module is configured to acquire state information of the MSC interface reading data and a number of instructions in a FIFO queue, wherein the state information comprises at least one of the following: information that the MSC interface is in an idle state, and information that the MSC interface is in a busy state.

[0080] The generation module is configured to generate a control strategy set based on the state information and the number of instructions, wherein the control strategy set comprises at least one of the following: controlling the MSC interface to send a reading instruction and controlling a state of the MSC interface reading data to be in a busy state, controlling a reading instruction to be sent to be added to a tail of the FIFO queue, controlling the MSC interface to send a reading instruction located at a head of the FIFO queue and controlling a state of the MSC interface reading data to be in a busy state, and controlling a state of the MSC interface reading data to be in an idle state.

[0081] In the embodiment of the present application, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are acquired, and a control strategy set is generated based on the state information and the number of instructions. When the MSC interface is in an idle state, the MSC interface is controlled to send a reading instruction and the state of the MSC interface reading data is controlled to be in a busy state. When the MSC interface is in a busy state, a reading instruction to be sent is controlled to be added to a tail of the FIFO queue, and the instructions in the FIFO queue are sent again after the MSC interface is idle. In the above reading device, the FIFO queue mechanism is adopted. When the MSC interface is in a busy state, i.e., reading data is too fast, the reading instruction to be sent is stored in the FIFO queue, so that each reading instruction is effectively executed and returned, thereby avoiding disorder of received data caused by loss of the reading instruction. Embodiment 3

[0082] The embodiment of the present application also provides a computer storage medium, which stores a computer program. The computer program is configured to execute the steps in any of the above method embodiments when running.

[0083] In the embodiment, the storage medium can be configured to store a computer program for executing the following steps:

[0084] Step S1: obtaining state information of the MSC interface reading data and the number of instructions in the FIFO queue, wherein the state information comprises at least one of the following: information that the MSC interface is in an idle state, information that the MSC interface is in a busy state.

[0085] Step S2: generating a control strategy set based on the state information and the number of instructions, wherein the control strategy set comprises at least one of the following: controlling the MSC interface to send a read instruction and controlling the state of the MSC interface reading data to be in a busy state, controlling the read instruction to be sent to be added to the tail of the FIFO queue, controlling the MSC interface to send the read instruction located at the head of the FIFO queue and controlling the state of the MSC interface reading data to be in a busy state, and controlling the state of the MSC interface reading data to be in an idle state.

[0086] In the embodiment of the application, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are obtained, and a control strategy set is generated based on the state information and the number of instructions. When the MSC interface is in an idle state, the MSC interface is controlled to send a read instruction and the state of the MSC interface reading data is controlled to be in a busy state. When the MSC interface is in a busy state, the read instruction to be sent is controlled to be added to the tail of the FIFO queue, and the instructions in the FIFO queue are sent again after the MSC interface is idle. In the above method, the FIFO queue mechanism is used. When the MSC interface is in a busy state, i.e., the data reading is too fast, the read instruction to be sent is stored in the FIFO queue, so that each read instruction can be effectively executed and returned, thereby avoiding the disorder of the received data sequence caused by the loss of the read instruction. Embodiment 4

[0087] The embodiment of the application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.

[0088] In the embodiment, the processor can be configured to execute the following steps by using the computer program:

[0089] Step S1: obtaining state information of the MSC interface reading data and the number of instructions in the FIFO queue, wherein the state information comprises at least one of the following: information that the MSC interface is in an idle state, information that the MSC interface is in a busy state.

[0090] Step S2: generating a control strategy set based on the state information and the number of instructions, the control strategy set including at least one of the following: controlling the MSC interface to send a read instruction and the state of the MSC interface reading data to be a busy state, controlling the read instruction to be sent to be added to the tail of the FIFO queue, controlling the MSC interface to send the read instruction located at the head of the FIFO queue and the state of the MSC interface reading data to be a busy state, and controlling the state of the MSC interface reading data to be an idle state.

[0091] In the embodiments of the present application, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are acquired, and a control strategy set is generated based on the state information and the number of instructions. When the MSC interface is in an idle state, the state of the MSC interface sending a read instruction and reading data is controlled to be a busy state. When the MSC interface is in a busy state, the read instruction to be sent is added to the tail of the FIFO queue, and the instructions in the FIFO queue are sent after the MSC interface is idle. In the above method, the FIFO queue mechanism is used. When the MSC interface is in a busy state, i.e., reading data is too fast, the read instruction to be sent is stored in the FIFO queue, so that each read instruction is effectively executed and returned, thereby avoiding disorder of the received data sequence due to loss of the read instruction. Embodiment 5

[0092] The embodiments of the present application also provide a computer program product including a computer program, which, when executed by a processor, implements the method in the above embodiments.

[0093] In the embodiments, the processor can be configured to execute the following steps by using the computer program:

[0094] Step S1: acquiring state information of the MSC interface reading data and the number of instructions in the FIFO queue, wherein the state information includes at least one of the following: information that the MSC interface is in an idle state and information that the MSC interface is in a busy state.

[0095] Step S2: generating a control strategy set based on the state information and the number of instructions, the control strategy set including at least one of the following: controlling the MSC interface to send a read instruction and the state of the MSC interface reading data to be a busy state, controlling the read instruction to be sent to be added to the tail of the FIFO queue, controlling the MSC interface to send the read instruction located at the head of the FIFO queue and the state of the MSC interface reading data to be a busy state, and controlling the state of the MSC interface reading data to be an idle state.

[0096] In the embodiments of the present application, the state information of the MSC interface reading data and the number of instructions in the FIFO queue are acquired, the control strategy set is generated based on the state information and the number of instructions, when the MSC interface is in the idle state, the MSC interface is controlled to send the reading instruction and the state of the MSC interface reading data is controlled to be the busy state; when the MSC interface is in the busy state, the reading instruction to be sent is controlled to be added to the tail of the FIFO queue, and after the MSC interface is idle, the instructions in the FIFO queue are sent. In the above method, the FIFO queue mechanism is used, when the MSC interface is in the busy state, that is, the reading data is too fast, the reading instruction to be sent is stored in the FIFO queue, so that each reading instruction is effectively executed and returned, so as to avoid the disorder of the received data sequence caused by the loss of the reading instruction.

[0097] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0098] In the above embodiments of the present application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0099] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only illustrative, and the division of units can be a logical function division, and actual implementation can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0100] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0101] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0102] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk and various program code storage media.

[0103] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A method for reading data via an MSC interface, characterized in that, include: Obtain the status information of the MSC interface reading data and the number of instructions in the FIFO queue, wherein the status information includes at least one of the following: information that the MSC interface is in an idle state, information that the MSC interface is in a busy state; A control strategy set is generated based on the status information and the number of instructions. The control strategy set includes at least one of the following: controlling the MSC interface to send a read instruction and controlling the state of the MSC interface reading data to be busy; controlling the read instruction to be sent to be added to the tail of the FIFO queue; controlling the MSC interface to send a read instruction located at the head of the FIFO queue and controlling the state of the MSC interface reading data to be busy; and controlling the state of the MSC interface reading data to be idle.

2. The method according to claim 1, characterized in that, Obtain the status information of the MSC interface reading data and the number of instructions in the FIFO queue, and generate a control policy set based on the status information, including: When it is determined that the MSC interface is in the idle state, a first control policy is generated in the control policy set, wherein the first control policy is used to control the MSC interface to send a read command and to control the MSC interface to read data in a busy state.

3. The method according to claim 1, characterized in that, Obtain the status information of the MSC interface reading data and the number of instructions in the FIFO queue, and generate a control policy set based on the status information, including: If it is determined that the MSC interface is in the busy state, a second control policy is generated in the control policy set, wherein the second control policy is used to control the read instruction to be sent to be added to the tail of the FIFO queue; If the MSC interface has received preset data, determine whether the number of instructions in the FIFO queue is equal to 0. If so, a third control policy is generated in the control policy set, wherein the third control policy is used to control the state of the MSC interface reading data to be idle.

4. The method according to claim 1, characterized in that, Obtain the status information of the MSC interface reading data and the number of instructions in the FIFO queue, and generate a control policy set based on the status information and the number of instructions, including: If it is determined that the MSC interface is in the busy state, a second control policy is generated in the control policy set, wherein the second control policy is used to control the read instruction to be sent to be added to the tail of the FIFO queue; If the MSC interface has received preset data, determine whether the number of instructions in the FIFO queue is equal to 0. If not, generate a fourth control policy in the control policy set, wherein the fourth control policy is used to control the MSC interface to send a read instruction located at the head of the FIFO queue, and to control the MSC interface to be in a busy state when reading data.

5. The method according to claim 3 or 4, characterized in that, Before determining whether the number of instructions in the FIFO queue is equal to 0, the process includes: After the MSC interface sends a read instruction located at the head of the FIFO queue, and after the read instruction to be sent is added to the tail of the FIFO queue, the first instruction count in the FIFO queue is updated to the second instruction count. Based on the second instruction count, determine whether the number of instructions in the FIFO queue is equal to 0.

6. The method according to claim 1, characterized in that, Obtain the status information of the MSC interface reading data and the number of instructions in the FIFO queue, and generate a control policy set based on the status information and the number of instructions, including: If it is determined that the MSC interface is in the busy state, a second control policy is generated in the control policy set, wherein the second control policy is used to control the read instruction to be sent to be added to the tail of the FIFO queue; Calculate the delay duration for the MSC interface to receive preset data based on the number of instructions in the FIFO queue; After the specified delay period, a third control policy is generated from the control policy set, wherein the third control policy is used to control the state of the MSC interface reading data to be idle.

7. A data reading device for an MSC interface, characterized in that, include: The acquisition module is used to acquire the status information of the MSC interface reading data and the number of instructions in the FIFO queue, wherein the status information includes at least one of the following: information that the MSC interface is in an idle state, or information that the MSC interface is in a busy state. A generation module is used to generate a control strategy set based on the status information and the number of instructions. The control strategy set includes at least one of the following: controlling the MSC interface to send a read instruction and controlling the state of the MSC interface reading data to be busy; controlling the read instruction to be sent to be added to the tail of the FIFO queue; controlling the MSC interface to send a read instruction located at the head of the FIFO queue and controlling the state of the MSC interface reading data to be busy; and controlling the state of the MSC interface reading data to be idle.

8. A computer storage medium, characterized in that, The computer storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer storage medium is located to perform the method of any one of claims 1-6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • USSD-based communication method, system and device

    CN101931920A

  • Method for reading data by MSC (Mobile Switching Center) interface and reading device

    CN118819459A

  • System and method for efficiently performing a command swapping procedure

    US20030041190A1

  • Cache storage queue

    US4855904A

  • Multiprocessor system with independent direct access to bulk solid state memory resources

    WO2015134941A1